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

Free Support Forum - aspose.com

PDF converted from DOCX has more pages than Word shows

Java version 22.1.

The following DOCX:

redacted.docx (33.5 KB)

is converted to the following 3-page PDF with Aspose.Words:

aspose.pdf (18.7 KB)

but in Word, it appears as only two pages (sorry for the cluttered screenshot):

word.png (119.6 KB)

It appears that Aspose is doing something different with line spacing, perhaps?

(Tracked internally as #8041.)

@icsk I was unable to reproduce the issue you mentioned with the attached "redacted.docx ". Input and output documents are displayed identically in my case.
Could you please provide conversion code that demonstrates an issue?
Please, also run the following code on the same machine where the problem occurs

Document doc = new Document("redacted.docx");
doc.save("redacted.xps", SaveFormat.XPS);

ZIP and upload here your output “redacted.xps”.
We will check the issue and provide you more information.

I took a deeper look. It appears we substitute Garamond for EB Garamond which I was not aware of, which must have a different line spacing. Undoing the substitution rule fixes the issue. Thank you for taking a look!

@icsk Please feel free to ask in case of any issues, we will be glad to help you.