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

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

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

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

Continuous learning is a crucial part of computer science and this tutorial shows how to create bookmarks in pdf with pdf sdk in VB.NET

Every ByteScout tool includes simple example VB.NET source codes that you can get here or in the folder with installed ByteScout product. ByteScout Premium Suite is the bundle that includes twelve SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording. It can create bookmarks in pdf with pdf sdk in VB.NET.

These VB.NET code samples for VB.NET guide developers to speed up coding of the application when using ByteScout Premium Suite. This VB.NET sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Want to see how it works with your data then code testing will allow the function to be tested and work properly.

The trial version of ByteScout Premium Suite can be downloaded for free from our website. It also includes source code samples for VB.NET and other programming languages.

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 Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium 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 Premium Suite Home Page

Explore ByteScout Premium Suite Documentation

Explore Samples

Sign Up for ByteScout Premium Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next