Hello.
We encountered an issue when creating PDF document from Word Table of content. After conversion generated pdf has three pages with the third page completely blank.
Attached is the zip archive containing the input Word document TocWithUpdatedPageNumbers.docx and generated PDF TocWithUpdatedPageNumbers_2401.pdf (used Aspose.Word for Java version 24.1) and the following sample code snippet:
final static String FILE_FOLDER = "/scratch/tmp/testAsposeWords/";
final Document doc = new Document(FILE_FOLDER + "TocWithUpdatedPageNumbers.docx");
// save the base Doc as PDF
final String pdfFile = FILE_FOLDER + "TocWithUpdatedPageNumbers_2401.pdf";
Files.deleteIfExists(Paths.get(pdfFile));
doc.updatePageLayout();
doc.save(pdfFile, new PdfSaveOptions());
System.out.println("Created merged PDF File: " + pdfFile);
Is there any setting that allows to detect if there is blank page at the end of generated PDF, and if so - to remove it?
Thanks in advance.
TocWithUpdatedPageNumbers.zip (55.2 KB)