npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

groupdocs-viewer-cloud

v26.6.0

Published

GroupDocs.Viewer Cloud SDK for Node.js

Readme

GroupDocs.Viewer Cloud SDK for Node.js

This repository contains GroupDocs.Viewer Cloud SDK for Node.js source code. This SDK allows you to work with GroupDocs.Viewer Cloud REST APIs in your Node.js applications, enabling you to render documents in HTML, image, or PDF formats, with the flexibility to render the whole document or a custom range of pages.

Installation

A package groupdocs-viewer-cloud is available at npmjs.com. You can install it with:

npm install groupdocs-viewer-cloud

Getting Started

Below is an example demonstrating how to preview a document using ConvertAndDownload with GroupDocs.Viewer Cloud SDK for Node.js:

const GroupDocs = require('groupdocs-viewer-cloud');
const fs = require('fs');

// Get your appSid and appKey at https://dashboard.groupdocs.cloud
const appSid = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX";
const appKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";

const configuration = new GroupDocs.Configuration(appSid, appKey);
const viewApi = new GroupDocs.ViewApi(configuration);

const format = "jpg";
const fileStream = fs.createReadStream("myfile.docx");
const request = new GroupDocs.ConvertAndDownloadRequest(format, fileStream);

viewApi.convertAndDownload(request)
    .then((result) => {
        fs.writeFileSync("myfile.jpg", result);
        console.log("Document converted and downloaded as JPG.");
    })
    .catch((error) => {
        console.log("Error: " + error.message);
    });

Below is an example demonstrating how to upload a document, render it, and download the result using GroupDocs.Viewer Cloud SDK for Node.js:

const GroupDocs = require('groupdocs-viewer-cloud');
const fs = require('fs');

const appSid = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX";
const appKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";

const configuration = new GroupDocs.Configuration(appSid, appKey);

// Upload a file to cloud storage
const fileApi = new GroupDocs.FileApi(configuration);
const uploadRequest = new GroupDocs.UploadFileRequest("myfile.docx", fs.createReadStream("myfile.docx"));
fileApi.uploadFile(uploadRequest)
    .then(() => {
        // Render it to HTML
        const viewApi = new GroupDocs.ViewApi(configuration);
        const viewOptions = new GroupDocs.ViewOptions({
            fileInfo: { filePath: "myfile.docx" },
            viewFormat: "HTML",
            outputPath: "myfile.html"
        });
        const createViewRequest = new GroupDocs.CreateViewRequest(viewOptions);
        return viewApi.createView(createViewRequest);
    })
    .then(() => {
        // Download the result
        const downloadRequest = new GroupDocs.DownloadFileRequest("myfile.html");
        return fileApi.downloadFile(downloadRequest);
    })
    .then((result) => {
        fs.writeFileSync("myfile.html", result);
        console.log("File rendered and downloaded successfully.");
    })
    .catch((error) => {
        console.log("Error: " + error.message);
    });

Or compile and run the same written in TypeScript:

import { Configuration, FileApi, ViewApi, UploadFileRequest, ViewOptions, CreateViewRequest, DownloadFileRequest, ConvertAndDownloadRequest } from "groupdocs-viewer-cloud";
import * as fs from "fs";

const appSid: string = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX";
const appKey: string = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";

const configuration = new Configuration(appSid, appKey);

// Convert and download
const viewApi = new ViewApi(configuration);
const format = "jpg";
const fileStream = fs.createReadStream("myfile.docx");
const request = new ConvertAndDownloadRequest(format, fileStream);

viewApi.convertAndDownload(request)
    .then((result) => {
        fs.writeFileSync("myfile.jpg", result);
        console.log("Document converted and downloaded as JPG.");
    })
    .catch((error) => {
        console.log("Error: " + error.message);
    });

// Upload, render, and download
const fileApi = new FileApi(configuration);
const uploadRequest = new UploadFileRequest("myfile.docx", fs.createReadStream("myfile.docx"));
fileApi.uploadFile(uploadRequest)
    .then(() => {
        const viewOptions = new ViewOptions({
            fileInfo: { filePath: "myfile.docx" },
            viewFormat: "HTML",
            outputPath: "myfile.html"
        });
        const createViewRequest = new CreateViewRequest(viewOptions);
        return viewApi.createView(createViewRequest);
    })
    .then(() => {
        const downloadRequest = new DownloadFileRequest("myfile.html");
        return fileApi.downloadFile(downloadRequest);
    })
    .then((result) => {
        fs.writeFileSync("myfile.html", result);
        console.log("File rendered and downloaded successfully.");
    })
    .catch((error) => {
        console.log("Error: " + error.message);
    });

Licensing

GroupDocs.Viewer Cloud Node.js SDK is licensed under MIT License.

Resources

Contact Us

Your feedback is very important to us. Please feel free to contact us using