ByteScout PDF Suite - VB.NET - Create bookmarks in pdf with pdf sdk - ByteScout

ByteScout PDF Suite – VB.NET – Create bookmarks in pdf with pdf sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Suite – VB.NET – Create bookmarks in pdf with pdf sdk

How to create bookmarks in pdf with pdf sdk in VB.NET with ByteScout PDF Suite

Learn to code in VB.NET to create bookmarks in pdf with pdf sdk with this step-by-step tutorial

An easy to understand guide on how to create bookmarks in pdf with pdf sdk in VB.NET with this source code sample. ByteScout PDF Suite is the set that includes 6 SDK products to work with PDF from generating rich PDF reports to extracting data from PDF documents and converting them to HTML. This bundle includes PDF (Generator) SDK, PDF Renderer SDK, PDF Extractor SDK, PDF to HTML SDK, PDF Viewer SDK and PDF Generator SDK for Javascript and you can use it to create bookmarks in pdf with pdf sdk with VB.NET.

Want to save time? You will save a lot of time on writing and testing code as you may just take the VB.NET code from ByteScout PDF Suite for create bookmarks in pdf with pdf sdk below and use it in your application. Simply copy and paste in your VB.NET project or application you and then run your app! Check VB.NET sample code samples to see if they respond to your needs and requirements for the project.

ByteScout provides the free trial version of ByteScout PDF Suite along with the documentation and source code samples.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.vb
      
Imports Bytescout.PDF ''' <summary> ''' This example demonstrates how to create document outlines (bookmarks). ''' </summary> Class Program Shared Sub Main() ' Create new document Dim pdfDocument = New Document() pdfDocument.RegistrationName = "demo" pdfDocument.RegistrationKey = "demo" Dim font = New Font(StandardFonts.Times, 18) Dim brush = New SolidBrush() ' Create pages For i As Integer = 0 To 2 Dim page = New Page(PaperFormat.A4) page.Canvas.DrawString(String.Format("Page {0}", i + 1), font, brush, 20, 20) pdfDocument.Pages.Add(page) Next ' Create outlines: Dim destination1 = New Destination(pdfDocument.Pages(0)) Dim outline1 = New Outline("Page 1", destination1) pdfDocument.Outlines.Add(outline1) ' Example of sub-bookmark Dim destination2 = New Destination(pdfDocument.Pages(1)) Dim outline2 = New Outline("Page 2", destination2) pdfDocument.Outlines(0).Kids.Add(outline2) Dim destination3 = New Destination(pdfDocument.Pages(2)) Dim outline3 = New Outline("Page 3", destination3) pdfDocument.Outlines.Add(outline3) ' Force PDF viewer to show Bookmarks panel at start up. pdfDocument.PageMode = PageMode.Outlines ' Save document to file pdfDocument.Save("result.pdf") ' Cleanup pdfDocument.Dispose() ' Open document in default PDF viewer app Process.Start("result.pdf") End Sub End Class

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next