Unable to generate similar PDF output from DOCX - line height/layout did not match

I’m trying to generate PDF file from DOC/DOCX files but generated PDF file line position/height/layout is always different from source.

I’ve tested many different loading/save options (I’ve commented them on source code).
(MS Word compatibility loading option, embedding full fonts, enabling additional text position, different PDF standart, new Harf Buzz Shaping, etc).

Here is the input and output file difference example:
https://ibb.co/RSv1KK8 (input DOCX document)
https://ibb.co/F4Brnjp (output PDF document)

I’m using Aspose Words Java 19.11, OpenJDK 1.8 on macOS and OpenJDK 11.0 on Linux. (MS core and additional fonts are installed).

Here are the source, generated PDF files and Java source code: https://filebin.net/jsgk1o7b18b0iqys/docx-to-pdf-test.zip?t=ls8e2tps

Additionally, I’ve also tested PDF conversion with GroupDocs Cloud API (your sister company?). It provides same faulty output.

@hdogan,

We have converted your ‘test.docx’ to PDF format by using MS Word 2019 and Aspose.Words 19.11 and attached them here for your reference:

Both PDF files look identical. Can you please also provide a comparison screenshot highlighting the problematic areas in this Aspose.Words 19.11 generated output PDF file with respect to the MS Word generated PDF document and attach it here for our reference?