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...
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...
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...
Load password-protected file In order to open password-protected documents, you have to pass your password to LoadOptions class constructor or assign it to its Password property of an instance of LoadOptions class:
LoadOptions loadOptions = new LoadOptions("mypassword"); final Redactor redactor = new Redactor("protected_sample.docx", loadOptions); try { // Here we can use document instance to perform redactions redactor.apply(new ExactPhraseRedaction("John Doe", new ReplacementOptions("[personal]"))); redactor.save(); } finally { redactor.close(); }...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...
This article shows that how to redact data of sensitive nature from images of various formats like JPG, PNG, TIFF and others....Merger Product Solution GroupDocs.Redaction Product Solution GroupDocs...GroupDocs Documentation / GroupDocs.Redaction Product Family / GroupDocs...
Learn how to deal.If you have a corporate sensitive data removal policy as a list of redaction rules, you don't need to specify them in your code. You can specify an XML document with a list of pre-configured redactions....Merger Product Solution GroupDocs.Redaction Product Solution GroupDocs...GroupDocs Documentation / GroupDocs.Redaction Product Family / GroupDocs...
The simplest way to save the document is it provide no parameters to Save method. In this case the document will be rasterized to PDF and will have the same name as the original one except its extension (.PDF). The PDF file will be overwritten.
The following example demonstrates usage of Save() method with default options.
final Redactor redactor = new Redactor("sample.docx"); try { // Here we can use document instance to perform redactions redactor....Merger Product Solution GroupDocs.Redaction Product Solution GroupDocs...GroupDocs Documentation / GroupDocs.Redaction Product Family / GroupDocs...