Browse our Products

If so you can download any of the below versions for testing. The product will function as normal except for an evaluation limitation. At the time of purchase we provide a license file via email that will allow the product to work in its full capacity. If you would also like an evaluation license to test without any restrictions for 30 days, please follow the directions provided here.

GroupDocs.Redaction for Node.js via Java Downloads

banner

NPM NPM Downloads

Product Page | Docs | Demos | API Reference | Examples | Blog | Free Support | Temporary License

GroupDocs.Redaction for Node.js via Java is a document-sanitization API for permanently removing sensitive information. Redact text by exact phrase or regular expression, scrub or replace metadata, remove or rewrite annotations, black out image regions, delete whole pages, and rasterize the result so nothing redacted can be recovered — across Word, Excel, PowerPoint, PDF, images, and text formats through one unified Node.js API, with no MS Office, OpenOffice, or other external software required.

Get Started

npm i @groupdocs/groupdocs.redaction
const redaction = require('@groupdocs/groupdocs.redaction');

const redactor = new redaction.Redactor('document.docx');
try {
  redactor.apply(new redaction.ExactPhraseRedaction(
    'confidential',
    new redaction.ReplacementOptions('[REDACTED]')));
  redactor.save();
} finally {
  redactor.close();
}

How It Works

Install the package from npm, set up a supported Node.js and JVM environment once, then call the redaction API from JavaScript. The library loads, redacts, and saves documents through a single Node.js surface — no Microsoft Office or third-party desktop tools required. Works on Windows, Linux, and macOS where Node.js and Java are available.

Features

  • Text redaction — remove or replace text by exact phrase (case-sensitive or not) or by regular expression; draw a colored box over the match instead of replacing it.
  • Metadata redaction — erase or rewrite document metadata by filter (author, company, comments, …) or by key/value pattern.
  • Annotation redaction — replace annotation text by pattern or delete matching annotations entirely.
  • Image-area redaction — black out a rectangular region of a page; combine text + image redaction for page areas.
  • Page redaction — remove pages from the start or end of a document.
  • Rasterization — flatten the output to a PDF (optionally with advanced raster options) so redacted content cannot be extracted.
  • OCR connectors — plug in IOcrConnector (com.groupdocs.redaction.integration.ocr) to redact text recognized in images and scanned pages.
  • Custom rules & callbacks — plug in a custom redaction handler or an IRedactionCallback to accept/reject each match.
  • Document introspection — read format, page count, size, and per-page dimensions before processing.
  • Cross-platform — Windows, Linux, and macOS with Node.js LTS and a compatible JRE/JDK.

Common Tasks

  • Strip personal data (names, SSNs, emails, phone numbers) from a contract before sharing
  • Black out an exact phrase or a regex match across every page of a document
  • Erase all metadata (or just author/company) from a DOCX, XLSX, or PDF
  • Remove or rewrite annotations/comments left in a reviewed document
  • Redact a fixed image region (a logo, a signature, a photo) on a page
  • Rasterize a redacted document to PDF so nothing can be copied back out

Supported File Formats

Format support matches GroupDocs.Redaction for Java. For capability details per format, see supported formats.

CategoryFormats
Word ProcessingDOC, DOCX, DOCM, DOT, DOTX, DOTM, RTF, TXT, ODT, OTT
SpreadsheetsXLS, XLSX, XLSM, XLSB, XLT, XLTX, XLTM, CSV, TSV, TAB, ODS, OTS, NUMBERS
PresentationsPPT, PPTX, POTX, POTM, ODP, OTP
Fixed-LayoutPDF
ImagesBMP, JPG, JPEG, PNG, GIF, TIF, TIFF, JP2
Web & MarkdownHTM, HTML, MD

Examples

Redact an exact phrase

const redaction = require('@groupdocs/groupdocs.redaction');

const redactor = new redaction.Redactor('document.docx');
try {
  // case-insensitive by default; pass true for case-sensitive
  redactor.apply(new redaction.ExactPhraseRedaction(
    'John Doe',
    true,
    new redaction.ReplacementOptions('[CUSTOMER]')));
  redactor.save();
} finally {
  redactor.close();
}

Redact by regular expression

const redaction = require('@groupdocs/groupdocs.redaction');

