Attached PDF returns zero for all bookmark.pagnumber


#1

Attached PDF returns zero for all bookmark.pagenumber. In acrobat when you click the bookmark, the viewer jumps to the correct page. I need to access the page number of each book mark. see file attached.

Where can I attach the pdf?


#2

@salemantulsa

Thank you for contacting support.

You may please share it via Google Drive, Dropbox etc. if the size of ZIP file is bigger, otherwise attach it here by drag and drop in the post editor. Please also share SSCCE code and ensure using Aspose.PDF for .NET 19.10.


#3

Tonganoxie.pdf (1.4 MB)

Please keep this document private.
METHOD 1 Tried
Dim bookmarkEditor = New PdfBookmarkEditor()
bookmarkEditor.BindPdf(pdf2Print)
Dim bookmarks = bookmarkEditor.ExtractBookmarks()

        For Each Bookmark As Aspose.Pdf.Facades.Bookmark In bookmarks
            Debug.WriteLine(pdf2Print.Destinations.GetPageNumber(Bookmark.Destination, False))
        Next

        For Each outlineItem As Aspose.Pdf.OutlineItemCollection In pdf2Print.Outlines
            Console.WriteLine(outlineItem.HasNext)
            Console.WriteLine(pdf2Print.Destinations.GetPageNumber(outlineItem.Title, False))
            Dim action As Aspose.Pdf.Annotations.GoToAction = New Aspose.Pdf.Annotations.GoToAction
            action.Destination = outlineItem.Destination ' New Aspose.Pdf.Annotations.XYZExplicitDestination(pdf2Print.Pages(1), 0, 0, zoom)
            pdf2Print.OpenAction = action

        Next

METHOD 2 Tried
For Each outlineItem As Aspose.Pdf.OutlineItemCollection In pdf2Print.Outlines
Console.WriteLine(outlineItem.Title)
Console.WriteLine(outlineItem.Italic)
Console.WriteLine(outlineItem.Bold)
Console.WriteLine(outlineItem.Color)
Console.WriteLine(pdf2Print.Destinations.GetPageNumber(outlineItem.Title, False))
Next


#4

I need to get the page of the bookmarks in this file. I can get the bookmark.pagenumber in other PDF files. I am uncertain why this PDF returns 0 for the pagenumber. I have looked through your knowledge base for hours with no success.


#5

@salemantulsa

Thank you for the details.

We have been able to reproduce the issue in our environment. A ticket with ID PDFNET-47240 has been logged in our issue management system for further investigation and resolution. The ticket ID has been linked with this thread so that you will receive notification as soon as the ticket is resolved. Moreover, forum attachments are accessible to topic owner and Aspose staff only so your data is safe with us and will be used to rectify the problem only.

We are sorry for the inconvenience.


#6

Is there any status update yet?


#7

@salemantulsa

Please note that the issue has been logged under free support model and will be investigated on first come first serve basis. Therefore, it may take some months to resolve. As soon as we have some definite updates regarding ticket resolution, we will let you know.

Furthermore, we also offer paid support model where issues are resolved on urgent basis and have priority over the issues logged under free support model. You may check our Paid Support options for your reference.