Exporting Issues (III)

Hi,

With the attached document and Aspose.Words 14.5.0, some of the mathematical symbols don’t look correct when exporting to PDF or image using Mac or Linux with Java 1.7.0_60, as you can see in the attachment.

I’ve checked that Cambria Math is correctly installed in both systems, and on the Mac system I have Microsoft Office installed (with all the Microsoft fonts installed as well), and it correctly shows the equations.

Thank you.

Hi there,

Thanks for your inquiry. I have tested the scenario using following code example at Ubuntu and have not found the shared issue. Please check the attached output Pdf document.

Please note that Aspose.Words requires TrueType fonts when
rendering documents to fixed-page formats (PDF, XPS or SWF). Make sure
you have all the Fonts installed on your machine you’re using to convert
Word document to PDF format. I would suggest you please read the
following articles:
https://docs.aspose.com/words/java/specify-truetype-fonts-location/
https://docs.aspose.com/words/java/install-truetype-fonts-on-linux/

Document doc = new Document(MyDir + "math.doc");
FontSettings.setFontsFolder("/tmp/fonts/", false);
doc.save(MyDir + "Out-Ubuntu.pdf");

Hi Tahir,

As I said, I have all the fonts for Microsoft Word installed, as they get installed when you install the Office suite.

Do I need to manually specify the path nonetheless? It seems that other fonts are being picked up correctly, like Arial or Symbol, installed using the same means…

Hi there,

Thanks for your inquiry. If you have installed all fonts, there is no need to set the font folder. Please read about font availability and substitution from here:
https://docs.aspose.com/words/java/using-truetype-fonts/

Please make sure you have all the Fonts installed on your machine you’re using to convert Word document to PDF format.

Could you please set the font folder using FontSettings.setFontsFolder method and check if you still face the same issue?

An easy and quick way is to copy .TTF and .TTC
files from the C:\Windows\Fonts directory on a Windows machine to some
directory on your Linux machine. You do not need to install or register
these fonts on Linux in any way, you just need to specify the location
of the fonts using the FontSettings class in Aspose.Words.