Issue with Level 2 bookmarks


#1

I have the following xml code intended to create four Level 1 bookmarks, each with one Level 2 bookmark.

<Pdf xmlns=“Aspose.Pdf”>
<Section ID=‘Section1’>
<Heading ID=‘TOCHeading1’ Level=“1” IsAutoSequence=“false” IsInList=“true”>
Section 1 – Heading Level 1</Segment>
</Heading>
<Heading ID=‘TOCHeading1a’ Level=“2” IsAutoSequence=“false” IsInList=“true”>
Section 1 – Heading Level 2</Segment>
</Heading>

<Section ID=‘Section2’>
<Heading ID=‘TOCHeading2’ Level=“1” IsAutoSequence=“false” IsInList=“true”>
Section 2 – Heading Level 1</Segment>
</Heading>
<Heading ID=‘TOCHeading2a’ Level=“2” IsAutoSequence=“false” IsInList=“true”>
Section 2 – Heading Level 2</Segment>
</Heading>

<Section ID=‘Section3’>
<Heading ID=‘TOCHeading3’ Level=“1” IsAutoSequence=“false” IsInList=“true”>
Section 3 – Heading Level 1</Segment>
</Heading>
<Heading ID=‘TOCHeading3a’ Level=“2” IsAutoSequence=“false” IsInList=“true”>
Section 3 – Heading Level 2</Segment>
</Heading>

<Section ID=‘Section4’>
<Heading ID=‘TOCHeading4’ Level=“1” IsAutoSequence=“false” IsInList=“true”>
Section 4 – Heading Level 1</Segment>
</Heading>
<Heading ID=‘TOCHeading4a’ Level=“2” IsAutoSequence=“false” IsInList=“true”>
Section 4 – Heading Level 2</Segment>
</Heading>




My expected output in the Bookmark tab is:

Section 1 – Heading Level 1
…Section 1 – Heading Level 2
Section 2 – Heading Level 1
…Section 2 – Heading Level 2
Section 3 – Heading Level 1
…Section 3 – Heading Level 2
Section 4 – Heading Level 1
…Section 4 – Heading Level 2

Instead, I get the following output:

Section 1 – Heading Level 1
…Section 1 – Heading Level 2
…Section 2 – Heading Level 2
…Section 3 – Heading Level 2
…Section 4 – Heading Level 2
Section 2 – Heading Level 1
Section 3 – Heading Level 1
Section 4 – Heading Level 1

Any ideas what I’m doing wrong?

Thanks,
Pam


#2

Dear Pam,

Thank you for considering Aspose.

You should add the "ListSection" at the begin as the following:





Section 1 -- Heading Level 1


Section 1 -- Heading Level 2



Section 2 -- Heading Level 1


Section 2 -- Heading Level 2



Section 3 -- Heading Level 1


Section 3 -- Heading Level 2



Section 4 -- Heading Level 1


Section 4 -- Heading Level 2




You can also set the formatting of the TOC in the ListSection. Please refer to Table of Contents,List of Tables and List of Figures.


#3

I think I did not explain the issue well enough…

I do not have or want a TOC. I simply want bookmarks to show up correctly in the Bookmark tab of the pdf document. When I added the ListSection as you suggested, I got a TOC that was formatted correctly, but the bookmark tab was still incorrectly ordered.

I’ve attached a bitmap showing the TOC and the Bookmark tab of my document. Please notice that the item called “Assumed Constants” is correctly underneath the “Return on Investment”, but in the Boormark tab, the “Assumed Constants” item is INCORRECTLY underneath the “Product Plans” item.

Thanks,
Pam


#4

Dear Pam,

Thank you for considering Aspose.

Sorry I have misunderstood you. I have reproduced this bug and I will fix it soon.


#5

Dear Pam,

Thank you for considering Aspose.

I have fixed this bug. Please download hotfix here.


#6

Thanks! The hotfix appears to resolve this issue.