Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
final Redactor redactor = new Redactor("Sample.docx");
try
{
// apply redaction
RedactorChangeLog result = redactor.apply(new ExactPhraseRedaction("John Doe", new ReplacementOptions(java.awt.Color.RED)));
if (result.getStatus() != RedactionStatus.Failed)
{
SaveOptions options = new SaveOptions();
options.getRasterization().setEnabled(true); // the same as options.RasterizeToPDF = true;
options.getRasterization().setCompliance(PdfComplianceLevel.PdfA1a); // by default PdfComplianceLevel.Auto or PDF/A-1b
options.setAddSuffix(true);
redactor.save(options);
}
}
finally { redactor.close(); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.