Printing to PDF and "weird" fonts
Hi,
some of our clients use some non-standard windows fonts and with some fonts they have problems when trying to print to PDF. In our application we use TRichView.com component for writing text and the report have their component to print the text. If user uses standard windows fonts, i.e. Arial, Calibri, TimesNewRoman, Symbol, Bahnschrift etc, there is no problem with printing to the printer or creating the PDF from the report. But if user uses font like Avenir (I do not know where they got it), then printing to normal printer has no problem but if one chooses on a report "Print to file-PDF" but if one chooses "Embed fonts", then we have a problem. In Debugger I get the message:
"CreateFontPackage: Font Not In Collection".
Then follows AccessViolation... Unfortunatelly I can't help here with MadExcept as it does not show anything useful.
Any ideas?
Best regards,
Goran
some of our clients use some non-standard windows fonts and with some fonts they have problems when trying to print to PDF. In our application we use TRichView.com component for writing text and the report have their component to print the text. If user uses standard windows fonts, i.e. Arial, Calibri, TimesNewRoman, Symbol, Bahnschrift etc, there is no problem with printing to the printer or creating the PDF from the report. But if user uses font like Avenir (I do not know where they got it), then printing to normal printer has no problem but if one chooses on a report "Print to file-PDF" but if one chooses "Embed fonts", then we have a problem. In Debugger I get the message:
"CreateFontPackage: Font Not In Collection".
Then follows AccessViolation... Unfortunatelly I can't help here with MadExcept as it does not show anything useful.
Any ideas?
Best regards,
Goran
Goran Brumen
Audax d.o.o.
Audax d.o.o.
Comments
The PDF device extensively uses Windows API font processing to handle fonts for PDF. We can only provide support for standard Windows fonts installed with the operating system.
The error you are getting generally implies you are attempting to access a font in the font collection that doesn't exist or are using a poorly formatted font.
One option is to turn font subsetting off for the report that uses this font. Another is to simply use a different font.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com