Embeding TT Fonts

  • In a seperate message I posted:
    My program uses the EM_FORMATRANGE windows message to print dozens of RichText controls to the printer. When I print to the PDF control's HDC, the information is correct, but the font is substituted. I have tried setting the PDF_FontMode property to the various enumerated properties to no avail.

    Jazzman Wrote back and asked if I had "Use Local Fonts" option turned on in Adobe Reader.

    When it is on the doc looks great but I need to send this to people that do not not have our fonts. I need to embed them. Since I am using API print routines (EM_FORMATRANGE message) I don't think they are being embedded into the pdf.

    I am using the DLL not the OCX

    Any help would sure be appreciated.

    • Offizieller Beitrag

    Hi,

    I assume you are using the wPDFControl.DLL (not wPDF VCL) so I moved this post.

    You can select the font embedding using


    WPDF_SetIProp( env,
    WPPDF_USEFONTMODE, // = 4
    1);

    The options for the last parameter are (starting with 0) wpUseTrueTypeFonts, wpEmbedTrueTypeFonts,
    wpEmbedSymbolTrueTypeFonts, wpUseBase14Type1Fonts,
    wpEmbedSubsetTrueType_Charsets, wpEmbedSubsetTrueType_UsedChar

  • Thank you for the reply. I didn't see those defs in the .h file.
    I tried it, but still no success. Did you read my previous post? I am using the EM_FORMATRANGE windows message to print "WYSIWYG". I never have to actually select a font into the hDC. Could that be the problem? I guess what I am asking is: How does the DLL keep track of which fonts to embed? Does it add it to a list when you do a TextOut function? I am not printing that way.

    Thank You. This is a great product!

    • Offizieller Beitrag

    Hi,

    >>Thank you for the reply. I didn't see those defs in the .h file.
    I tried it, but still no success. Did you read my previous post? I am using the EM_FORMATRANGE windows message to print "WYSIWYG". I never have to actually select a font into the hDC. Could that be the problem? I guess what I am asking is: How does the DLL keep track of which fonts to embed? Does it add it to a list when you do a TextOut function? I am not printing that way. <<

    Yes, it does. It captures everything.

    It is possible that it is not able to load the font data of the font you are using. Which font are you isng - it must be a TT font.

    Did you check the PDF file if the fonts are embedded. Acrobat displayed 'embedded' in the font info.

    >>Thank You. This is a great product!
    You are welcome - and thanks