Seemingly different formatting output based on OS

I’m using Aspose.Words for Java to convert .docx files to .pdf files. I’ve tried this on three different environments: Windows 2012 R2, Ubuntu 16.04 LTS, and Kubuntu 17.04 and have noticed differences in formatting depending on the OS.

Attached is a .zip containing the following files:

  1. AGT001__.docx - the .docx file being converted to .pdf
  2. Kubuntu17_04.pdf - the result of the conversion on Kubuntu 17.04
  3. Ubuntu16_04LTS - the result of the conversion on Ubuntu 16.04 LTS
  4. WindowsServer2012R2 - the result of the conversion on Windows Server 2012 R2

aspose.zip (1.5 MB)

Here are my comments on the output of each .pdf:

Windows 2012 R2:

  1. The formatting matches the source .docx exactly

Kubuntu 17.04:

  1. Most of the text is italicized in the .pdf when it wasn’t italicized in the .docx
  2. The vertical spacing between lines in the .pdf is larger than in the .docx
  3. There are page breaks in the .pdf that don’t exist in the .docx

Ubuntu 16.04 LTS:

  1. The vertical spacing between lines in the .pdf is larger than in the .docx
  2. There are page breaks in the .pdf that don’t exist in the .docx

Is there something I can do to make Aspose.Words output the .pdf come out like the Windows 2012 R2 one did for all operating systems?

Thanks.

@coryf,

Thanks for your inquiry. You are using a very old version of Aspose.Words for Java i.e. 15.10.0 on Kubuntu and Ubuntu machines on your end. We suggest you please upgrade to the latest version of Aspose.Words for Java i.e. 18.5 and see how it goes on your end? Hope, this helps.

In case the problem still remains, please provide new Aspose.Words for Java 18.5 generated PDF files from your Kubuntu, Ubuntu and Windows Server machines here for further testing.

Also, please make sure that the following fonts used in your “AGT001__.docx” document are installed on all machines:

  • ‘Arial’
  • ‘Calibri’
  • ‘Arial Narrow’
  • ‘Times New Roman’

How Aspose.Words Uses True Type Fonts

The non-Windows environments were missing the fonts you listed. Installing those fonts on the non-Windows environments did the trick.

Thanks!

@coryf,

It is great that you were able to resolve this issue on your end. Please let us know any time you have any further queries.