Foxit PDF SDK for Web

Foxit PDF SDK for Web: Redaction

Programmatically search and sensor sensitive information in a document for legal or security purposes to keep customer and employee information safe. Achieve full GDPR-compliance with Foxit’s powerful technology.

Our redaction module applies annotations to block sensitive information in a document. Only a dark line will show in the place of the content in the front-end and no sensitive data is kept in the meta information. Our technology utilizes a process that ensures redacted material is deleted and the blacked out (redacted) areas become images, stopping someone being able to access the sensitive information underneath.

Take a look at the sample code below to get started with redacting a defined area of a PDF.

How to Programmatically Redact an area with PDF SDK for Web

//redact pages
var pdfViewer = await pdfui.getPDFViewer();
var pdfdoc = await pdfViewer.getCurrentPDFDoc();
var redact = await pdfdoc.makeRedactByPages([0])
await redact[0][0].apply()

//Redact area
var options = {
bottom: 586.2299349240782,
left: 67.04121475054231,
right: 170.590021691974,
top: 597.5140997830804
}
var pdfViewer = await pdfui.getPDFViewer();
var pdfdoc = await pdfViewer.getCurrentPDFDoc();
var page = await pdfdoc.getPageByIndex(0);
var redact = await page.markRedactAnnot([options]);
await redact[0].apply()

Updated on June 30, 2021

Was this article helpful?
Thanks for your feedback. If you have a comment on how to improve the article, you can write it here: