Embeded font in PDF

Posted by: joeleung on 4 August 2017, 3:02 pm EST

  • Posted 4 August 2017, 3:02 pm EST

    Hi,


    1) I would like to know, is the latest build always include all fix of previous build(s)? Let say I need to reinstall my machine, after install AR2.0, I can simply install the latest build without installing ALL builds one by one chronologically?


    2) I just installed Build 2.1.0.1279 (no Build has ever been updated before) which claims it solved (CR#15291) "Some Fonts are not being embedded into the exported PDF file even when the SemiDelimitedNeverEmbedFonts property is set to . " But, I still don't see the font embedded to the PDF file (From "Document Properties", the font is not like "MyFont(Embedded)" and user cannot the character normally without install the font first). Here are the codes:


        Dim otPDFExport As New ActiveReportsPDFExport.ARExportPDF
       
        otPDFExport.AcrobatVersion = DDACR30
        otPDFExport.FileName = sgPath
        otPDFExport.JPGQuality = 100
        otPDFExport.OutputTOCAsBookmarks = True
        otPDFExport.SemiDelimitedNeverEmbedFonts = ""
        otPDFExport.ShowBookmarksInAcrobat = True
       
        otPDFExport.Export AReport.Pages


    Do you have any clue?


    Thx & Rgds,
    Joe

  • Replied 4 August 2017, 3:02 pm EST

    Hello,

    1) The latest build should always include all fixes of previous builds and it is recommended to use the latest build of the product.

    2) Unfortunately, I was not able to reproduce this problem with latest build. The generated PDF files open fine and display the text with embedded fonts on the machines without these fonts installed. What kind of font do you use? Could you please provide it?
  • Replied 4 August 2017, 3:02 pm EST

    Hi AntonM,


    That is a font provided by customer that I think it is not good to distribute it without her approval.It is a TrueType font which shows the company logo. With a letter "h" in field value, logo will be shown.


    I tried creating a new report only with that font (use Field) and export it to .pdf in the designer. From "Document Properties" of the .pdf file, the font CANNOT be embedded. If I don't install the font first, I can only see the letter "h".


    Can you provide a workable sample for me to reference and try again? Thanks a lot.


    Rgds,
    Joe

  • Replied 4 August 2017, 3:02 pm EST

    Hi AntonM,


    Thanks for your sample. But, in your sample, the exported PDF file does not have the font embedded.
    I tried changing "otPDFExport.AcrobatVersion = DDACR30" to "otPDFExport.AcrobatVersion = 2" then it seems the font can be embedded.


    Does it mean that, for exporting with ActiveReports, in order to have font embedded in PDF file, we must have at least PDF version 1.3?
    Thanks.


    Rgds,
    Joe

  • Replied 4 August 2017, 3:02 pm EST

    Hello,

    You are correct. You need to set AcrobatVersion = DDACR40 to create PDF for Acrobat 4.x (1.3 PDF Version) in your case.
  • Replied 4 August 2017, 3:02 pm EST

    Hi AntonM,


    What does it mean "in your case"? In my case it is required, but in your sample, you do not?


    But the PDF file you atttached does not have the font embedded as well.


    May I know under what condition that Acrobat 3.x is OK to embed font to PDF file? Thanks.


    Rgds,
    Joe

  • Replied 4 August 2017, 3:02 pm EST

    Hello,

    It means that it is required when you need to display the text with custom embedded font on another machine where that font is not installed (like in your case). I have attached the same PDF sample exported with AcrobatVersion = DDACR40, it should be displayed with custom font fine on your side.

    2007/03/TestEmbeddedFonts.zip
  • Replied 4 August 2017, 3:02 pm EST

    Hello,

    Unfortunately, there is no attachment with your post. Could you please ZIP the font first and the upload it?
  • Replied 4 August 2017, 3:02 pm EST

    Hi AntonM,


    As I said, I cannot provide you the font unless get our customer's approval. That is the font they own.


    Alternatively, I am thinking if you can provide me your testing workable sample so that I can try. If your testing sample works, may be there is problem or special about customer's font. If so, I will further discuss with our customer. Can we do it this way?


    BTW, may I know if PDF version matters for embedding font to file? Can both version 1.3 and 1.4 alright? Or which version must be?


    Thanks.


    Rgds,
    Joe

  • Replied 4 August 2017, 3:02 pm EST

    Hello,

    Please sorry for the little confusing. Please try to the attached sample project to make the necessary tests.

    The version of the Acrobat file should not matter for the fonts embedding. You can use both versions without a problem.

    2007/03/PDFExport.FontEmbedding.zip
  • Replied 4 August 2017, 3:02 pm EST

    Acrobat 3.x is not OK to embed font to PDF file because that Hungarian King.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels