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

# After converting docx to pdf, the nested bookmark and its child bookmarks lose the parent-child relationship

After converting docx to pdf, the nested bookmark and its child bookmarks lose the parent-child relationship.
The result i expected:
person
–name
–age
–sex
Actual result:
person
age
sex
They are at the same level.
expected.png (1.1 KB)
result.png (766 Bytes)
1111.docx (12.5 KB)

@asukavon You can use BookmarksOutlineLevels to set output level of individual bookmarks in in your document. For example see the following code, which gives almost the expected result:

Document doc = new Document("C:\\Temp\\in.doc");

PdfSaveOptions opt = new PdfSaveOptions();

Almost, because bookmarks appear in the same order as they are in the document and in your document bookmark name starts before the bookmark person.