ByteScout PDF SDK - VB.NET - Create Bookmarks in PDF - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout PDF SDK – VB.NET – Create Bookmarks in PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – VB.NET – Create Bookmarks in PDF

How to create bookmarks in PDF in VB.NET and ByteScout PDF SDK

The tutorial shows how to create bookmarks in PDF in VB.NET

Source code documentation samples provide quick and easy way to add a required functionality into your application. ByteScout PDF SDK is the library for pdf documents generation, modification and updates. Can also generate and fill PDF forms. Provides support for text (fonts, style, size, font family), layers, pdf form fields, vector and raster drawings. It can create bookmarks in PDF in VB.NET.

VB.NET code samples for VB.NET developers help to speed up coding of your application when using ByteScout PDF SDK. Just copy and paste the code into your VB.NET application’s code and follow the instruction. Use of ByteScout PDF SDK in VB.NET is also explained in the documentation included along with the product.

Free trial version of ByteScout PDF SDK is available for download from our website. Get it to try other source code samples for VB.NET.

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 SDK Home Page

Explore ByteScout PDF SDK Documentation

Explore Samples

Sign Up for ByteScout PDF SDK 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 SDK Home Page

Explore ByteScout PDF SDK Documentation

Explore Samples

Sign Up for ByteScout PDF SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next