ByteScout PDF SDK - VB.NET - Add GoTo Action 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 – Add GoTo Action in PDF

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF SDK – VB.NET – Add GoTo Action in PDF

How to add goto action in PDF in VB.NET using ByteScout PDF SDK

This tutorial will show how to add goto action in PDF in VB.NET

With this source code sample you may quickly learn how to add goto action in PDF in VB.NET. ByteScout PDF SDK is the pdf library that can create, update and modify PDF files. Supports text with fonts and style selections, layers, form fields, drawing lines and objects, automatic tables, images. Can be used to create and fill pdf forms. It can add goto action in PDF in VB.NET.

You will save a lot of time on writing and testing code as you may just take the VB.NET code from ByteScout PDF SDK for add goto action in PDF below and use it in your application. 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! Further enhancement of the code will make it more vigorous.

Our website provides trial version of ByteScout PDF SDK for free. It also includes 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 a button with GoTo action. ''' </summary> Class Program Shared Sub Main() ' Create new document Dim pdfDocument = New Document() pdfDocument.RegistrationName = "demo" pdfDocument.RegistrationKey = "demo" ' Add pages Dim page1 = New Page(PaperFormat.A4) pdfDocument.Pages.Add(page1) Dim page2 = New Page(PaperFormat.A4) pdfDocument.Pages.Add(page2) Dim font = New Font(StandardFonts.Times, 18) Dim brush = New SolidBrush() ' Mark action target with text page2.Canvas.DrawString("Action target", font, brush, 20, 200) ' Create button Dim button = New PushButton(20, 20, 100, 25, "button1") button.Caption = "Go To Page 2" ' Create action to go to page 2 at 200 points from the top button.OnActivated = New GoToAction(New Destination(page2, 200)) page1.Annotations.Add(button) ' 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