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
Text: Delete Text from PDF
Home ›› XDoc.PDF ›› VB.NET PDF: Delete Text from PDF

VB.NET PDF - How to Delete Text from PDF File in VB.NET

VB.NET Programming Guide to Delete Text from PDF File Using XDoc.PDF SDK for 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.

Free VB.NET PDF SDK library for deleting PDF text in Visual Studio .NET application

Delete text from PDF file in preview without adobe PDF reader component installed

Able to pull text out of selected PDF page or all PDF document in .NET WinForms application

Able to delete text characters at specified position from PDF

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

Functionality to remove text format by modifying text font, size, color, etc

Other PDF edit functionalities, like add PDF text, add PDF text box and field

Online .NET framework freeware download and VB.NET class source code

A Professional VB.NET PDF edit control compatible with any Windows system

In document management system, users may have the need of deleting content from PDF document, like text characters. As a qualified PDF text edit control, RasterEdge .NET PDF SDK is such a VB.NET solution that allows programmers to integrate mature text deletion functionality into .NET projects. Basically, you can use robust APIs to select a PDF page, define the text character position, and remove it from PDF document.

This page with guide you with a sample code for how to delete text from PDF in VB.NET class. Furthermore, if you are a Visual C# .NET programmer, you can go to this Visual C# tutorial for PDF text deletion in .NET project.

VB.NET: Delete a Character in PDF Page

Add necessary references:









Use corresponding namespaces;

  using RasterEdge.Imaging.Basic;

  using RasterEdge.XDoc.PDF;

To help you have a quick start, we provide a piece of simple VB.NET sample code here. It demonstrates how to delete a character in the first page of sample PDF file with the location of (123F, 187F).

' open a document
Dim inputFilePath As String = Program.RootPath + "\\" + "1.pdf"
Dim doc As PDFDocument = New PDFDocument(inputFilePath)
' get a text manager from the document object
Dim textMgr As PDFTextMgr = PDFTextHandler.ExportPDFTextManager(doc)

' get the first page from the document
Dim pageIndex As Integer = 0
Dim page As PDFPage = doc.GetPage(pageIndex)

' select char at position (127F, 187F)
Dim cursor As PointF = New PointF(127.0F, 187.0F)
Dim aChar As PDFTextCharacter = textMgr.SelectChar(page, cursor)

' delete a selected character

' output the new document
Dim outputFilePath As String = Program.RootPath + "\\" + "output.pdf"