diff --git a/README.md b/README.md
index e073a062..0e18ed91 100644
--- a/README.md
+++ b/README.md
@@ -30,11 +30,12 @@ XLS, XLSX, PPTX, DOC, DOCX, MobiXML, JPEG, EMF, PNG, BMP, GIF, TIFF, Text
## Read PDF Formats
MHT, PCL, PS, XSLFO, MD
-## Enhancements in Version 24.4
-- Convert PDF to optimized Text.
-- Convert PDF to EXCEL without Cloud Storage.
+## Enhancements in Version 24.5
- A new version of Aspose.PDF Cloud was prepared using the latest version of Aspose.PDF for .NET.
+## Bugs fixed in Version 24.5
+- Aspose.PDF Cloud Service Throws Bad Gateway Error intermittently.
+
## Installation
### NPM
diff --git a/docs/PdfApi.md b/docs/PdfApi.md
index 478546dc..1b2ee98b 100644
--- a/docs/PdfApi.md
+++ b/docs/PdfApi.md
@@ -209,6 +209,7 @@ Method | HTTP request | Description
*PdfApi* | [**postDocumentTextReplace**](PdfApi.md#postDocumentTextReplace) | **POST** /pdf/\{name}/text/replace | Document's replace text method.
*PdfApi* | [**postEncryptDocumentInStorage**](PdfApi.md#postEncryptDocumentInStorage) | **POST** /pdf/\{name}/encrypt | Encrypt document in storage.
*PdfApi* | [**postFlattenDocument**](PdfApi.md#postFlattenDocument) | **POST** /pdf/\{name}/flatten | Flatten the document.
+*PdfApi* | [**postHtmlToPdf**](PdfApi.md#postHtmlToPdf) | **POST** /pdf/create/html | Convert HTML file (zip archive in request content) to PDF format and return resulting file in response.
*PdfApi* | [**postImportFieldsFromFdf**](PdfApi.md#postImportFieldsFromFdf) | **POST** /pdf/\{name}/import/fdf | Update fields from FDF file in request.
*PdfApi* | [**postImportFieldsFromXfdf**](PdfApi.md#postImportFieldsFromXfdf) | **POST** /pdf/\{name}/import/xfdf | Update fields from XFDF file in request.
*PdfApi* | [**postImportFieldsFromXml**](PdfApi.md#postImportFieldsFromXml) | **POST** /pdf/\{name}/import/xml | Update fields from XML file in request.
@@ -5159,6 +5160,33 @@ Name | Type | Description | Notes
- **Content-Type**: application/json
- **Accept**: application/json
+
+## **postHtmlToPdf**
+> postHtmlToPdf(htmlFileName, height, width, isLandscape, marginLeft, marginBottom, marginRight, marginTop)
+
+Convert HTML file (zip archive in request content) to PDF format and return resulting file in response.
+
+### Parameters
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+**htmlFileName** | **string** | Name of HTML file in ZIP. | [optional]
+**height** | **number** | Page height | [optional]
+**width** | **number** | Page width | [optional]
+**isLandscape** | **boolean** | Is page landscaped | [optional]
+**marginLeft** | **number** | Page margin left | [optional]
+**marginBottom** | **number** | Page margin bottom | [optional]
+**marginRight** | **number** | Page margin right | [optional]
+**marginTop** | **number** | Page margin top | [optional]
+
+### Return type
+
+**Buffer**
+
+### HTTP request headers
+
+ - **Content-Type**: multipart/form-data
+ - **Accept**: multipart/form-data
+
## **postImportFieldsFromFdf**
> postImportFieldsFromFdf(name, storage, folder, fdfData)
diff --git a/package-lock.json b/package-lock.json
index 190d7afd..98e8b33d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "asposepdfcloud",
- "version": "24.4.0",
+ "version": "24.5.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "asposepdfcloud",
- "version": "24.4.0",
+ "version": "24.5.0",
"license": "MIT",
"dependencies": {
"@types/bluebird": "*",
diff --git a/package.json b/package.json
index f47fe2f7..3e5942ca 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "asposepdfcloud",
- "version": "24.4.0",
+ "version": "24.5.0",
"description": "Aspose.PDF Cloud is a REST API for creating and editing PDF files. Most popular features proposed by Aspose.PDF Cloud: PDF to Word, Convert PDF to Image, Merge PDF, Split PDF, Add Images to PDF, Rotate PDF. It can also be used to convert PDF files to different formats like DOC, HTML, XPS, TIFF and many more. Aspose.PDF Cloud gives you control: create PDFs from scratch or from HTML, XML, template, database, XPS or an image. Render PDFs to image formats such as JPEG, PNG, GIF, BMP, TIFF and many others. Aspose.PDF Cloud helps you manipulate elements of a PDF file like text, annotations, watermarks, signatures, bookmarks, stamps and so on. Its REST API also allows you to manage PDF pages by using features like merging, splitting, and inserting. Add images to a PDF file or convert PDF pages to images.",
"homepage": "https://products.aspose.cloud/pdf/cloud",
"author": {
diff --git a/src/api/api.ts b/src/api/api.ts
index c3116d7e..f3818bd0 100644
--- a/src/api/api.ts
+++ b/src/api/api.ts
@@ -12814,6 +12814,81 @@ export class PdfApi {
}
+ /**
+ *
+ * @summary Convert HTML file (zip archive in request content) to PDF format and return resulting file in response.
+ * @param htmlFileName Name of HTML file in ZIP.
+ * @param height Page height
+ * @param width Page width
+ * @param isLandscape Is page landscaped
+ * @param marginLeft Page margin left
+ * @param marginBottom Page margin bottom
+ * @param marginRight Page margin right
+ * @param marginTop Page margin top
+ */
+ public async postHtmlToPdf (htmlFileName?: string, height?: number, width?: number, isLandscape?: boolean, marginLeft?: number, marginBottom?: number, marginRight?: number, marginTop?: number) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
+ const localVarPath = this.basePath + '/pdf/create/html';
+ let localVarQueryParameters: any = {};
+ let localVarHeaderParams: any = (Object).assign({}, this.defaultHeaders);
+ let localVarFormParams: any = {};
+
+ if (htmlFileName !== undefined && null !== htmlFileName) {
+ localVarQueryParameters['htmlFileName'] = ObjectSerializer.serialize(htmlFileName, "string");
+ }
+
+ if (height !== undefined && null !== height) {
+ localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
+ }
+
+ if (width !== undefined && null !== width) {
+ localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
+ }
+
+ if (isLandscape !== undefined && null !== isLandscape) {
+ localVarQueryParameters['isLandscape'] = ObjectSerializer.serialize(isLandscape, "boolean");
+ }
+
+ if (marginLeft !== undefined && null !== marginLeft) {
+ localVarQueryParameters['marginLeft'] = ObjectSerializer.serialize(marginLeft, "number");
+ }
+
+ if (marginBottom !== undefined && null !== marginBottom) {
+ localVarQueryParameters['marginBottom'] = ObjectSerializer.serialize(marginBottom, "number");
+ }
+
+ if (marginRight !== undefined && null !== marginRight) {
+ localVarQueryParameters['marginRight'] = ObjectSerializer.serialize(marginRight, "number");
+ }
+
+ if (marginTop !== undefined && null !== marginTop) {
+ localVarQueryParameters['marginTop'] = ObjectSerializer.serialize(marginTop, "number");
+ }
+
+
+ let localVarUseFormData = false;
+ let fileData = null;
+ let localVarRequestOptions: localVarRequest.Options = {
+ method: 'POST',
+ qs: localVarQueryParameters,
+ headers: localVarHeaderParams,
+ uri: localVarPath,
+ useQuerystring: this._useQuerystring,
+ encoding: null,
+ };
+
+ if (Object.keys(localVarFormParams).length) {
+ if (localVarUseFormData) {
+ (localVarRequestOptions).formData = localVarFormParams;
+ } else {
+ localVarRequestOptions.form = localVarFormParams;
+ }
+ }
+ const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
+ const result = ObjectSerializer.deserialize(response.body, "Buffer");
+ return Promise.resolve({body: result, response});
+ }
+
+
/**
*
* @summary Update fields from FDF file in request.
diff --git a/src/requestHelper.ts b/src/requestHelper.ts
index 0ed6af99..ec45a571 100644
--- a/src/requestHelper.ts
+++ b/src/requestHelper.ts
@@ -95,7 +95,7 @@ async function invokeApiMethodInternal(requestOptions: request.Options, confgura
//headers
sa.set("User-Agent", "pdf nodejs sdk");
sa.set("x-aspose-client", "nodejs sdk");
- sa.set("x-aspose-client-version", "24.4.0");
+ sa.set("x-aspose-client-version", "24.5.0");
if (!requestOptions.headers) {
requestOptions.headers = {};