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

Free Support Forum - aspose.com

Bookmarks position wrong for headers in pagbreak paragraph


our customer pointed out a PDF rendition issue related to the positioning of the PDF bookmark converted from the Word index.

We found that the issue is due to the Aspose.words to PDF transformation positioning the bookmark link to a coordinate in the middle or top of the bookmark.

This only happens when the heading is in the same paragraph as the pagebreak. (position of header accessed by Ctrl+Enter, then arrokey left).

Aspose_DS-647.png (46.6 KB)

The bookmark position seems correct when exporting the doc from word as pdf, or when using another PDF printer.
Our guess is that either the other PDF printers point to the bottom of the bookmark position, or do not interpret the pagebreak and page whitespace as part of the bookmark,

in the attached zip you will find a sample test document and resulting PDFs for Aspose and pdfPrinter,

PS: we are using Aspose Words for java 17.6


DS-647.zip (436.0 KB)


Thanks for your inquiry. We have tested the scenario using latest version of Aspose.Words for Java 17.8 with following code example and have not found the shared issue. Please use Aspose.Words for Java 17.8. We have attached the output PDF with this post for your kind reference. 17.8.pdf (43.0 KB)

Document doc = new Document(MyDir + "DS-647.docx");
PdfSaveOptions options = new PdfSaveOptions();
doc.save(MyDir + "17.8.pdf", options);

Thank you,

we tried with words 17.8 and the bookmark now points to the correct position in the PDF



Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.