The coding tutorials are designed to help you test the features without need to write your own code. ByteScout PDF SDK: 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 javascript action in PDF in VB.NET.
This code snippet below for ByteScout PDF SDK works best when you need to quickly add javascript action in PDF in your VB.NET application. Follow the instructions from the scratch to work and copy the VB.NET code. Test VB.NET sample code examples whether they respond your needs and requirements for the project.
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)
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
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
also available as: