Tech Specs
How-to C#
How-to VB.NET
C# PDF: How to PDF Create PDF Export File and Page Process PDF Read PDF Write Form Process Document Protect Annotation & Drawing PDF Print WPF Viewer & Editor Work with Other SDKs Barcode Read Barcode Create OCR Twain
Redact Pages
Home ›› XDoc.PDF ›› C# PDF: Redact Pages

C#.NET PDF SDK - Redact Entire PDF Pages in C#.NET

How to Redact the Whole PDF Pages in Visual C# Class with .NET PDF Component

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.

A best .NET PDF document manipulation SDK control for Visual Studio .NET can help to protect adobe PDF file with redaction functionalities using C#

Free online C# source code to darken pages from adobe PDF file in Visual C#. NET program without adobe reader installed

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

Free evaluation library and components for erasing PDF page in all C#.NET WinForms application

Able to black out PDF page online in ASP.NET WebForm application

Support to adjust color and transparency while scraping text from PDF file in .NET framework

Able to redact a range of selected pages in PDF document

Support to redact whole PDF pages in Visual Studio .NET

Redaction is the process of permanently removing visible text and graphics from a document. You can call our redact function API to redact entire PDF pages. You can specify custom text to appear over the redaction area.

C# Demo Code for Erasing Whole PDF Pages in C#.NET

Add necessary references:









Use corresponding namespaces;

  using RasterEdge.Imaging.Basic;

  using RasterEdge.XDoc.PDF;

Note: When you get the error "Could not load file or assembly 'RasterEdge.Imaging.Basic' or any other assembly or one of its dependencies. An attempt to load a program with an incorrect format", please check your configure as follows:


       If you are using x64 libraries/dlls, Right click the project -> Properties -> Build -> Platform target: x64.


       If using x86, the platform target should be x86.

This C# coding example describes how to redact whole PDF pages.

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

//  open document
PDFDocument doc = new PDFDocument(inputFilePath);
//  get the 1st page
PDFPage page = (PDFPage)doc.GetPage(0);

//  create redaction option
RedactionOptions options = new RedactionOptions();
options.AreaFillColor = Color.Black;

//  redact the whole page
//  output file