ByteScout tutorials are designed to explain the code for both VB.NET beginners and advanced programmers. ByteScout PDF SDK: the component to help programmers in generating new pdf files, modifying and updating existing pdf documents or pdf forms. Provides support for auto-filling pdf forms, adding text with adjustable font, style, size, font family, new form fields, vector and raster drawings. It can create URI link action in PDF in VB.NET.
Fast application programming interfaces of ByteScout PDF SDK for VB.NET plus the instruction and the code below will help you quickly learn how to create URI link action in PDF. 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! Implementing VB.NET application typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.
Trial version of ByteScout PDF SDK is available for free. Source code samples are included to help you with your VB.NET app.
Imports Bytescout.PDF ''' <summary> ''' This example demonstrates how to create URI (link) action. ''' </summary> Class Program Shared Sub Main() ' Create new document Dim pdfDocument = New Document() pdfDocument.RegistrationName = "demo" pdfDocument.RegistrationKey = "demo" ' Add page Dim page = New Page(PaperFormat.A4) pdfDocument.Pages.Add(page) ' Add button Dim button = New PushButton(20, 20, 150, 25, "button1") button.Caption = "BYTESCOUT.COM" ' Add URI action Dim action = New URIAction(New Uri("https://bytescout.com/")) button.OnActivated = action page.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