Some test text!

Redact a PDF document

To redact content from a PDF document.

PDFTron Redactor makes sure that if a portion of an image, text, or vector graphics is contained in a redaction region, that portion of the image or path data is destroyed and is not hidden with clipping or image masks. PDFTron SDK API can also be used to review and remove metadata and other content that can exist in a PDF document, including XML Forms Architecture (XFA) content and Extensible Metadata Platform (XMP) content.

ArrayList rarr = new ArrayList();
rarr.Add(new Redactor.Redaction(1, new Rect(100, 100, 550, 600), false, "Top Secret"));
rarr.Add(new Redactor.Redaction(2, new Rect(30, 30, 450, 450), true, "Negative Redaction"));
rarr.Add(new Redactor.Redaction(2, new Rect(0, 0, 100, 100), false, "Positive"));
rarr.Add(new Redactor.Redaction(2, new Rect(100, 100, 200, 200), false, "Positive"));
rarr.Add(new Redactor.Redaction(2, new Rect(300, 300, 400, 400), false, ""));
rarr.Add(new Redactor.Redaction(2, new Rect(500, 500, 600, 600), false, ""));
rarr.Add(new Redactor.Redaction(3, new Rect(0, 0, 700, 20), false, ""));

Redactor.Appearance app = new Redactor.Appearance();
app.RedactionOverlay = true;
app.Border = false;
app.ShowRedactedContentRegions = true;

PDFDoc doc = new PDFDoc(input_path + "newsletter.pdf");
Redactor.Redact(doc, rarr, app, false, true);

PDF redaction
Full code sample which shows how to use 'pdftron.PDF.Redactor' to remove potentially sensitive content within PDF documents.

Get the answers you need: Support