ByteScout Premium Suite - VBScript - Add goto action to pdf with pdf sdk - ByteScout

ByteScout Premium Suite – VBScript – Add goto action to pdf with pdf sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Premium Suite – VBScript – Add goto action to pdf with pdf sdk

How to add goto action to pdf with pdf sdk in VBScript using ByteScout Premium Suite

Step-by-step tutorial on how to add goto action to pdf with pdf sdk in VBScript

This sample source code below will display you how to add goto action to pdf with pdf sdk in VBScript. What is ByteScout Premium Suite? It is the bundle that includes twelve SDK products from ByteScout including tools and components for PDF, barcodes, spreadsheets, screen video recording. It can help you to add goto action to pdf with pdf sdk in your VBScript application.

Want to save time? You will save a lot of time on writing and testing code as you may just take the VBScript code from ByteScout Premium Suite for add goto action to pdf with pdf sdk below and use it in your application. Follow the instructions from scratch to work and copy the VBScript code. Want to see how it works with your data then code testing will allow the function to be tested and work properly.

You can download free trial version of ByteScout Premium Suite from our website with this and other source code samples for VBScript.

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

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

GoToAction.vbs
      
' This example demonstrates how to create a button with GoTo action. ' Create Bytescout.PDF.Document object Set pdfDocument = CreateObject("Bytescout.PDF.Document") pdfDocument.RegistrationName = "demo" pdfDocument.RegistrationKey = "demo" Set comHelpers = pdfDocument.ComHelpers ' Add page Set page1 = comHelpers.CreatePage(comHelpers.PAPERFORMAT_A4) pdfDocument.Pages.Add(page1) Set page2 = comHelpers.CreatePage(comHelpers.PAPERFORMAT_A4) pdfDocument.Pages.Add(page2) Set timesFont = comHelpers.CreateStandardFont(comHelpers.STANDARDFONTS_TIMES, 18) Set blackBrush = comHelpers.CreateSolidBrush(comHelpers.CreateColorGray(0)) ' Mark action target with text page2.Canvas.DrawString "Action target", (timesFont), (blackBrush), 20, 200 ' Create button Set button1 = comHelpers.CreatePushButton(20, 20, 100, 25, "button1") button1.Caption = "Go To Page 2" ' Create action to go to page 2 at 200 points from the top button1.OnActivated = comHelpers.CreateGoToAction(comHelpers.CreateDestination((page2), 200)) page1.Annotations.Add(button1) ' Save document to file pdfDocument.Save("result.pdf") ' Open document in default PDF viewer app Set shell = CreateObject("WScript.Shell") shell.Run "result.pdf", 1, false

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