Fonts used converting word document to pdf

Hi

I am using .Words to convert word documents to pdf. I have a question about the fonts used in the conversion process. I have a document that has a watermark (testdocs2.doc) and the font used is Calibri. I have a second document(testdocs1.doc) that does not have the watermark but the font is used in the body of the docuemnt. When I do the conversion on my pc locally both files convert. I assume this is because I have this font on my own pc.

However we are also trying to use .Words from within an Oracle database that is running on Linux. When I try to convert the document with the watermark I get this error. No fonts were found in ‘/oracle/dbInstance/oracle/javavm//lib/fonts:/usr/X11R6/lib/X11/fonts/Type1:/usr/X11R6/lib/X11/fonts/TrueType:/usr/X11R6/lib/X11/fonts/tt:/usr/share/fonts/ja/TrueType’.

The document without the watermark but using the font in the body of the document converts. Is .Words trying to find a different font to use in one case and not the other, if it can’t find the font used in the document.

Anthony

Hi Anthony,


Thanks for your inquiry. Yes, Aspose.Words looks for fonts in the locations mentioned in your error message during rendering Word documents to Fixed Page Formats. Calibri is a True Type font and by default this font is not installed on most Linux distributions. In order to render your documents with best fidelity, I would suggest you please simply copy this font from Windows to your Linux machine. Regarding the error (during rendering WordArt Shape to PDF), please give us a little favour by upgrading to Aspose.Words version 11.9.0 and testing this scenario with it on your side. You can download it from the following link:
http://www.aspose.com/community/files/72/java-components/aspose.words-for-java/default.aspx

I hope, this helps.

Best Regards,

Hi Awais,

I have downloaded the newest version but I'm still getting the error. I have not trie d putting the fonts onto the linux server yet.

Can you tell me what exception is generated when this error occurs it appears to print out the error message to the console but I don't seem to be able to catch it.

Anthony

Hi Anthony,


Thanks for your inquiry. Since in your case, Aspose.Words was unable to find any fonts on your Linux machine, then during rendering, the fonts in the document will be substituted with the default font specified under FontSettings.DefaultFontName. You may implement IWarningCallback interface if you want to have your own custom method called to capture this loss of fidelity warnings that can occur during document loading or saving. Please read the following article that outlines Receiving Notification of Missing Fonts and Font Substitution during Rendering
http://www.aspose.com/docs/display/wordsjava/How+to+Receive+Notification+of+Missing+Fonts+and+Font+Substitution+during+Rendering

Best Regards,