Destination page number of specific bookmark

Discussions about PDF management.
Post Reply
hirenlad
Posts: 1
Joined: Mon Feb 03, 2014 1:28 pm

Destination page number of specific bookmark

Post by hirenlad » Mon Feb 03, 2014 1:46 pm

Hi
I am using GDPicture10 PDF Plugin.

In my application i want to create XML structure of Bookmark tree using GdPicturePDF Class. if i do some modification in below code then i think it will be working for me.

Code: Select all

    Private Sub parseOutlines(ByVal oGdPicturePDF As GdPicturePDF, ByVal bookmarkID As Integer, ByVal level As Integer)
            While True
                MessageBox.Show("Title: " + oGdPicturePDF.GetBookMarkTitle(bookmarkID) + ". level: " + level.ToString())
                'Check childs
                If oGdPicturePDF.GetBookMarkChildCount(bookmarkID) > 0 Then
                    parseOutlines(oGdPicturePDF, oGdPicturePDF.GetBookMarkFirstChildID(bookmarkID), level + 1)
                End If

                'Check for subsequent outlines
                bookmarkID = oGdPicturePDF.GetBookMarkNextID(bookmarkID)
                If bookmarkID = 0 Then
                    Exit While
                End If
            End While
        End Sub

        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Using oGdPicturePDF As New GdPicturePDF
                oGdPicturePDF.LoadFromFile("c:\outlines.pdf", False)
                parseOutlines(oGdPicturePDF, oGdPicturePDF.GetBookMarkRootID(), 0)
            End Using
        End Sub
But real problem is I want to specify Page Number with respected Bookmark in XML structure. and i cant able to fetch page number of bookmark where bookmark title jump to destination page.

So How can i Get destination page number of specific bookmark ?

Regards
Hiren Lad.

SamiKharma
Posts: 352
Joined: Tue Sep 27, 2011 11:47 am

Re: Destination page number of specific bookmark

Post by SamiKharma » Mon May 05, 2014 1:13 pm

Hi,

There is a complete example in the documentation:
https://www.gdpicture.com/guides/gdpicture/GdP ... ation.html

I hope this helps.

Best,
Sami

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest