Bookmarks in converted PDF document

Hi,

I used Aspose Words to convert a word document to a pdf document. But converted pdf document do not have bookmarks. I used the following code to generate pdf document.

Document doc = new Document(wordFile);
doc.save(pdfFile);

Could you please help me in getting these bookmarks from word document to a pdf document.

Thanks,
Spoorthy

Hello
Thanks for your inquiry. Have you tried specifying BookmarksOutlineLevel?
https://reference.aspose.com/words/java/com.aspose.words/outlineoptions/#getDefaultBookmarksOutlineLevel
Hope this helps.
Best regards,

Thanks for the reply.

I checked for this in the documentation where I overlooked this API.

Hi
Please feel free to ask me in case of any issues.
Best regards,

Hi,

I expected to display TOC as bookmarks content. But user defined bookmarks of the word document are shown as bookmarks in pdf. I tried with bookmark levels 1 & 2.

What can be done to display TOC as bookmarks content?

Hi
Thanks for your inquiry. In this case you should use HeadingsOutlineLevels instead of BookmarksOutlineLevel
https://reference.aspose.com/words/java/com.aspose.words/outlineoptions/#getHeadingsOutlineLevels
Hope this helps.
Best regards,

A post was split to a new topic: Convert document into .pdf. and see/parse the Bookmarks