ByteScout Premium Suite - VB.NET - Add javascript action in pdf with pdf sdk - ByteScout

ByteScout Premium Suite – VB.NET – Add javascript action in pdf with pdf sdk

  • Home
  • /
  • Articles
  • /
  • ByteScout Premium Suite – VB.NET – Add javascript action in pdf with pdf sdk

How to add javascript action in pdf with pdf sdk in VB.NET and ByteScout Premium Suite

Step-by-step tutorial on how to add javascript action in pdf with pdf sdk in VB.NET

Add javascript action in pdf with pdf sdk is simple to apply in VB.NET if you use these source codes below. 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 be applied to add javascript action in pdf with pdf sdk using 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 Premium Suite for add javascript action 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! Applying VB.NET application mostly includes various stages of the software development so even if the functionality works please test it with your data and the production environment.

You can download free trial version of ByteScout Premium Suite from our website to see and try many others 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 add JavaScript actions to document events. ''' </summary> Class Program Shared Sub Main() ' Create new document Dim pdfDocument = New Document() pdfDocument.RegistrationName = "demo" pdfDocument.RegistrationKey = "demo" ' Add page pdfDocument.Pages.Add(New Page(PaperFormat.A4)) ' Add action to document open event Dim onOpenDocument = New JavaScriptAction("app.alert(""OnOpenDocument"",3)") pdfDocument.OnOpenDocument = onOpenDocument ' Add action to document close event Dim onBeforeClosing = New JavaScriptAction("app.alert(""OnBeforeClosing"",3)") pdfDocument.OnBeforeClosing = onBeforeClosing ' 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