Converting .docx to .pdf when a table breaks across pages results in different output in the PDF including incorrect page numbers in the table of contents. I am using Aspose.Words for .NET version 19.1.
In the resulting PDF (IncorrectPageNumbers_Aspose.pdf) you will see that sections 2, 3, and 4 say they are on page 5, but there are only 4 pages in the document. They were on page 5 in the original Word document (CorrectPageNumbers.docx). The conversion to PDF seems to have affected if the table fit on the page. The table should have matched what it was in Word and then I think the page numbers would be correct.
To do the conversion, I am just loading the document and saving as pdf:
Document doc = new Document("CorrectPageNumbers.docx");
doc.save("IncorrectPageNumbers_Aspose.pdf");
I have included my input document and the output I am getting from Aspose. I have also included the file “CorrectPageNumbers_Word.pdf” which is the result using Word directly to produce the PDF.
IncorrectPageNumbers.zip (128.2 KB)