Pdf bookmarks list count not getting accurately

Hi,


The pdf bookmarks count is not getting accurately.
my code and sample pdf file mentioned Here

PdfBookmarkEditor bookmarkEditor = new PdfBookmarkEditor();
//open PDF file
bookmarkEditor.BindPdf(“outputwb3344.pdf”));
//extract bookmarks
Aspose.Pdf.Facades.Bookmarks bookmarks = bookmarkEditor.ExtractBookmarks();
foreach (Aspose.Pdf.Facades.Bookmark bookmark in bookmarks)
{
string strLevelSeprator = string.Empty;
for (int i = 1; i < bookmark.Level; i++)
{
strLevelSeprator += “----”;
}

Response.Output.Write("{0}Title: {1}", strLevelSeprator, bookmark.Title);
Response.Output.Write("{0}Page Number: {1}", strLevelSeprator, bookmark.PageNumber);
Response.Output.Write("{0}Page Action: {1}
", strLevelSeprator, bookmark.Action);
}



HI,

i am not able to get PDF Bookmarks count accurately.
My code is mentioned below,the sample PDFfile attached here

PdfBookmarkEditor bookmarkEditor = new PdfBookmarkEditor();
//open PDF file
bookmarkEditor.BindPdf(“outputwb3344.pdf”));
//extract bookmarks
Aspose.Pdf.Facades.Bookmarks bookmarks = bookmarkEditor.ExtractBookmarks();
foreach (Aspose.Pdf.Facades.Bookmark bookmark in bookmarks)
{
string strLevelSeprator = string.Empty;
for (int i = 1; i < bookmark.Level; i++)
{
strLevelSeprator += “----”;
}

Response.Output.Write("{0}Title: {1}", strLevelSeprator, bookmark.Title);
Response.Output.Write("{0}Page Number: {1}", strLevelSeprator, bookmark.PageNumber);
Response.Output.Write("{0}Page Action: {1}
", strLevelSeprator, bookmark.Action);
}

Hi Dheeraj,


Thanks for contacting support.

I have tested the scenario using Aspose.Pdf for .NET 9.3.0 in Web form application and as per my observations, correct count and values of bookmarks are being returned. I am getting following output over the console.

Title: bookmark1
Page Number: 1
Page Action: GoTo
Title: bookmark2
Page Number: 1
Page Action: GoTo
Title: bookmark3
Page Number: 1
Page Action: GoTo
Title: bookmark1
Page Number: 3
Page Action: GoTo
Title: bookmark2
Page Number: 3
Page Action: GoTo
Title: bookmark3
Page Number: 3
Page Action: GoTo

Hi Dheeraj,


Thanks for your inquiry. As your query is related to Aspose.Pdf API, I am moving your thread in Aspose.Pdf forum where you will be guided appropriately.

Best regards,

Still i am not getting the Bookmarks list count,i am using (9.3.0 Trail version dll), as you told i am using the Aspose.Pdf for .NET 9.3.0 version dll


Hi Dheeraj,

You might not be getting correct Bookmark count because you are using the API in trial mode. Please note that there are some limitations when using the API in trial/evaluation mode, so I would suggest you to please request a 30 days temporary license to test the APi without any limitations. For further information, please visit Get a temporary license.

In case you still face the same issue or you have any further query, please feel free to contact.