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
Redact Pages
Home ›› XDoc.PDF ›› VB.NET PDF: Redact Pages

VB.NET PDF - Redact Entire PDF Pages in VB.NET

Enable VB.NET Users to Redact PDF Pages to Protect PDF Document in VB.NET Project

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.


If you need to permanently removing visible text and graphics from a document. Please try the following VB.NET code, which supports VB.NET users to call our redact function API and redact entire PDF pages. In addition, you can specify custom text to appear over the redaction area.

Redact PDF Whole Pages Using VB.NET

Add necessary references:









Use corresponding namespaces;

  using RasterEdge.Imaging.Basic;

  using RasterEdge.XDoc.PDF;

This VB.NET coding example shows you how to redact whole PDF pages.

Dim inputFilePath As String = Program.RootPath + "\\" + "1.pdf"
Dim outputFilePath As String = Program.RootPath + "\\" + "output.pdf"

' open document
Dim doc As PDFDocument = New PDFDocument(inputFilePath)
' get the 1st page
Dim page As PDFPage = doc.GetPage(0)

' create redaction option
Dim options As RedactionOptions = New RedactionOptions()
options.AreaFillColor = Color.Black

' redact the whole page
' output file