Rows moved to the next page when converting DOCX to PDF

Hi,

When converting a DOCX to PDF using Aspose.Words. I noticed the last row of a page was moved to the beginning of the next page, causing messed up layout and extra pages.

Code:

var document = new Document(@".\test.docx");
document.LayoutOptions.TextShaperFactory = HarfBuzzTextShaperFactory.Instance;
document.Save(@".\out.pdf");

I’ve attached the test files and a screenshot for your reference. Could you please help to take a look?

test.zip (757.0 KB)
image.png (28.7 KB)

Thanks,

@ServerSide527,
We have tested the scenario and managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET - 23549. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Hi @sergey.lobanov,

I’ve found another instance where converting a DOCX to PDF with Aspose.Words pushes some content into the next page. In this example, a whole table is moved into page 2; when converting to PDF with Word shows it in page 1.

test2.zip (1.3 MB)
image2.png (271.1 KB)

Thanks,

@ServerSide527 Thank you for reporting this problem to us. I have create another issue WORDSNET-23618 for this problem. We will keep you informed and let you know once it is resolved.

Hi @alexey.noskov,

I’ve found another instance, I’ve noticed that if I remove the table of contents in the original Word document, the image pushed into the next page in the Aspose PDF conversion moves into the next page. I’m not sure if it’s related but just wanted to let you know.

test3.zip (332.4 KB)
image3.png (281.3 KB)

Thanks,

@ServerSide527 This is not a bug. Aspose.Wors behaves exacly the same way as MS Word. Please see the attached output documents produced on my side using MS Word 2019 and the latest 22.3 version of Aspose.Words:
ms.pdf (107.2 KB)
ms_updateFields.pdf (95.6 KB)
out.pdf (120.8 KB)
out_updateField.pdf (93.6 KB)
As you can see the results are the same. out.pdf is produced by the following code:

Document doc = new Document(@"C:\Temp\in.docx");
doc.Save(@"C:\Temp\out_updateField.pdf");

and matches ms.pdf produced by simple saving as PDF.

The out_updateFields.pdf is produced by the following code:

Document doc = new Document(@"C:\Temp\in.docx");
doc.UpdateFields();
doc.Save(@"C:\Temp\out_updateField.pdf");

And matches ms_updateFields.pdf document where fields were updated in MS Word before conversion to PDF.

Hi @alexey.noskov

Sorry, we had a setting internally updating the TOC.

Please, let us know when the other issues are resolved.

Thanks for your quick reply!

@ServerSide527 Sure, we will keep you informed and let you know once the issues are resolved.

A post was split to a new topic: Rows are moved to the next page when converting DOCX to PDF