Use Printer Metrics to Lay Out Document's Effect on Word DOC to PDF Conversion on Different Windows 10 & Windows Server 2016 2019 OS Java

we are facing an issue during a conversion of a .doc file to PDF: there are differences in generated PDFs when generated on Windows Server OSs, while they are OK when done on Windows 10.
Please find attached sample java file we used to test and output PDFs results by operating system. The source doc we have used for the conversion is contained in the .zip file (DocSampleForAspose) as well.
The same issue happens also when converting to another format (.e.g JPG). We have also checked the fonts directory and the involved fonts are exactly the same.
Tested with Aspose.Words version 20.6 and latest 20.8.
Thanks. (249.0 KB)


We have logged this problem in our issue tracking system. Your ticket number is WORDSNET-20956. We will further look into the details of this problem and will keep you updated on the status of the linked issue. Sorry for the inconvenience.


Regarding WORDSNET-20956, the difference in line wrapping is caused by the “Use printer metrics to lay out document” compatibility option. This option is enabled in the source document, and it affects how the characters in the document are measured. To handle this option, Aspose.Words makes system calls to the default printer. The issue on Windows Server might have the following causes:

  • No printer installed in the system. Windows 10 usually have at least “Microsoft XPS Document Writer” installed.
  • The application using Aspose.Words does not have access rights to the default printer.

A post was split to a new topic: Word to PDF Conversion on Windows Server