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

Free Support Forum - aspose.com

Fonts for generated PDF from MS Word


I am using Aspose Total for Java in the application where it generates PDF from MS Word. Basically, it uses MS Word template and mail merge functionality to generate PDF. One thing I noticed that the generated PDF uses a default font style. Is there any way I could change the font style on the generated PDF? Is it also possible to change font size?



Hi Vinit,

Thanks for your inquiry. I am representative of Aspose.Words team.

Aspose.Words requires TrueType fonts when rendering documents to fixed-page formats (PDF, XPS or SWF). Most likely this problem occurs when you use Aspose.Words on Linux or Mac OS or your MS Word template document uses fonts that are not present on your computer or Aspose.Words cannot locate fonts on your computer. If any of these is found to be the case, you can either copy True Type font files from a Windows machine or install a True Type font package on your machine. Also, you can use the FontSettings class to specify the location of the font files.

In addition, Aspose.Words always creates subsets of fonts upon converting to PDF. If Apsose.Words cannot find some font, it just uses an alternative font from available fonts.

Moreover, you can also try embedding fonts into the resulting PDF documents by using PdfSaveOptions.setEmbedFullFonts(booleanvalue).

Also, to be able to change the font of whole document, you have to change the font of each node in the document.

Please let us know if you need more information, we are always glad to help you.

Best Regards,

Hello Awais,

Thanks for your reply. I do run Aspose on Linux system & calls an Aspose Word API to generate document in the user desired format by calling something like :

document.save(response.getOutputStream(), desiredFormatType);

where "desiredFormatType" is either .DOC or PDF.

Is it possible to install Fonts package on Linux? If so, can I copy from the Windows machine to the Linux where the Aspose runtime is located?



Hi Vinit,

Thanks for the additional information. In your case, I believe you will get the answers to all of your questions after reading the articles suggested below:


If we can help you with anything else, please feel free to ask.

Best Regards,