{"id":24880729,"url":"https://github.com/groupdocs-viewer-cloud/groupdocs-viewer-cloud-node","last_synced_at":"2025-10-15T23:31:13.164Z","repository":{"id":33152171,"uuid":"150576978","full_name":"groupdocs-viewer-cloud/groupdocs-viewer-cloud-node","owner":"groupdocs-viewer-cloud","description":"Node.js module to communicate with GroupDocs.Viewer REST API. View or render Word, Excel, PowerPoint, CAD, Visio, PDF, OpenDocument, email \u0026 image formats.","archived":false,"fork":false,"pushed_at":"2024-12-24T07:04:38.000Z","size":1793,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-24T07:39:26.012Z","etag":null,"topics":["cad","cloud-sdk-php","excel","excel-viewer","nodejs","npm","pdf","powerpoint-viewer","viewer-cloud-sdk","visio","word-viewer"],"latest_commit_sha":null,"homepage":"https://products.groupdocs.cloud/viewer/nodejs","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/groupdocs-viewer-cloud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-27T11:36:03.000Z","updated_at":"2024-12-24T06:45:02.000Z","dependencies_parsed_at":"2024-08-26T11:32:02.486Z","dependency_job_id":null,"html_url":"https://github.com/groupdocs-viewer-cloud/groupdocs-viewer-cloud-node","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/groupdocs-viewer-cloud%2Fgroupdocs-viewer-cloud-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/groupdocs-viewer-cloud%2Fgroupdocs-viewer-cloud-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/groupdocs-viewer-cloud%2Fgroupdocs-viewer-cloud-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/groupdocs-viewer-cloud%2Fgroupdocs-viewer-cloud-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/groupdocs-viewer-cloud","download_url":"https://codeload.github.com/groupdocs-viewer-cloud/groupdocs-viewer-cloud-node/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236652696,"owners_count":19183668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cad","cloud-sdk-php","excel","excel-viewer","nodejs","npm","pdf","powerpoint-viewer","viewer-cloud-sdk","visio","word-viewer"],"created_at":"2025-02-01T11:19:25.591Z","updated_at":"2025-10-15T23:31:13.159Z","avatar_url":"https://github.com/groupdocs-viewer-cloud.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GroupDocs.Viewer Cloud SDK for Node.js\nThis 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.\n\n## Installation\n\nA package `groupdocs-viewer-cloud` is available at [npmjs.com](https://www.npmjs.com/package/groupdocs-viewer-cloud). You can install it with:\n\n```shell\nnpm install groupdocs-viewer-cloud\n```\n\n## Getting Started\n\nBelow is an example demonstrating how to preview a document using `ConvertAndDownload` with GroupDocs.Viewer Cloud SDK for Node.js:\n\n```js\nconst GroupDocs = require('groupdocs-viewer-cloud');\nconst fs = require('fs');\n\n// Get your appSid and appKey at https://dashboard.groupdocs.cloud\nconst appSid = \"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\";\nconst appKey = \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\";\n\nconst configuration = new GroupDocs.Configuration(appSid, appKey);\nconst viewApi = new GroupDocs.ViewApi(configuration);\n\nconst format = \"jpg\";\nconst fileStream = fs.createReadStream(\"myfile.docx\");\nconst request = new GroupDocs.ConvertAndDownloadRequest(format, fileStream);\n\nviewApi.convertAndDownload(request)\n    .then((result) =\u003e {\n        fs.writeFileSync(\"myfile.jpg\", result);\n        console.log(\"Document converted and downloaded as JPG.\");\n    })\n    .catch((error) =\u003e {\n        console.log(\"Error: \" + error.message);\n    });\n```\n\nBelow is an example demonstrating how to upload a document, render it, and download the result using GroupDocs.Viewer Cloud SDK for Node.js:\n\n```js\nconst GroupDocs = require('groupdocs-viewer-cloud');\nconst fs = require('fs');\n\nconst appSid = \"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\";\nconst appKey = \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\";\n\nconst configuration = new GroupDocs.Configuration(appSid, appKey);\n\n// Upload a file to cloud storage\nconst fileApi = new GroupDocs.FileApi(configuration);\nconst uploadRequest = new GroupDocs.UploadFileRequest(\"myfile.docx\", fs.createReadStream(\"myfile.docx\"));\nfileApi.uploadFile(uploadRequest)\n    .then(() =\u003e {\n        // Render it to HTML\n        const viewApi = new GroupDocs.ViewApi(configuration);\n        const viewOptions = new GroupDocs.ViewOptions({\n            fileInfo: { filePath: \"myfile.docx\" },\n            viewFormat: \"HTML\",\n            outputPath: \"myfile.html\"\n        });\n        const createViewRequest = new GroupDocs.CreateViewRequest(viewOptions);\n        return viewApi.createView(createViewRequest);\n    })\n    .then(() =\u003e {\n        // Download the result\n        const downloadRequest = new GroupDocs.DownloadFileRequest(\"myfile.html\");\n        return fileApi.downloadFile(downloadRequest);\n    })\n    .then((result) =\u003e {\n        fs.writeFileSync(\"myfile.html\", result);\n        console.log(\"File rendered and downloaded successfully.\");\n    })\n    .catch((error) =\u003e {\n        console.log(\"Error: \" + error.message);\n    });\n```\n\nOr compile and run the same written in TypeScript:\n\n```ts\nimport { Configuration, FileApi, ViewApi, UploadFileRequest, ViewOptions, CreateViewRequest, DownloadFileRequest, ConvertAndDownloadRequest } from \"groupdocs-viewer-cloud\";\nimport * as fs from \"fs\";\n\nconst appSid: string = \"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\";\nconst appKey: string = \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\";\n\nconst configuration = new Configuration(appSid, appKey);\n\n// Convert and download\nconst viewApi = new ViewApi(configuration);\nconst format = \"jpg\";\nconst fileStream = fs.createReadStream(\"myfile.docx\");\nconst request = new ConvertAndDownloadRequest(format, fileStream);\n\nviewApi.convertAndDownload(request)\n    .then((result) =\u003e {\n        fs.writeFileSync(\"myfile.jpg\", result);\n        console.log(\"Document converted and downloaded as JPG.\");\n    })\n    .catch((error) =\u003e {\n        console.log(\"Error: \" + error.message);\n    });\n\n// Upload, render, and download\nconst fileApi = new FileApi(configuration);\nconst uploadRequest = new UploadFileRequest(\"myfile.docx\", fs.createReadStream(\"myfile.docx\"));\nfileApi.uploadFile(uploadRequest)\n    .then(() =\u003e {\n        const viewOptions = new ViewOptions({\n            fileInfo: { filePath: \"myfile.docx\" },\n            viewFormat: \"HTML\",\n            outputPath: \"myfile.html\"\n        });\n        const createViewRequest = new CreateViewRequest(viewOptions);\n        return viewApi.createView(createViewRequest);\n    })\n    .then(() =\u003e {\n        const downloadRequest = new DownloadFileRequest(\"myfile.html\");\n        return fileApi.downloadFile(downloadRequest);\n    })\n    .then((result) =\u003e {\n        fs.writeFileSync(\"myfile.html\", result);\n        console.log(\"File rendered and downloaded successfully.\");\n    })\n    .catch((error) =\u003e {\n        console.log(\"Error: \" + error.message);\n    });\n```\n\n## Licensing\nGroupDocs.Viewer Cloud Node.js SDK is licensed under [MIT License](LICENSE).\n\n## Resources\n+ [**Website**](https://www.groupdocs.cloud)\n+ [**Product Home**](https://products.groupdocs.cloud/viewer)\n+ [**Documentation**](https://docs.groupdocs.cloud/display/viewercloud/Home)\n+ [**Free Support Forum**](https://forum.groupdocs.cloud/c/viewer)\n+ [**Blog**](https://blog.groupdocs.cloud/category/viewer)\n\n## Contact Us\nYour feedback is very important to us. Please feel free to contact us using","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgroupdocs-viewer-cloud%2Fgroupdocs-viewer-cloud-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgroupdocs-viewer-cloud%2Fgroupdocs-viewer-cloud-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgroupdocs-viewer-cloud%2Fgroupdocs-viewer-cloud-node/lists"}