@groupdocs/groupdocs.total
v26.8.0
Published
All-in-one GroupDocs document suite for Node.js (via Java): view, convert, compare, merge, edit, sign, annotate, redact, search, and more — one package, one license.
Readme
GroupDocs.Total for Node.js via Java
Product Page | Docs | Free Support | Temporary License | Pricing
All GroupDocs on-premise document APIs in one Node.js package (powered by Java). View, convert, compare, merge, edit, sign, annotate, redact, search, and more — without installing a separate package for each product. The suite covers 200+ file formats across documents, spreadsheets, presentations, PDF, images, email, archives, CAD, and more.
Quick start
You need Node.js (LTS recommended) and a Java Runtime Environment (JRE) 8 or later on PATH; Windows, Linux, and macOS are supported. No Microsoft Office, Adobe Acrobat, or other desktop apps are required for core document processing.
Install the package — the install step also downloads the Total library used by the Node.js bridge:
npm i @groupdocs/groupdocs.totalConvert a DOCX to PDF:
const groupdocs = require('@groupdocs/groupdocs.total');
const java = require('java');
// Option classes live in the suite JAR — load them with java.import (see "How it works")
const PdfConvertOptions = java.import('com.groupdocs.conversion.options.convert.PdfConvertOptions');
const converter = new groupdocs.Converter('sample.docx');
converter.convert('converted.pdf', new PdfConvertOptions());
converter.close();Without a license the APIs run in evaluation mode (trial limitations) — see Licensing to remove them.
What's included
| Product | What you can do | Documentation | | --- | --- | --- | | Viewer | Render documents to HTML, PDF, PNG, JPEG | Viewer docs | | Conversion | Convert between Office, PDF, images, email, and more | Conversion docs | | Comparison | Diff documents and review changes | Comparison docs | | Merger | Merge, split, reorder, and rotate pages | Merger docs | | Editor | Edit documents through an HTML round-trip | Editor docs | | Signature | Apply electronic and digital signatures | Signature docs | | Annotation | Annotate PDF and Office files | Annotation docs | | Watermark | Add, search, and remove watermarks | Watermark docs | | Metadata | Read, update, and remove file metadata | Metadata docs | | Parser | Extract text, images, and structured data | Parser docs | | Redaction | Mask or remove sensitive content | Redaction docs | | Search | Full-text index and search | Search docs | | Markdown | Work with Markdown documents | Markdown docs |
Typical things developers combine in one application:
- Preview uploads in the browser (Viewer → HTML/PNG)
- Normalize formats before storage (Conversion → PDF)
- Show document revisions (Comparison)
- Assemble reports from several files (Merger)
- Let users edit content in a web UI (Editor)
- Sign contracts (Signature)
- Strip author/metadata before sharing (Metadata / Redaction)
- Extract text for search or RAG (Parser / Search)
Why Total?
If you only need one capability, dedicated packages such as @groupdocs/groupdocs.viewer are still available. Choose Total when you want several products under one dependency and one license:
| Need | Use Total | Use a single-product package |
| --- | --- | --- |
| Several GroupDocs APIs in one app | Yes — one install, one JAR | Install each package separately |
| One license for the suite | License.setLicense(...) once | License each product |
| Cost when using 2+ products | Usually cheaper than buying each | Per-product licenses |
| Smallest install size | Larger (full suite JAR) | Smaller (one product) |
Licensing
Total uses a static license API — set it once at startup and it applies to all products in the suite. Use a GroupDocs.Total for Node.js via Java (or Total Product Family) license with this package:
const { License } = require('@groupdocs/groupdocs.total');
License.setLicense('GroupDocs.Total.lic');The license can also be loaded from a stream:
const fs = require('fs');
const { License, readDataFromStream } = require('@groupdocs/groupdocs.total');
(async () => {
const stream = await readDataFromStream(fs.createReadStream('GroupDocs.Total.lic'));
License.setLicense(stream);
})();Without a license the APIs run in evaluation mode (trial limitations). Request a free temporary license to remove them while evaluating.
Examples
All examples assume a license has been applied as shown in Licensing; without one they run in evaluation mode. Main entry points (Viewer, Comparer, Merger, …) are exported from the package; option and helper classes are loaded with java.import('fully.qualified.ClassName') — see How it works.
View a DOCX as HTML
const groupdocs = require('@groupdocs/groupdocs.total');
const java = require('java');
const HtmlViewOptions = java.import('com.groupdocs.viewer.options.HtmlViewOptions');
const viewer = new groupdocs.Viewer('sample.docx');
viewer.view(HtmlViewOptions.forEmbeddedResources('page_{0}.html'));
viewer.close();Compare two documents
const groupdocs = require('@groupdocs/groupdocs.total');
const comparer = new groupdocs.Comparer('proposal_v1.docx');
comparer.add('proposal_v2.docx');
comparer.compare('proposal_diff.docx');
comparer.close();Merge PDFs
const groupdocs = require('@groupdocs/groupdocs.total');
const merger = new groupdocs.Merger('part1.pdf');
merger.join('part2.pdf');
merger.save('merged.pdf');
merger.close();Edit a DOCX via HTML
const groupdocs = require('@groupdocs/groupdocs.total');
const java = require('java');
const WordProcessingLoadOptions = java.import('com.groupdocs.editor.options.WordProcessingLoadOptions');
const editor = new groupdocs.Editor('sample.docx', new WordProcessingLoadOptions());
const editable = editor.edit();
const html = editable.getEmbeddedHtml();
// change HTML in your UI, then save with editor.save(...)
editor.dispose();Sign a PDF
const groupdocs = require('@groupdocs/groupdocs.total');
const java = require('java');
const TextSignOptions = java.import('com.groupdocs.signature.options.sign.TextSignOptions');
const signature = new groupdocs.Signature('sample.pdf');
signature.sign('signed.pdf', new TextSignOptions('Approved'));
signature.close();Extract text (Parser)
const groupdocs = require('@groupdocs/groupdocs.total');
const parser = new groupdocs.Parser('sample.pdf');
const reader = parser.getText();
if (reader) {
console.log(reader.readToEnd());
reader.close();
}
parser.close();Read metadata
const groupdocs = require('@groupdocs/groupdocs.total');
const metadata = new groupdocs.Metadata('sample.docx');
console.log(metadata.getRootPackageGeneric());
metadata.close();If you cloned the product repository, runnable samples for every product are bundled with it:
cd src
npm install
npm startHow it works
This package is a thin Node.js wrapper around the GroupDocs.Total suite JAR:
npm installinstalls the package and downloads the required Total library.require('@groupdocs/groupdocs.total')loads that library on the Java classpath.- You call familiar product APIs (
Viewer,Converter,Comparer, …) from Node.js through thejavabridge.
That leads to one rule to remember:
| Approach | Works? |
| --- | --- |
| const { Viewer, Converter } = require('@groupdocs/groupdocs.total') | Yes — main entry points |
| const { HtmlViewOptions } = require('@groupdocs/groupdocs.total') | No — helpers are not all re-exported |
| java.import('com.groupdocs.viewer.options.HtmlViewOptions') after require | Yes — class is inside the suite JAR |
require('@groupdocs/groupdocs.total'); // must run first
const java = require('java');
const HtmlViewOptions = java.import('com.groupdocs.viewer.options.HtmlViewOptions');For deep feature guides, options, and format lists, follow the per-product documentation links in the What's included table (same Java APIs, called from Node.js).
Exported entry points
| Export | Java class |
| --- | --- |
| License | com.groupdocs.total.License |
| StreamBuffer | com.groupdocs.total.StreamBuffer |
| Viewer | com.groupdocs.viewer.Viewer |
| Editor, EditableDocument | com.groupdocs.editor.* |
| Converter | com.groupdocs.conversion.Converter |
| Comparer | com.groupdocs.comparison.Comparer |
| Merger | com.groupdocs.merger.Merger |
| Signature | com.groupdocs.signature.Signature |
| Annotator | com.groupdocs.annotation.Annotator |
| Watermarker | com.groupdocs.watermark.Watermarker |
| Metadata | com.groupdocs.metadata.Metadata |
| Parser | com.groupdocs.parser.Parser |
| Redactor | com.groupdocs.redaction.Redactor |
| Index | com.groupdocs.search.Index |
Troubleshooting
| Issue | Fix |
| --- | --- |
| Library download fails on install | Allow HTTPS access to GroupDocs release storage (corporate proxy/firewall), then reinstall |
| java / JRE not found | Install JRE 8+ and ensure java is on PATH |
| java.import(...) returns null / ClassNotFound | Call require('@groupdocs/groupdocs.total') first; use the full Java class name |
| Permission errors writing output | Ensure the process can write to the target folder |
Support & licensing
- Free Support Forum — all users, including evaluation
- Paid Support Helpdesk
- Consulting
- Licensed under the GroupDocs EULA; see pricing
Also available on other platforms: .NET · Java · Python
Product Page · Documentation · Free Support · Temporary License · Pricing
