The Syncfusion .NET PDF library provides an easy way to permanently remove confidential or sensitive information from PDF documents with just a few lines of code. This feature complies with privacy laws such as GDPR.
This feature works seamlessly across platforms, including Windows, macOS, Linux, Android, and iOS through any .NET-based applications, such as ASP.NET Core, ASP.NET MVC, Blazor, .NET MAUI, Xamarin, WinForms, WPF, and WinUI.
Remove the confidential content from the page in the PDF document with just a few lines of C# code, as demonstrated in the following code.
using Syncfusion.Pdf.Parsing;
using Syncfusion.Pdf.Redaction;
using Syncfusion.Pdf;
using Syncfusion.Drawing;
using (FileStream docStream = new FileStream(@"Input.pdf", FileMode.Open, FileAccess.Read))
{
//Load the PDF document from the input stream
using (PdfLoadedDocument loadedDocument = new PdfLoadedDocument(docStream))
{
// Get the first page of the loaded document
PdfLoadedPage firstPage = loadedDocument.Pages[0] as PdfLoadedPage;
// Create a PDF redaction for the specified rectangle on the page
RectangleF redactionRectangle = new RectangleF(340, 120, 140, 20);
PdfRedaction redaction = new PdfRedaction(redactionRectangle);
// Add the redaction to the first page
firstPage.AddRedaction(redaction);
// Redact the contents from the PDF document
loadedDocument.Redact();
// Save the redacted PDF document to a file stream
using (FileStream outputFileStream = new FileStream("Redact.pdf", FileMode.Create, FileAccess.ReadWrite))
{
loadedDocument.Save(outputFileStream);
}
}
}
Discover how the Redact PDF feature removes content from PDF documents with various options.
Mark sensitive or confidential data programmatically and forward it to the next person for further review and approval before redacting.
Remove sensitive or confidential text, images, areas, or entire pages permanently from the PDF documents using the PDF redaction support.
Draw the overlay text on the redacted area and customize it with a different font, style, color, and brush.
Redact the information from a page by drawing an image on the redacted area. This will completely remove the content from the PDF document and apply the image over the redacted area.
Discover valuable resources from our blog and knowledge base articles to enhance your efficiency in the Redact PDF feature.
Explore these resources for comprehensive guides, knowledge base articles, insightful blogs, and ebooks.
Product Updates
Technical Support
Redaction is the process of permanently removing or obscuring sensitive or confidential information from a document. This is typically done to protect sensitive data from unauthorized access or disclosure.
Yes, the redaction feature permanently removes the content from the PDF document.
Yes, you can redact images in a PDF document using the Syncfusion .NET PDF library.
You might need to redact a PDF document to safeguard personal information, comply with privacy regulations, protect classified data, or ensure confidentiality in legal or business documents.
No, you can’t recover the redacted content from the PDF document because it is deleted permanently.
Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.