Tech Specs
How-to VB.NET
How to Start Convert PDF Work with PDF Modules PDF Document PDF Pages Text Image Graph & Path Annotation, Markup & Drawing Redaction Security Digital Signature Forms Watermark Bookmark Link File Attachment File Metadata Printing Work with Other SDKs Barcode read Barcode create OCR Twain

VB.NET PDF - Highlight PDF Text in VB.NET

Online VB.NET Tutorial of How to Highlight Selected PDF Text on PDF Page in VB.NET

Look for HTML5 PDF Editor?

EdgePDF: ASP.NET PDF Editor is the best HTML5 PDF Editor and ASP.NET PDF Viewer based on XDoc.PDF, JQuery, HTML5. It supports ASP.NET MVC and WebForms projects.

Add Annotation – Highlight Text Overview

Users will often face the situation that you may need to emphasize the most important information from all text on a PDF page. Highlight text is such a functionality which allow users to give prominence to key words or sentences. RasterEdge XDoc.PDF SDK is a multifunctional PDF document annotation tool, which can highlight text with a simple piece of VB.NET programming demo code.

Since RasterEdge XDoc.PDF SDK is based on .NET framework 2.0, users are enabled to use it in any type of a 32-bit or 64-bit .NET application, including ASP.NET web service and Windows Forms for any .NET Framework version from 2.0 to 4.5.

How to VB.NET: Highlight Selected Text on PDF Page

Add necessary references:









Use corresponding namespaces;

  using RasterEdge.Imaging.Basic;

  using RasterEdge.XDoc.PDF;

This sample code shows how to highlight PDF text in VB.NET application.

Dim inputFilePath As String = Program.RootPath + "\\" + "2.pdf"
Dim outputFilePath As String = Program.RootPath + "\\" + "Annot_3.pdf"

' open a PDF file
Dim doc As PDFDocument = New PDFDocument(inputFilePath)
' get the 2nd page
Dim page As PDFPage = doc.GetPage(1)

' create the annotation
Dim annot As PDFAnnotHighlight = New PDFAnnotHighlight()

annot.StartPoint = New PointF(100.0F, 200.0F)
annot.EndPoint = New PointF(300.0F, 400.0F)

' add annotation to the page

' save to a new file