
Security News
/Research
Popular node-ipc npm Package Infected with Credential Stealer
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.
@groupdocs/groupdocs.viewer
Advanced tools
Document viewer API for Node.js (powered by Java). Powerful, high-performance, cross-platform library for building desktop and web file viewer applications.
Document viewer API for Node.js (powered by Java) to render and preview 170+ file formats (PDF, Word, Excel, PowerPoint, CAD, images, archives, email, and more) as HTML, PDF, PNG, and JPEG.
View documents in popular file formats (DOCX, XLSX, PPTX, PDF, DWG, PSD, HTML, ZIP, and many more).
Install the package from npm:
npm i @groupdocs/groupdocs.viewer
For detailed setup instructions, see the System Requirements and Installation documentation topics.
Below are simple Node.js snippets that demonstrate typical use cases.
This code example shows how to render a DOCX to HTML files with embedded resources.
import { Viewer, License, HtmlViewOptions } from '@groupdocs/groupdocs.viewer'
// Apply license if you have one (optional for evaluation)
const license = new License()
license.setLicense('GroupDocs.Viewer.lic')
// Create a viewer for the source document
const viewer = new Viewer('sample.docx')
// Configure HTML output options
const viewOptions = HtmlViewOptions.forEmbeddedResources('page_{0}.html')
// Render the document
viewer.view(viewOptions)
// Exit the process
process.exit(0)
This code example shows how to render a PDF document to a set of PNG images (one image per page).
import { Viewer, License, PngViewOptions } from '@groupdocs/groupdocs.viewer'
// Apply license if you have one (optional for evaluation)
const license = new License()
license.setLicense('GroupDocs.Viewer.lic')
// Create a viewer for the source document
const viewer = new Viewer('sample.pdf')
// Configure PNG output options (use {0} as page number placeholder)
const viewOptions = new PngViewOptions('page_{0}.png')
// Render all pages to PNG images
viewer.view(viewOptions)
// Exit the process
process.exit(0)
This code example shows how to render only selected pages of a document.
import { Viewer, License, PngViewOptions } from '@groupdocs/groupdocs.viewer'
import java from 'java'
// Apply license if you have one (optional for evaluation)
const license = new License()
license.setLicense('GroupDocs.Viewer.lic')
// Create a viewer for the source document
const viewer = new Viewer('sample.docx')
// Configure output options (for example, render selected pages to PNG images)
const viewOptions = new PngViewOptions('page_{0}.png')
// Render only pages 1, 3, and 5
const pages = java.newArray('int', [1, 3, 5])
viewer.view(viewOptions, pages)
// Exit the process
process.exit(0)
postinstall. If needed, download the file manually to the lib/ directory as described in the Installation Guide.PATH.For testing without trial limitations, you can request a 30-day Temporary License:
After you receive the license file, save it locally and use it in your application as follows:
import { License } from '@groupdocs/groupdocs.viewer';
// Apply license
const license = new License();
license.setLicense('GroupDocs.Viewer.lic');
This product is licensed under the GroupDocs End User License Agreement (EULA). For pricing information, visit the GroupDocs.Viewer for Node.js via Java pricing page.
GroupDocs provides unlimited free technical support for all of its products. Support is available to all users, including evaluation. The support is provided at Free Support Forum, Paid Support Helpdesk and Paid Consulting.
The GroupDocs Free Support Forum is available to all users and provides:
The Paid Support Helpdesk offers:
We can work together with you on your project and develop a part or complete application. If you need new features in the existing GroupDocs product or to create API for new file formats, send us a request at consulting.groupdocs.com/contact.
| Product Home | Documentation | Blog | API Reference | Code Samples | Free Support | Temporary License | Pricing |
FAQs
Document viewer API for Node.js (powered by Java). Powerful, high-performance, cross-platform library for building desktop and web file viewer applications.
The npm package @groupdocs/groupdocs.viewer receives a total of 67 weekly downloads. As such, @groupdocs/groupdocs.viewer popularity was classified as not popular.
We found that @groupdocs/groupdocs.viewer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
/Research
Socket detected malicious node-ipc versions with obfuscated stealer/backdoor behavior in a developing npm supply chain attack.

Security News
TeamPCP and BreachForums are promoting a Shai-Hulud supply chain attack contest with a $1,000 prize for the biggest package compromise.

Security News
Packagist urges PHP projects to update Composer after a GitHub token format change exposed some GitHub Actions tokens in CI logs.