After Docx into PDF convert, layout get changed and 3 pages get generated, how can I keep the same visual effect in PDF?

Now we make such a PDF convert test, here it is the test file
Barcodetest2.docx (124,8 KB)

Here it is the screenshot of MS-Word visual effect for this file, and we want the PDF output has exactly the same visual effect image.png (231,4 KB)

our Java Code for PDF convert is very simple:

final Document doc = new Document(“Barcodetest2.docx”);
doc.save(“barcode-out-2.pdf”);

However, after converting, 3 pages get displayed in PDF, and the layout is also different, so it is the PDF result
barcode-out-2.pdf (151,9 KB)

Here it is the visual effect in the PDF, there are 3 pages in the screenshot
image.png (60,8 KB)
image.png (68,7 KB)
image.png (28,7 KB)

In MS-Word, the Docx File has only 2 pages, however the PDF generation result has 3 pages and the layout get changed also. We want the PDF generation result has EXACTLY the same visual effect as MS-Word. How can I make it?

@zwei
You are using Aspose.Words in evaluation mode. This means the evaluation text is injected into the document and you cannot keep the original document layout. If you would like to test Aspose.Words without evaluation version limitations, you can request a temporary 30-days license.

Also there are “Noto Sans” and “Noto Sans Light” fonts used in the document. According to the provided output, these fonts are not available to Aspose.Words on your side and font substitution is performed. Unfortunately it is also not possible to keep the original document layout in this case. You should provide the required fonts to Aspose.Words if you want exactly the same layout as in MS Word. Please check Manipulate and Substitute TrueType Fonts article for more info.

1 Like