Redaction is the process of obscuring or deleting classified information in a document. The redacted information is usually considered to be sensitive, private, or classified. Therefore, redaction is often used to maintain or improve file security and privacy by keeping sensitive information from getting compromised. Redaction may also be used to remove personal data from documents, such as social security numbers, addresses, or passwords for legal, financial, or official documents.
Considering the ever-increasing concerns about data privacy, redaction tools, and software have gained much importance. Such tools allow users to electronically redact or hide different types of user data from their multi-format documents. If you are also looking for a feature-rich document redaction library, look no further than GroupDocs.Redaction for .NET. This API packs a set of very useful, easy-to-use features for redacting text, annotation, and metadata from PDF, DOCX, XLSX, PPTX, ODT, RTF, PNG, JPG, GIF, and TIFF files.
Before you start redacting your documents using GroupDocs.Redaction for .NET, please ensure having installed the correct API version and any other prerequisites. You have a few options for installing GroupDocs.Redaction for .NET such as using NuGet or obtaining the MSI installer from the downloads section. You can also install it via the Package Manager Console:
For further help and information, please check this guide.
After successfully setting up GroupDocs.Redaction for .NET on your system let's now check some of the popular use cases for the redaction of data and classified information from your documents.
Text redaction is the most commonly used option when it comes to concealing or removing important information from a document. This can be done for various reasons, such as protecting sensitive information or simply cleaning up a document before sharing it with someone. There are a few different ways to redact text, including using a replacement text (in place of the redacted content) or inserting colored boxes. GroupDocs.Redaction for .NET allows you to the exact phrase or a regular expression to redact specified text from your PDF and Word documents, Excel spreadsheets, and PowerPoint presentations.
Annotations can often contain sensitive data such as comments, notes, or even revisions. To ensure keeping the contents of your document annotations secure, you may need to redact them. GroupDocs.Redaction for .NET lets you redact the annotation text or completely remove the actual annotation itself.
When working with images, you may encounter a situation where you must redact or remove private information from them. This could be anything from a social security number to a person’s face of a person. Redaction for .NET can work as the perfect redaction tool for you to sanitize PNG, GIF, TIFF, and JPG images by redacting specific areas in image files, searching and redacting text in an image, or redacting embedded images in .NET.
using (Redactor redactor = new Redactor("D:\\sample.jpg")) { System.Drawing.Point samplePoint = new System.Drawing.Point(516, 311); System.Drawing.Size sampleSize = new System.Drawing.Size(170, 35); RedactorChangeLog result = redactor.Apply(new ImageAreaRedaction(samplePoint, new RegionReplacementOptions(System.Drawing.Color.Blue, sampleSize))); if (result.Status != RedactionStatus.Failed) { redactor.Save(); }; }
using (Redactor redactor = new Redactor("D:\\sample.docx")) { System.Drawing.Point samplePoint = new System.Drawing.Point(516, 311); System.Drawing.Size sampleSize = new System.Drawing.Size(170, 35); RedactorChangeLog result = redactor.Apply(new ImageAreaRedaction(samplePoint, new RegionReplacementOptions(System.Drawing.Color.Blue, sampleSize))); if (result.Status != RedactionStatus.Failed) { redactor.Save(); }; }
When redacting a document or image, it is important to make sure that the information is hidden in such a way that it cannot be recovered or become visible. This helps maintain the integrity of the redacted content. So, once you are done redacting a file of your choice, the next phase is to save it appropriately. Using GroupDocs.Redaction for .NET, you can save the redacted file in its original format, overwrite the original file, and save it as a rasterized PDF or to a stream.
using (Redactor redactor = new Redactor(@"sample.docx")) { // Applying redactions redactor.Apply(new ExactPhraseRedaction("John Doe", new ReplacementOptions("[personal]"))); // Saving to original format by adding the date as a suffix redactor.Save(new SaveOptions() { AddSuffix = true, RasterizeToPDF = false, RedactedFileSuffix = DateTime.Now.ToShortDateString() }); }
using (Redactor redactor = new Redactor(@"sample.docx")) { // Applying redactions redactor.Apply(new ExactPhraseRedaction("John Doe", new ReplacementOptions("[personal]"))); // Saving the redacted file as a rasterized PDF redactor.Save(new SaveOptions() { AddSuffix = false, RasterizeToPDF = true }); }
We also provide Free Online Apps for instantly redacting PDF, Word, Excel, PowerPoint, OpenDocument, PNG, JPG, GIF, TIFF, and many other files using your mobile or desktop devices so, please be sure to check them out.
You can easily export data to Microsoft Excel from various available sources such as JSON, and CSV.
Continue ReadingYou have several Excel workbooks, and you want to combine them together into one file for reporting or to keep data in one place
Continue ReadingConverting Word documents including DOC or DOCX in .NET is a very common requirement
Continue Reading