VB.NET PDF: How to HTML5 PDF Viewer PDF Create PDF Export File & Page Process PDF Read PDF Write Form Process Document Protect Annotation & Drawing PDF Print WPF PDF Viewer Work with Other SDKs Barcode Read Barcode Create OCR Twain
Link: Edit URL
Home ›› XDoc.PDF ›› VB.NET PDF: Edit URL

VB.NET PDF - Edit PDF Hyperlink (url) in VB.NET

VB.NET Sample Code to Help to Insert a Hyperlink to Specified PDF Document Page in VB.NET Class

XDoc.PDF SDK for Visual Basic .NET project, able to edit hyperlink in PDF document in Visual Studio .NET

Support .NET WinForms, ASP.NET MVC in IIS, ASP.NET Ajax, Azure cloud service, DNN (DotNetNuke), SharePoint

Empower to create and insert clickable and active html links to PDF document

Able to embed link to specific PDF pages in VB.NET program

Easy to put link into specified position, such as PDF text, image and PDF table

Delete or remove partial or all hyperlinks from PDF file in VB.NET class

Copy, cut and paste PDF link to another PDF file in VB.NET project

Extract and search url in existing PDF file in VB.NET

Link access to variety of objects, including website, image, document, bookmark, PDF page number, flash, etc

Keep Microsoft Office Word, Excel and PowerPoint links in PDF document

Make PDF link open in a new window, blank page or tab

Edit PDF url in preview without adobe PDF reader control

Free library and control for .NET framework and easy to be integrated in .NET WinForms and ASP.NET

Accessible online VB.NET class source codes

Similar to C#.NET RasterEdge PDF SDK, VB.NET PDF SDK offers a variety of PDF file editing options, such as editing PDF document hyperlink and navigation links. By using specific PDF editing APIs, VB.NET users will be able to add a url to specified area on PDF page and edit hyperlinks within the document. This online tutorial will give a Visual Basic sample code to illustrate how to add and edit PDF hyperlink in PDF document.

VB.NET Demo Code: Insert Hyperlink to PDF

Add necessary references:









Use corresponding namespaces;

  using RasterEdge.Imaging.Basic;

  using RasterEdge.XDoc.PDF;

After integrating XDoc.PDF for .NET SDK to VB.NET project, you may use the following programming demo to add a hyperlink to input PDF document.

' Define input and output documents.
Dim inputFilePath As String = Program.RootPath + "\\" + "1.pdf"
Dim outputFilePath As String = Program.RootPath + "\\" + "Output.pdf"

' Open a PDF file.
Dim doc As PDFDocument = New PDFDocument(inputFilePath)

' Get the 1st page.
Dim page As PDFPage = doc.GetPage(0)

' Set a rectangle area starting from Point (0, 0) with width 400, height 200 pixels (in 96 dpi).
Dim linkAnnotBoundary As RectangleF = New RectangleF(0, 0, 400, 200)

' Set URL value.
Dim uri As String = "http://www.google.com"

' Create the annotation.
Dim annot As PDFAnnotLink = New PDFAnnotLink()
annot.Uri = uri

' Add annotation to the page.

' Save to a new file.