We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

ASPOSE WORDS JAVA. Which fonts used during conversion to PDF

We have two linux servers and one of them converting 1 page DOC to 2 page PDF.
Servers have different sets of fonts installed.
Can we configure debug logging for ASPOSE, so it will print which fonts used during conversion?

Is there any way to make Aspose print out which fonts was used during conversion?
We have two servers. And there is different set of fonts installed on two servers. And server that has more fonts installed converts 1 page doc to 2 page pdf. So we need to understand which font we should remove from second server so it will convert 1 page doc to 1 page pdf.


Thanks for your inquiry. Please note that Aspose.Words requires TrueType fonts when rendering document to fixed-page formats (JPEG, PNG, PDF or XPS). You need to install fonts that are used in your document on the machine where you are converting documents to PDF. Please refer to the following article:
How Aspose.Words Uses True Type Fonts

You can get the missing fonts notification while converting document to PDF. Please check the code example shared in the following article.

How to Receive Notification of Missing Fonts and Font Substitution during Rendering

Below code example shows how to gather the details of what fonts are present in a document.

Document doc = new Document(MyDir + "Document.doc");

FontInfoCollection fonts = doc.FontInfos;
int fontIndex = 1;

// The fonts info extracted from this document does not necessarily mean that the fonts themselves are
// used in the document. If a font is present but not used then most likely they were referenced at some time
// and then removed from the Document.
foreach (FontInfo info in fonts)
    // Print out some important details about the font.
    Console.WriteLine("Font #{0}", fontIndex);
    Console.WriteLine("Name: {0}", info.Name);
    Console.WriteLine("IsTrueType: {0}", info.IsTrueType);