|
1 | | -# GroupDocs.Conversion Cloud Node.js SDK |
| 1 | +    [](https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-node/blob/master/LICENSE) |
2 | 2 |
|
3 | | -Node.js module for communicating with the GroupDocs.Conversion Cloud API |
| 3 | +# Node.js SDK to Convert Documents in the Cloud |
4 | 4 |
|
5 | | -## Installation |
| 5 | +[GroupDocs.Conversion Cloud SDK for Node.js](https://products.groupdocs.cloud/conversion/nodejs) wraps GroupDocs.Conversion RESTful APIs so you may integrate **Document Conversion** features in your own apps with zero initial cost. |
6 | 6 |
|
7 | | -A package `groupdocs-conversion-cloud` is available at [npmjs.com](https://www.npmjs.com/package/groupdocs-conversion-cloud). You can install it with: |
| 7 | +GroupDocs.Conversion Cloud API allows the developers to convert between 50+ file formats including Word documents, Excel spreadsheets, PowerPoint presentations, PDF, OpenDocument files, images & more. |
8 | 8 |
|
9 | | -```shell |
10 | | -npm install groupdocs-conversion-cloud |
11 | | -``` |
| 9 | +## Document Conversion REST API |
12 | 10 |
|
13 | | -## Getting Started |
| 11 | +- Convert the whole document to the desired target format. |
| 12 | +- Convert specific document page(s) or a page range. |
| 13 | +- Auto-detect source document format without requiring the file extension. |
| 14 | +- Load source document with extended options, such as specify password for password-protected documents. |
| 15 | +- Load specific part of the document. |
| 16 | +- Show or hide document comments. |
| 17 | +- Obtain all supported conversion formats list. |
| 18 | +- Replace missing fonts with any other font. |
| 19 | +- Add text or image watermarks to any page. |
| 20 | +- Specify resolution and quality for resultant images. |
| 21 | +- Extract metadata & basic information about the source document. |
| 22 | +- Integrated storage API. |
14 | 23 |
|
15 | | -Please follow the [installation](#installation) procedure and then run the following JavaScript code: |
| 24 | +Check out the [Developer's Guide](https://docs.groupdocs.cloud/conversion/developer-guide/) to know more about GroupDocs.Conversion REST API. |
16 | 25 |
|
17 | | -```js |
18 | | -// load the module |
19 | | -var GroupDocs = require('groupdocs-conversion-cloud'); |
20 | | - |
21 | | -// get your appSid and appKey at https://dashboard.groupdocs.cloud (free registration is required). |
22 | | -var appSid = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"; |
23 | | -var appKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; |
24 | | - |
25 | | -// construct Api |
26 | | -var api = GroupDocs.InfoApi.fromKeys(appSid, appKey); |
27 | | -var request = new GroupDocs.GetSupportedConversionTypesRequest(); |
28 | | -// retrieve supported conversion types |
29 | | -api.getSupportedConversionTypes(request) |
30 | | - .then(function (response) { |
31 | | - console.log("Supported file-formats:") |
32 | | - response.forEach(function (format) { |
33 | | - console.log(format.sourceFormat + ": [" + format.targetFormats.join(", ") + "]"); |
34 | | - }); |
35 | | - }) |
36 | | - .catch(function (error) { |
37 | | - console.log("Error: " + error.message) |
38 | | - }); |
39 | | -``` |
| 26 | +## Microsoft File Formats |
40 | 27 |
|
41 | | -Or compile and run same written in TypeScript: |
| 28 | +**Microsoft Word:** DOC, DOCM, DOCX, DOT, DOTM, DOTX\ |
| 29 | +**Microsoft Excel:** XLS, XLSX, XLSB, XLSM\ |
| 30 | +**Microsoft PowerPoint:** PPT, PPTX, PPS, PPSX\ |
| 31 | +**Microsoft Project:** MPP, MPT\ |
| 32 | +**Microsoft Outlook:** MSG, EML\ |
| 33 | +**Microsoft Visio:** VSD, VDX, VSS, VSX, VST, VTX, VSDX, VDW, VSSX, VSTX, VSDM, VSTM, VSSM\ |
| 34 | +**Microsoft OneNote:** ONE |
42 | 35 |
|
43 | | -```ts |
44 | | -// load the module |
45 | | -import { INfoApi, GetSupportedConversionTypesRequest } from "groupdocs-conversion-cloud"; |
| 36 | +## Other Formats |
46 | 37 |
|
47 | | -// get your appSid and appKey at https://dashboard.groupdocs.cloud (free registration is required). |
48 | | -const appSid: string = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"; |
49 | | -const appKey: string = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; |
| 38 | +**Page Layout Formats:** PDF, XPS\ |
| 39 | +**OpenDocument:** ODT, OTT, ODS, ODP, OTP, OTS, ODG\ |
| 40 | +**CAD:** DXF, DWG, IFC, STL\ |
| 41 | +**Images:** DCM, BMP, GIF, JPG, PNG, TIFF, WebP, DjVu, SVG, DNG, ICO\ |
| 42 | +**Web:** HTML, MHT, MHTML\ |
| 43 | +**Emails:** EML, EMLX\ |
| 44 | +**eBooks:** EPUB, MOBI\ |
| 45 | +**Metafile:** WMF, EMF\ |
| 46 | +**LaTeX:** TEX\ |
| 47 | +**Others:** TXT, RTF, CSV, TSV, XML |
50 | 48 |
|
51 | | -// construct Api |
52 | | -const api: InfoApi = InfoApi.fromKeys(appSid, appKey); |
| 49 | +## Get Started with GroupDocs.Conversion Cloud SDK for Node.js |
53 | 50 |
|
54 | | -const request: GetSupportedConversionTypesRequest = new GetSupportedConversionTypesRequest(); |
| 51 | +First create an account at [GroupDocs for Cloud](https://dashboard.groupdocs.cloud/) and get your application information. Next, execute the following command to get the package from npmjs.com. |
55 | 52 |
|
56 | | -// retrieve supported file-formats |
57 | | -api.getSupportedConversionTypes(request) |
58 | | - .then((result) => { |
59 | | - console.log("Supported file-formats:"); |
60 | | - result.forEach((format) => { |
61 | | - console.log(format.sourceFormat + ": [" + format.targetFormats.join(", ") + "]"); |
62 | | - }); |
63 | | - }) |
64 | | - .catch((error) => { |
65 | | - console.log("Error: " + error.message); |
66 | | - }); |
| 53 | +```shell |
| 54 | +npm install groupdocs-conversion-cloud |
67 | 55 | ``` |
68 | 56 |
|
69 | | -## Licensing |
| 57 | +## Convert DOCX to PDF in the Cloud |
70 | 58 |
|
71 | | -GroupDocs.Conversion Cloud Node.js SDK licensed under [MIT License](LICENSE). |
| 59 | +```js |
| 60 | +// Get your application information from https://dashboard.groupdocs.cloud |
| 61 | +global.conversion_cloud = require("groupdocs-conversion-cloud"); |
| 62 | + |
| 63 | +global.appSid = "XXXX-XXXX-XXXX-XXXX"; |
| 64 | +global.appKey = "XXXXXXXXXXXXXXXX"; |
| 65 | + |
| 66 | +global.convertApi = conversion_cloud.ConvertApi.fromKeys(appSid, appKey); |
| 67 | + |
| 68 | +let settings = new conversion_cloud.ConvertSettings(); |
| 69 | +settings.filePath = "WordProcessing/four-pages.docx"; |
| 70 | +settings.format = "pdf"; |
| 71 | +settings.outputPath = "converted"; |
| 72 | + |
| 73 | +let result = await convertApi.convertDocument(new conversion_cloud.ConvertDocumentRequest(settings)); |
| 74 | +``` |
72 | 75 |
|
73 | | -## Resources |
74 | | -+[**Website**](https://www.groupdocs.cloud) |
75 | | -+[**Product Home**](https://products.groupdocs.cloud/conversion) |
76 | | -+[**Documentation**](https://docs.groupdocs.cloud/conversion) |
77 | | -+[**Free Support Forum**](https://forum.groupdocs.cloud/c/conversion) |
78 | | -+[**Blog**](https://blog.groupdocs.cloud/category/conversion) |
| 76 | +## GroupDocs.Conversion Cloud SDKs in Popular Languages |
79 | 77 |
|
80 | | -## Contact Us |
| 78 | +| .NET | Java | PHP | Python | Ruby | Node.js | Android | |
| 79 | +|---|---|---|---|---|---|---| |
| 80 | +| [GitHub](https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-dotnet) | [GitHub](https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-java) | [GitHub](https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-php) | [GitHub](https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-python) | [GitHub](https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-ruby) | [GitHub](https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-node) | [GitHub](https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-android) | |
| 81 | +| [NuGet](https://www.nuget.org/packages/GroupDocs.Conversion-Cloud/) | [Maven](https://repository.groupdocs.cloud/webapp/#/artifacts/browse/tree/General/repo/com/groupdocs/groupdocs-conversion-cloud) | [Composer](https://packagist.org/packages/groupdocscloud/groupdocs-conversion-cloud) | [PIP](https://pypi.org/project/groupdocs-conversion-cloud/) | [GEM](https://rubygems.org/gems/groupdocs_conversion_cloud) | [NPM](https://www.npmjs.com/package/groupdocs-conversion-cloud) | | |
81 | 82 |
|
82 | | -Your feedback is very important to us. Please feel free to contact us using our [Support Forums](https://forum.groupdocs.cloud/c/conversion). |
| 83 | +[Home](https://www.groupdocs.cloud/) | [Product Page](https://products.groupdocs.cloud/conversion/nodejs) | [Documentation](https://docs.groupdocs.cloud/conversion/) | [Live Demo](https://products.groupdocs.app/conversion/total) | [API Reference](https://apireference.groupdocs.cloud/conversion/) | [Code Samples](https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-node-samples) | [Blog](https://blog.groupdocs.cloud/category/conversion/) | [Free Support](https://forum.groupdocs.cloud/c/conversion) | [Free Trial](https://dashboard.groupdocs.cloud) |
0 commit comments