This article demonstrates that how to save the redacted document, replacing an original file...This article demonstrates that how to save the redacted document, replacing an original file
This article shows that how C# redaction API allows you to replace or remove metadata using filters or search by regular expression....This article shows that how C# redaction API allows you to replace or remove metadata using filters or search by regular expression.
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...
You can implement ILogger interface from com.groupdocs.redaction.options package. This interface requires to implement three methods:
import com.groupdocs.redaction.options.ILogger; import java.util.ArrayList; /** *
* This is an example of ILogger implementation, tracking count of error messages. *
*/ public class CustomLogger implements ILogger { private ArrayList _errors; private ArrayList _traces; private ArrayList _warnings; public boolean hasErrors() { return _errors.size() > 0; } public CustomLogger() { _errors = new ArrayList(); _traces = new ArrayList(); _warnings = new ArrayList(); } public void error(String message) { _errors....You can implement ILogger interface from com.groupdocs.redaction.options package. This interface requires to implement three methods:
import com.groupdocs.redaction.options.ILogger; import java.util.ArrayList; /** * <p> * This is an example of ILogger implementation, tracking count of error messages. * </p> */ public class CustomLogger implements ILogger { private ArrayList<String> _errors; private ArrayList<String> _traces; private ArrayList<String> _warnings; public boolean hasErrors() { return _errors.size() > 0; } public CustomLogger() { _errors = new ArrayList<String>(); _traces = new ArrayList<String>(); _warnings = new ArrayList<String>(); } public void error(String message) { _errors.
This article shows how to pre-rasterize a document using the redaction API....This article shows how to pre-rasterize a document using the redaction API.
This article shows that how to redact data of sensitive nature from images of various formats like JPG, PNG, TIFF and others....This article shows that how to redact data of sensitive nature from images of various formats like JPG, PNG, TIFF and others.
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(); }...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(); }
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....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.
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....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.