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

Free Support Forum - aspose.com

DOCX to PDF conversion issue with content position using Java at MAC

1669124.docx.zip (16.9 KB)
export.zip (103.6 KB)

aspose.word 20.8
Mac OS 10.15.6
java version “1.8.0_181”
Java™ SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot™ 64-Bit Server VM (build 25.181-b13, mixed mode)

Code:
Document document = new Document(“file path”);
PdfSaveOptions saveOptions = new PdfSaveOptions();
saveOptions.setPageIndex(0);
saveOptions.setPageCount(1);
document.save(“save to pdf”, saveOptions);

PageCount return 2
one Page PDF only contains part of docx file

PageCount was only 1 when open with MS Word OR WPS
one Page PDF contains all info when export to pdf with SAVE AS action

@JamesGuo

Please note that Aspose.Words mimics the behavior of MS Word. The MS Word displays the content on two pages. Please check the attached screenshot of MS Word 2016. ms word 2016.png (29.7 KB)

MS Word 16.16
image.png (557.7 KB)

@JamesGuo

Please make sure that the fonts used in your document is installed on the system where you are converting document to PDF.

Please share your operating system detail where you are converting document to PDF.

Mac OS 10.15.6
java version “1.8.0_181”
Java™ SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot™ 64-Bit Server VM (build 25.181-b13, mixed mode)

@JamesGuo

It seems that this screenshot is taken at MAC operating system. Please confirm.

Please convert your document to PDF using MS Word 2016 and share it here for further testing. Please also share the MS Word version as shown in attached image. office version.png (5.1 KB)

image.jpg (454.6 KB)
1669124 2.pdf (43.1 KB)

yes mac os 10.15.6

@JamesGuo

Please note that Aspose.Words mimics the behavior of MS Word 2019 when document is converted to PDF. MS Word renders the shared document on two pages. So, you are facing the expected behavior of Aspose.Words.