Saving a document, GroupDocs.Redaction puts it in the same folder as the original file, renaming or rewriting original. If you need to save the document to any custom location, you’ll have to open a Stream to this location. As a save option by default, GroupDocs.Redaction converts all pages (slides, worksheets) in a document into images and puts them in a single PDF file, so you can share the redacted document without any additional conversions....Saving a document, GroupDocs.Redaction puts it in the same folder as the original file, renaming or rewriting original. If you need to save the document to any custom location, you’ll have to open a Stream to this location. As a save option by default, GroupDocs.Redaction converts all pages (slides, worksheets) in a document into images and puts them in a single PDF file, so you can share the redacted document without any additional conversions.
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......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...
Bug Fix on GroupDocs Blog | Document Automation Solutions for .NET & Java Developers Recent content in Bug Fix on GroupDocs Blog | Document Automation Solutions for .NET & Java Developers GroupDocs......Bug Fix on GroupDocs Blog | Document Automation Solutions for .NET & Java Developers Recent content in Bug Fix on GroupDocs Blog | Document Automation Solutions for .NET & Java Developers 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....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.
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....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.
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(); }...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(); }
POTM on GroupDocs Blog | Document Automation Solutions for .NET & Java Developers Recent content in POTM on GroupDocs Blog | Document Automation Solutions for .NET & Java Developers GroupDocs.Redac......POTM on GroupDocs Blog | Document Automation Solutions for .NET & Java Developers Recent content in POTM on GroupDocs Blog | Document Automation Solutions for .NET & Java Developers GroupDocs.Redac...
PowerPoint on GroupDocs Blog | Document Automation Solutions for .NET & Java Developers Recent content in PowerPoint on GroupDocs Blog | Document Automation Solutions for .NET & Java Developers Gro......PowerPoint on GroupDocs Blog | Document Automation Solutions for .NET & Java Developers Recent content in PowerPoint on GroupDocs Blog | Document Automation Solutions for .NET & Java Developers Gro...