In order to reject specific changes during redaction process or to keep a full log of changes in the document, you need to set Redactor.RedactionCallback property, to a class implementing IRedactionCallback interface. The interface contains only one method, AcceptRedaction, which receives detailed information about proposed redaction and returns Boolean value, accepted or not.
Below, we create a callback class, dumping changes to system console:
public class RedactionDump implements IRedactionCallback { public RedactionDump() { } public boolean acceptRedaction(RedactionDescription description) { System....Merger Product Solution GroupDocs.Redaction Product Solution GroupDocs...GroupDocs Documentation / GroupDocs.Redaction Product Family / GroupDocs...
This article demonstrates the simplest way to save the document...Merger Product Solution GroupDocs.Redaction Product Solution GroupDocs...GroupDocs Documentation / GroupDocs.Redaction Product Family / GroupDocs...
This article explains that how to use Aspose.OCR for Cloud SDK in Java....Merger Product Solution GroupDocs.Redaction Product Solution GroupDocs...GroupDocs Documentation / GroupDocs.Redaction Product Family / GroupDocs...
This article shows how to redact the pages of a document as images, redacting entire areas of the page instead or in addition to a specific text....Merger Product Solution GroupDocs.Redaction Product Solution GroupDocs...GroupDocs Documentation / GroupDocs.Redaction Product Family / GroupDocs...
The following example demonstrates how to save the document as a rasterized PDF file:
final Redactor redactor = new Redactor(Constants.SAMPLE_DOCX); try { // Here we can use document instance to perform redactions redactor.apply(new ExactPhraseRedaction("John Doe", new ReplacementOptions("[personal]"))); SaveOptions tmp0 = new SaveOptions(); tmp0.setAddSuffix(false); tmp0.setRasterizeToPDF(true); // Saving as rasterized PDF with no suffix in file name redactor.save(tmp0); } finally { redactor.close(); }...Merger Product Solution GroupDocs.Redaction Product Solution GroupDocs...GroupDocs Documentation / GroupDocs.Redaction Product Family / GroupDocs...
The following example demonstrates how to save the redacted document, replacing an original file:
// Make a copy of sample file Files.copy(new File("Sample.docx").toPath(), new File("OverwrittenSample.docx").toPath(), StandardCopyOption.REPLACE_EXISTING); // Apply redaction final Redactor redactor = new Redactor("OverwrittenSample.docx"); try { RedactorChangeLog result = redactor.apply(new ExactPhraseRedaction("John Doe", new ReplacementOptions(java.awt.Color.RED))); if (result.getStatus() != RedactionStatus.Failed) { SaveOptions options = new SaveOptions(); options.setAddSuffix(false); options.setRasterizeToPDF(false); // Save the document in original format overwriting original file redactor.save(options); } } finally { redactor....Merger Product Solution GroupDocs.Redaction Product Solution GroupDocs...GroupDocs Documentation / GroupDocs.Redaction Product Family / GroupDocs...
Categories on GroupDocs Blog | Document Automation Solutions for .NET & Java Developers Recent content in Categories on GroupDocs Blog | Document Automation Solutions for .NET & Java Developers Gro......Markdown Product Family GroupDocs.Redaction Releases GroupDocs.Metadata...Merger Product Family GroupDocs.Redaction Product Family GroupDocs...
This article shows that how C# developers can apply metadata, image, annotation and text redaction in their documents. Wide range of document formats is supported, such as, PDF, DOC, DOCX, PPT, PPTX, XLS, XLSX and others....Merger Product Solution GroupDocs.Redaction Product Solution GroupDocs...GroupDocs Documentation / GroupDocs.Redaction Product Family / GroupDocs...
This article shows that how C# redaction API allows you to replace or remove metadata using filters or search by regular expression....Merger Product Solution GroupDocs.Redaction Product Solution GroupDocs...GroupDocs Documentation / GroupDocs.Redaction Product Family / GroupDocs...