How to Redact, Hide or Remove Text from DOTM Files using Java

GroupDocs.Redactions Java API allows to redact, hide or remove sensitive text from word processing documents, worksheets, presentations, PDFs & images.


Download Free Trial

What is Text Redaction?

Text Redaction is the process of removing the confidential or unwanted text or information from digital documents while leaving intact the rest of the document or paragraph containing it. Redaction helps users as well as organization to protect their sensitive information by hiding or permanently removing them. Using GroupDocs.Redaction Java API users can now redact, hide or remove sensitive text from word processing documents, worksheets, presentations, PDF and raster image files. The API provides a wide range of options and methods for the redaction of private information in the documents. It supports search and redact using exact match or regular expressions, Use textual (exemption codes) or graphical (colored rectangles) redactions and many more. So why not give it a try and automate your document redaction process by downloading the API and explore its basic and advanced features.

Redact DOTM Exact Phrase in Java

GroupDocs.Redaction allows to easily redact data of sensitive or private nature from your documents. The most popular redaction case is to remove a text from a document.

The following code can be used to apply textual redaction to a particular part of a document via exact phrase. It allows users to replace personal exact phrase “Michal Clark” with personal (or any exemption code),

Remove Sensitive Data from DOTM

  • Create an instance of Redactor class & upload DOTM file
  • Call Redactor.apply method with new instance of ExactPhraseRedaction class
  • Call redactor.save method with object of ExactPhraseRedaction
  • Call redactor.save method to save the changes


Case Sensitive Text Redaction in DOTM

The following example enables users to perform exact phrase case-sensitive redaction to remove or hide a particular chuck of text inside a document. By default, search for exact phrase is case insensitive.

Perform Case Sensitive Redaction via Java

  • Create an instance of Redactor class & upload DOTM file
  • Call Redactor.apply method with new instance of ExactPhraseRedaction class
  • Call redactor.save method with object of ExactPhraseRedaction
  • Call redactor.save method to save the changes


Redact Text in DOTM via Color Box

Instead of removing a redacted text or placing a string over there, it is also possible to put color box over the redacted text. In this case the matched text will be removed and a colored rectangle will be placed over redacted text.

Use Color Box to Remove Text in Java

  • Create an instance of Redactor class & upload DOTM file
  • Call Redactor.apply method with new instance of ExactPhraseRedaction class
  • Call redactor.save method with object of ExactPhraseRedaction
  • Call redactor.save method to save the changes


System Requirements

GroupDocs.Redaction for Java APIs are supported on all major platforms and operating systems. For complete system requirements guide, please visit system requirements Before executing the code below, please make sure that you have the following prerequisites installled on your system:

  • Operating Systems: Microsoft Windows, Linux, MacOS
  • Development Environment: NetBeans, Intellij IDEA, Eclipse etc
  • Java Runtime Environment: J2SE 6.0 and above
  • Get the latest version of GroupDocs.Redaction for Java from Maven

Why Use GroupDocs.Redaction

  • Allow users to add custom document formats and types of redactions
  • No additional software is required to remove sensitive information
  • Ability to set page range rendering document as PDF
  • Easy way to redact different types of metadata: author name, version, title, subject, description and many more
  • Document information extraction - file type, page count etc.


What is DOTM File Format?

A file with DOTM extension represents template file created with Microsoft Word 2007 or higher. It is similar to the popular DOCX file format other than it retains the user defined settings for reuse in case of creating new documents. Such documents are more often used in offices where a standard template file is generated with settings like page information, margins, default layout and macros, and is used to create new documents from it when required. DOTM files, however, save macros, that are a series of commands in the form of recorded actions for automatic completion of a task. This helps save time in carrying out actions that are repeated in completion of a task.

Read More

Popular Redaction Options

Redact CSV Files

(Comma Seperated Values)

Redact DOC Files

(Microsoft Word Binary Format)

Redact DOCM Files

(Microsoft Word 2007 Marco File)

Redact DOCX Files

(Office 2007+ Word Document)

Redact DOT Files

(Microsoft Word Template Files)

Redact DOTX Files

(Microsoft Word Template File )

Redact PDF Files

(Portable Document Format)

Redact POT Files

(Microsoft PowerPoint Template Files)

Redact POTM Files

(Microsoft PowerPoint Template File)

Redact PPS Files

(PowerPoint Slide Show)

Redact PPSM Files

(Macro-enabled Slide Show)

Redact PPSX Files

(PowerPoint Slide Show)

Redact PPT Files

(Microsoft PowerPoint 97-2003)

Redact PPTM Files

(Macro-enabled Presentation File)

Redact PPTX Files

(Open XML presentation Format)

Redact RTF Files

(Rich Text Format)

Redact XLS Files

(Microsoft Excel Spreadsheet (Legacy))

Redact XLSM Files

(Macro-enabled Spreadsheet)

Redact XLSX Files

(Open XML Workbook)

Redact XLT Files

(Excel 97 - 2003 Template)

Redact XLTM Files

(Excel Macro-Enabled Template)

Redact XLTX Files

(Excel Template)

Back to top
 English