![]() ![]() ' create a first level bookmark pointing to the second page Dim book2 As PdfBookmark = doc.AddBookmark( "Second page", _ ' create a first level bookmark pointing to the first page Dim book1 As PdfBookmark = doc.AddBookmark( "First page", _ ' create a new text element and add it to the third page Dim text3 As New PdfTextElement( 0, 0, "Third page", font) ' create a new text element and add it to the second page Dim text2 As New PdfTextElement( 0, 0, "Second page", font) ' create a new pdf font Dim font As PdfFont = doc.AddFont(PdfStandardFont.Helvetica)įont.Size = 14 ' create a new text element and add it to the first page Dim text1 As New PdfTextElement( 0, 0, "First page", font) ' define a rendering result object Dim result As PdfRenderingResult ' add a third page to the document Dim page3 As PdfPage = doc.AddPage() ' add a second page to the document Dim page2 As PdfPage = doc.AddPage() ![]() ' add a new page to the document Dim page1 As PdfPage = doc.AddPage() ' instruct the document to show the bookmarks panel when opened in a pdf viewerĭoc.ViewerPreferences.PageMode = PdfViewerPageMode.UseOutlines ' create a new pdf document Dim doc As New PdfDocument() PdfBookmark book = doc.AddBookmark( "Text 2", new PdfDestination(page2, add a level 2 bookmark to this text // (using the bookmark for the page 2 as parent and the text rendering // location as bookmark destination) some styles are set for this bookmark PdfTextElement text22 = new PdfTextElement( 0, 400, "Text 2 on page 2", font) add a level 2 bookmark to this text // (using the bookmark for the page 2 as parent and // the text rendering location as bookmark destination)ĭoc.AddBookmark( "Text 1", new PdfDestination(page2, PdfTextElement text21 = new PdfTextElement( 0, 100, "Text 1 on page 2", font) PdfBookmark book3 = doc.AddBookmark( "Third page", new PdfDestination(page3, create a first level bookmark pointing to the third page PdfBookmark book2 = doc.AddBookmark( "Second page", new PdfDestination(page2, ![]() create a first level bookmark pointing to the second page PdfBookmark book1 = doc.AddBookmark( "First page", new PdfDestination(page1, create a first level bookmark pointing to the first page PdfTextElement text3 = new PdfTextElement( 0, 0, "Third page", font) create a new text element and add it to the third page PdfTextElement text2 = new PdfTextElement( 0, 0, "Second page", font) create a new text element and add it to the second page PdfTextElement text1 = new PdfTextElement( 0, 0, "First page", font) create a new text element and add it to the first page PdfFont font = doc.AddFont(PdfStandardFont.Helvetica) instruct the document to show the bookmarks panel when opened in a viewerĭoc.ViewerPreferences.PageMode = PdfViewerPageMode.UseOutlines ![]() The bookmarks hierarchy can be changed using the Parent andĬhildNodes properties of the PdfBookmark object.īookmarks can be removed using the Bookmarks collection of the PdfDocument object.īookmarks have styles and colors that can be specified using the Style andĬolor properties of the PdfBookmark object. can be used to create a bookmark in the pdf document that has another existing bookmark as parent. The pdf viewer will jump to the destination specified in second parameter of the method.ĪddBookmark(String, PdfDestination, PdfBookmark) can be used to create a top level bookmark in the pdf document. Property and the corresponding PdfBookmarksCollection class.Ī bookmark can be added to a pdf document using one of the following methods: PdfDocument object handles the collection of bookmarks associated with it through the A bookmark is handled by the PdfBookmark class. Select.Pdf offers support for bookmarks creation and manipulation. When a bookmark item is clicked, the destination associated with it Serves as a table of contents for the pdf document, displaying its entire structure. The document outline consists of a tree-structured hierarchy of bookmarks. To make the navigation and content finding easier in a pdf document, pdf viewers can displayĪ document outline associated with the pdf document. Large documents are difficult to navigate. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |