PDF Rendering To Image Png

Hi

We use aspose.pdf to convert customer’s pdf to images using the pngdevice class. Occasionally we have rendering issues. In this thread, I would like to discuss about unusual font names found in some of the pdfs and which rendered garbage images.

FEF4D0A17FC-Roman (As described by Adobe: Embedded Subset OpenType)
FEF1154A446-Roman (Embedded Subset OpenType)
FEF765AFCAE-Roman (Embedded Subset OpenType)
FEFD0717570-Roman (Embedded Subset OpenType)

I would like to know what are these fonts(why are they prefixed by hexadecimal numbers) and which font should I download on our end that would enable a proper text rendering of the pdfs to images.

Thank You!

@arthurM

Can you please share your sample PDF with the sample code snippet so that we can test the scenario in our environment and address it accordingly?

I can’t share the original pdf unfortunately. But please could you explain why in general a hexadecimal font, like the one I shared previously, could be found on a pdf? How to trace the original font in order to render text properly once image conversion is initiated?

@arthurM

Please allow us to gather related information and we will get back to you shortly.

Thanks. While you are gathering information, could you also inquire as to why saving document as xml using the method below, does not generate the “fontfile” of the problematic fonts?

pdfDocument.Save(Path.Combine(customFontRepository, “sample.xml”), Aspose.Pdf.SaveFormat.MobiXml);

After execution of this code, I obtain an xml file and serveral files with “.ttf” extenstion.
Does this mean “Opentype” fonts could not be recovered using this method?

@arthurM

Aspose.PDF is built to deal with the system fonts that has TTF extension usually. You can use OTF fonts with the API however during the PDF generation and manipulation. The scenario you are describing is not yet investigated and we need to perform some analysis before sharing some feedback. You already told us that you cannot share files with us with the problematic fonts. If possible, can you please try to arrange a sample PDF with the same fonts but without the information that you do not want to share with us? It would help us in investigating the scenario and address it accordingly.