Problem: PDF with Unicode Font

edited 6:38PM in FastReport.Mono
this problem also exists in dotnet core....please fix

Comments

  • edited 6:38PM
    finally found the answer:
    1. unicode font, https://www.google.com/get/noto/
    2. set pdf compliance (embedded font)
    using (FastReport.Export.Pdf.PDFExport pdfExport = new FastReport.Export.Pdf.PDFExport())
    {
       pdfExport.PdfCompliance = FastReport.Export.Pdf.PDFExport.PdfStandard.PdfX_4;
       pdfExport.Export(report, ms);
    }
    
  • Hello!

    Windows fonts (Arial, Times New Roman, Tahoma) are not included by default in Linux. Please install the Google Noto or DejaVu fonts:

    sudo apt-get install fonts-noto fonts-dejavu-core ttf-mscorefonts-installer

    sudo fc-cache -f -v

    To ensure that the generated PDF file opens correctly on any device and contains Unicode glyph tables, set the EmbeddingFonts property to true and select the PDF/A or PDF/X standard:

    using (var pdfExport = new FastReport.Export.Pdf.PDFExport())
    {
      pdfExport.ShowProgress = false;
      pdfExport.EmbeddingFonts = true; // REQUIRED for Unicode!
      pdfExport.PdfCompliance = PDFExport.PdfStandard.PdfA_2a; // or PdfX_4
      report.Export(pdfExport, ‘unicode_output.pdf’);
    }
    


This discussion has been closed.