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...
The following example demonstrates how to save file in its original format with current date as a suffix:
final Redactor redactor = new Redactor("sample.docx"); try { // Here we can use document instance to perform redactions redactor.apply(new ExactPhraseRedaction("John Doe", new ReplacementOptions("[personal]"))); SaveOptions saveOptions = new SaveOptions(); saveOptions.setAddSuffix(true); saveOptions.setRasterizeToPDF(false); saveOptions.setRedactedFileSuffix(new SimpleDateFormat("dd-MM-yyyy").format(new Date())); // Saving in original format with date as DateTime.getNow().toShortDateString()a suffix redactor.save(saveOptions); } finally { redactor.close(); }...Merger Product Solution GroupDocs.Redaction Product Solution GroupDocs...GroupDocs Documentation / GroupDocs.Redaction Product Family / GroupDocs...
You might need to save a document to any custom file at any location on the local disc or a even a Stream.
The following example demonstrates how to save a document to any location.
final Redactor redactor = new Redactor("Sample.docx"); try { // Here we can use document instance to perform redactions RedactorChangeLog result = redactor.apply(new ExactPhraseRedaction("John Doe", new ReplacementOptions(java.awt.Color.RED))); if (result.getStatus() != RedactionStatus.Failed) { // Save the document to a custom location and convert its pages to images final FileOutputStream fileStream = new FileOutputStream("C:\\\\Temp\\\\sample_output_file....Merger Product Solution GroupDocs.Redaction Product Solution GroupDocs...GroupDocs Documentation / GroupDocs.Redaction Product Family / GroupDocs...
This article shows that how to remove pages with sensitive data from your PDF, presentation and spreadsheet documents....Merger Product Solution GroupDocs.Redaction Product Solution GroupDocs...GroupDocs Documentation / GroupDocs.Redaction Product Family / GroupDocs...
This article demonstrates that how you can specify starting page index (zero based) and the number of pages from this index to save a rasterized PDF...Merger Product Solution GroupDocs.Redaction Product Solution GroupDocs...GroupDocs Documentation / GroupDocs.Redaction Product Family / GroupDocs...
This article demonstrates that how to save a document to any custom file at any location on the local disc or a even a Stream...Merger Product Solution GroupDocs.Redaction Product Solution GroupDocs...GroupDocs Documentation / GroupDocs.Redaction Product Family / GroupDocs...
This API enables easy conversion of popular file formats, including DOCX, XLSX, PPTX, PDF, CAD drawings, and more using Python without installing extra software....Merger Product Family GroupDocs.Redaction Product Family GroupDocs...
In this guide, you'll discover how to redact text in PPTX using Java. Moreover, you'll receive a simple code example to replace text in PPTX using Java....Merger Product Family GroupDocs.Redaction Product Family Redact...Environment (IDE) to use GroupDocs.Redaction for Java to redact text...
This article demonstrates that how you can specify starting page index (zero based) and the number of pages from this index to save a rasterized PDF...Merger Product Solution GroupDocs.Redaction Product Solution GroupDocs...GroupDocs Documentation / GroupDocs.Redaction Product Family / GroupDocs...