const redactor = new redaction.Redactor('document.docx');
try {
  redactor.apply(new redaction.RegexRedaction(
    '\\d{2,}',
    new redaction.ReplacementOptions('[NUMBER]')));
  redactor.apply(new redaction.RegexRedaction(
    '[\\w.%+-]+@[\\w.-]+\\.[A-Za-z]{2,}',
    new redaction.ReplacementOptions('[EMAIL]')));
  redactor.save();
} finally {
  redactor.close();
}

Draw a black box instead of replacing text

const redaction = require('@groupdocs/groupdocs.redaction');
const java = require('java');
const Color = java.import('java.awt.Color');

const redactor = new redaction.Redactor('document.pdf');
try {
  redactor.apply(new redaction.ExactPhraseRedaction(
    'Top Secret',
    new redaction.ReplacementOptions(Color.BLACK)));
  redactor.save();
} finally {
  redactor.close();
}

Scrub metadata

const redaction = require('@groupdocs/groupdocs.redaction');

const redactor = new redaction.Redactor('document.docx');
try {
  redactor.apply(new redaction.EraseMetadataRedaction(redaction.MetadataFilters.All));
  redactor.apply(new redaction.MetadataSearchRedaction('.*@acme\\.com', '[EMAIL]'));
  redactor.save();
} finally {
  redactor.close();
}

Black out an image region

const redaction = require('@groupdocs/groupdocs.redaction');
const java = require('java');
const Point = java.import('java.awt.Point');
const Dimension = java.import('java.awt.Dimension');
const Color = java.import('java.awt.Color');

const redactor = new redaction.Redactor('scan.pdf');
try {
  redactor.apply(new redaction.ImageAreaRedaction(
    new Point(50, 60),
    new redaction.RegionReplacementOptions(Color.BLACK, new Dimension(200, 80))));
  redactor.save();
} finally {
  redactor.close();
}

Save in the original format (no rasterization)

const redaction = require('@groupdocs/groupdocs.redaction');

const redactor = new redaction.Redactor('document.docx');
try {
  redactor.apply(new redaction.RegexRedaction(
    '\\d+',
    new redaction.ReplacementOptions('[NUM]')));
  const options = new redaction.SaveOptions();
  options.setRasterizeToPDF(false);
  redactor.save(options);
} finally {
  redactor.close();
}

Get document info

const redaction = require('@groupdocs/groupdocs.redaction');

const redactor = new redaction.Redactor('document.pdf');
try {
  const info = redactor.getDocumentInfo();
  console.log('Type:', info.getFileType());
  console.log('Pages:', info.getPageCount());
  console.log('Size:', info.getSize(), 'bytes');
} finally {
  redactor.close();
}

Evaluation Mode

The API works without a license in evaluation mode, with these limitations:

  • A single process can open up to 25 documents.
  • Trial badges / evaluation marks are still added to saved documents.

To remove these limitations, apply a license or request a temporary license:

const redaction = require('@groupdocs/groupdocs.redaction');

const license = new redaction.License();
license.setLicense('path/to/GroupDocs.Redaction.lic');

System Requirements

  • Node.js 20 LTS or later (22 LTS supported)
  • JRE/JDK 8+ (11, 17, or 21 LTS recommended); set JAVA_HOME
  • Windows 10/11 or Windows Server 2016+, modern Linux (x64), macOS 12+ (Intel and Apple Silicon where Node.js and Java are available)
  • Native build tools for the java / node-gyp bridge if npm install requires them
  • No Microsoft Office, OpenOffice, or Adobe Acrobat required

Troubleshooting

IssueFix
Trial limit / evaluation watermarkApply a license — new License().setLicense(...)
JAVA_HOME / JVM not foundInstall JDK 8+ and set JAVA_HOME so the Node–Java bridge can find it
npm install / node-gyp build failureInstall OS build tools required by node-gyp
IncorrectPasswordException / PasswordRequiredExceptionOpen with LoadOptions and the document password

More Resources

Also available for other platforms: .NET | Java | Python via .NET


Product Page | Docs | Demos | API Reference | Examples | Blog | Free Support | Temporary License



Direct Download

Icons

GroupDocs.Redaction for Node.js via Java 26.11

Download `groupdocs-groupdocs.redaction-26.11.0.tgz` package. This .tgz package contains the same build that is available on NPM and can be installed locally.

Added: 17/11/2026 Downloads:

Download

File Size: 39.17KB