Hi,
I tried the following code to generate pdf from the docx file. My requirement is to generate pdf with bookmarks.
code:
Document doc = new Document("input.doc");
PdfOptions pdfOptions = new PdfOptions();
pdfOptions.HeadingsOutlineLevels = 3;
pdfOptions.ExpandedOutlineLevels = 1;
doc.SaveToPdf(0, doc.PageCount, "output.pdf", pdfOptions);
It works correctly when there is a table of contents page on the docx file. They appear as links and also they appear in bookmarks tab on pdf reader.
When I used a word document without table of contents page, I want to main headings and sub headings appear as bookmarks on pdf reader. But they doesn’t appear as bookmarks with the above code.( Please look on following attachments.)
If there is a way to appear those headings in pdf bookmarks tab with Aspose please let me know.
Thanks