The following example demonstrates how to save the redacted document, replacing an original File:
// Make a copy of sample FileFiles.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....Editor Product Solution GroupDocs...overwriting original file Save overwriting original file Leave feedback...
This article explains how to check if a File is encrypted using .NET / C# with GroupDocs.Viewer for .NET....Editor Product Solution GroupDocs.../ Check if a file is encrypted Check if a file is encrypted Leave...
This topic describes how to optimize PDF File using the GroupDocs.Viewer Java API to reduce size....Editor Product Solution GroupDocs...Optimize the output PDF file / Optimize the PDF file resources Optimize...
This article explains that how to detect encoding of a text File automatically....Editor Product Solution GroupDocs...Indexing / Text file encoding detection Text file encoding detection...
This article explains how to specify the File type when loading a document with GroupDocs.Viewer within your .NET applications....Editor Product Solution GroupDocs...Specify file type when loading a document Specify file type when...
This article explains how to obtain supported File formats list when viewing documents with GroupDocs.Comparison within your Python applications....Editor Product Solution GroupDocs...Get supported file formats Get supported file formats Leave feedback...