PDFsharp & MigraDoc Foundation

Page 1 of 1

Author:  emeshuris [ Mon Feb 26, 2007 7:25 pm ]
Post subject:  Bookmarks

I am trying to set a bookmark using migra doc lite.
The code below does not set a bookmark and it doesnt add a hyperlink field.
I dont need a hyperlink field, but it has a bookmark property so i thought it might do the trick.
Please review the code below, thanks in advance.


    Private Function SetDocument_Properties(ByVal iInvNum As Integer) As Document
        SetDocument_Properties = New Document
        Dim p As Paragraph

        With SetDocument_Properties
            With .Info
                .Title = "Packing Slips"
                .Subject = "Packing Slips"
                .Author = "SPI"
            End With

            With .LastSection
                p = .AddParagraph
                With p
                    .AddHyperlink(iInvNum.ToString, HyperlinkType.Bookmark)
                End With
            End With
        End With
    End Function

Author:  Stefan Lange [ Thu Mar 08, 2007 11:48 pm ]
Post subject: 

You use hyperlink not correctly.
See in sample HelloMigraDoc how the table of content is created. This illustrates the connection between bookmarks and hyperlinks and how to use them.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group