Skip to content

Commit bf8075c

Browse files
committed
Updated sources
1 parent 76aeb34 commit bf8075c

18 files changed

Lines changed: 112 additions & 86 deletions

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2003-2020 Aspose Pty Ltd
3+
Copyright (c) 2003-2018 Aspose Pty Ltd
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

README.md

Lines changed: 63 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,82 @@
1-
![](https://img.shields.io/badge/api-v2.0-lightgrey) ![npm](https://img.shields.io/npm/v/groupdocs-conversion-cloud) ![node-current](https://img.shields.io/node/v/groupdocs-conversion-cloud) ![npm type definitions](https://img.shields.io/npm/types/groupdocs-conversion-cloud) [![GitHub license](https://img.shields.io/github/license/groupdocs-conversion-cloud/groupdocs-conversion-cloud-node)](https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-node/blob/master/LICENSE)
1+
# GroupDocs.Conversion Cloud Node.js SDK
22

3-
# Node.js SDK to Convert Documents in the Cloud
3+
Node.js module for communicating with the GroupDocs.Conversion Cloud API
44

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.
5+
## Installation
66

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.
7+
A package `groupdocs-conversion-cloud` is available at [npmjs.com](https://www.npmjs.com/package/groupdocs-conversion-cloud). You can install it with:
88

9-
## Document Conversion REST API
9+
```shell
10+
npm install groupdocs-conversion-cloud
11+
```
1012

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.
13+
## Getting Started
2314

24-
Check out the [Developer's Guide](https://docs.groupdocs.cloud/conversion/developer-guide/) to know more about GroupDocs.Conversion REST API.
15+
Please follow the [installation](#installation) procedure and then run the following JavaScript code:
2516

26-
## Microsoft File Formats
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+
```
2740

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
41+
Or compile and run same written in TypeScript:
3542

36-
## Other Formats
43+
```ts
44+
// load the module
45+
import { INfoApi, GetSupportedConversionTypesRequest } from "groupdocs-conversion-cloud";
3746

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
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";
4850

49-
## Get Started with GroupDocs.Conversion Cloud SDK for Node.js
51+
// construct Api
52+
const api: InfoApi = InfoApi.fromKeys(appSid, appKey);
5053

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.
54+
const request: GetSupportedConversionTypesRequest = new GetSupportedConversionTypesRequest();
5255

53-
```shell
54-
npm install groupdocs-conversion-cloud
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+
});
5567
```
5668

57-
## Convert DOCX to PDF in the Cloud
69+
## Licensing
5870

59-
```js
60-
// Get your application information from https://dashboard.groupdocs.cloud
61-
global.conversion_cloud = require("groupdocs-conversion-cloud");
62-
63-
// Get Client Id and Client Secret from https://dashboard.groupdocs.cloud
64-
const myClientId: string = "";
65-
const myClientSecret: string = "";
66-
67-
// Create instance of the API
68-
const configuration: Configuration = conversion_cloud.Configuration(myClientId, myClientSecret);
69-
const convertApi: ConvertApi = conversion_cloud.ConvertApi.fromConfig(configuration);
70-
71-
let settings = new conversion_cloud.ConvertSettings();
72-
settings.filePath = "WordProcessing/four-pages.docx";
73-
settings.format = "pdf";
74-
settings.outputPath = "converted";
75-
76-
let result = await convertApi.convertDocument(new conversion_cloud.ConvertDocumentRequest(settings));
77-
```
71+
GroupDocs.Conversion Cloud Node.js SDK licensed under [MIT License](LICENSE).
7872

79-
## GroupDocs.Conversion Cloud SDKs in Popular Languages
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)
8079

81-
| .NET | Java | PHP | Python | Ruby | Node.js | Android |
82-
|---|---|---|---|---|---|---|
83-
| [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) |
84-
| [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) | |
80+
## Contact Us
8581

86-
[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)
82+
Your feedback is very important to us. Please feel free to contact us using our [Support Forums](https://forum.groupdocs.cloud/c/conversion).

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "groupdocs-conversion-cloud",
3-
"version": "20.11.0",
3+
"version": "21.4.0",
44
"description": "GroupDocs.Conversion Cloud SDK for Node.js",
55
"homepage": "https://products.groupdocs.cloud/conversion",
66
"author": {

src/api_client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* The MIT License (MIT)
33
*
4-
* Copyright (c) 2003-2019 Aspose Pty Ltd
4+
* Copyright (c) 2003-2021 Aspose Pty Ltd
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

src/api_error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* The MIT License (MIT)
33
*
4-
* Copyright (c) 2003-2019 Aspose Pty Ltd
4+
* Copyright (c) 2003-2021 Aspose Pty Ltd
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

src/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* The MIT License (MIT)
33
*
4-
* Copyright (c) 2003-2019 Aspose Pty Ltd
4+
* Copyright (c) 2003-2021 Aspose Pty Ltd
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

src/configuration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* The MIT License (MIT)
33
*
4-
* Copyright (c) 2003-2019 Aspose Pty Ltd
4+
* Copyright (c) 2003-2021 Aspose Pty Ltd
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

src/conversion_api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* The MIT License (MIT)
33
*
4-
* Copyright (c) 2003-2020 Aspose Pty Ltd
4+
* Copyright (c) 2003-2021 Aspose Pty Ltd
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal

src/model.ts

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* The MIT License (MIT)
33
*
4-
* Copyright (c) 2003-2020 Aspose Pty Ltd
4+
* Copyright (c) 2003-2021 Aspose Pty Ltd
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -115,6 +115,11 @@ export class ConvertSettings {
115115
name: "outputPath",
116116
baseName: "outputPath",
117117
type: "string",
118+
},
119+
{
120+
name: "fontsPath",
121+
baseName: "fontsPath",
122+
type: "string",
118123
} ];
119124

120125
/**
@@ -154,6 +159,11 @@ export class ConvertSettings {
154159
*/
155160
public outputPath: string;
156161

162+
/**
163+
* The path to directory containing custom fonts in storage
164+
*/
165+
public fontsPath: string;
166+
157167
public constructor(init?: Partial<ConvertSettings>) {
158168

159169
Object.assign(this, init);
@@ -966,6 +976,16 @@ export class WatermarkOptions {
966976
baseName: "fontSize",
967977
type: "number",
968978
},
979+
{
980+
name: "bold",
981+
baseName: "bold",
982+
type: "boolean",
983+
},
984+
{
985+
name: "italic",
986+
baseName: "italic",
987+
type: "boolean",
988+
},
969989
{
970990
name: "color",
971991
baseName: "color",
@@ -1034,6 +1054,16 @@ export class WatermarkOptions {
10341054
*/
10351055
public fontSize: number;
10361056

1057+
/**
1058+
* Watermark font bold style if text watermark is applied
1059+
*/
1060+
public bold: boolean;
1061+
1062+
/**
1063+
* Watermark font italic style if text watermark is applied
1064+
*/
1065+
public italic: boolean;
1066+
10371067
/**
10381068
* Watermark font color if text watermark is applied
10391069
*/

src/package_version.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* The MIT License (MIT)
33
*
4-
* Copyright (c) 2003-2020 Aspose Pty Ltd
4+
* Copyright (c) 2003-2021 Aspose Pty Ltd
55
*
66
* Permission is hereby granted, free of charge, to any person obtaining a copy
77
* of this software and associated documentation files (the "Software"), to deal
@@ -25,4 +25,4 @@
2525
/**
2626
* Package version
2727
*/
28-
export const PackageVersion: string = "20.11.0";
28+
export const PackageVersion: string = "21.4.0";

0 commit comments

Comments
 (0)