Skip to content

Commit 7847f60

Browse files
update to 23.6
1 parent 8420e0a commit 7847f60

File tree

7 files changed

+70
-18
lines changed

7 files changed

+70
-18
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,14 @@ XLS, XLSX, PPTX, DOC, DOCX, MobiXML, JPEG, EMF, PNG, BMP, GIF, TIFF, Text
3030
## Read PDF Formats
3131
MHT, PCL, PS, XSLFO, MD
3232

33-
## Enhancements in Version 23.5
33+
## Enhancements in Version 23.6
34+
- Support to convert password protected PDF documents to PPTX.
3435
- A new version of Aspose.PDF Cloud was prepared using the latest version of Aspose.PDF for .NET.
3536

37+
## Bugs fixed in Version 23.6
38+
- Text Replacement API constantly hitting 504 Gateway Timeout.
39+
40+
3641
## Installation
3742

3843
### NPM

docs/PdfApi.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3734,7 +3734,7 @@ Name | Type | Description | Notes
37343734

37353735
<a name="getPdfInStorageToPptx"></a>
37363736
## **getPdfInStorageToPptx**
3737-
> getPdfInStorageToPptx(name, separateImages, slidesAsImages, folder, storage)
3737+
> getPdfInStorageToPptx(name, separateImages, slidesAsImages, folder, storage, password)
37383738
37393739
Converts PDF document (located on storage) to PPTX format and returns resulting file in response content
37403740

@@ -3746,6 +3746,7 @@ Name | Type | Description | Notes
37463746
**slidesAsImages** | **boolean** | Slides as images. | [optional]
37473747
**folder** | **string** | The document folder. | [optional]
37483748
**storage** | **string** | The document storage. | [optional]
3749+
**password** | **string** | Base64 encoded password. | [optional]
37493750

37503751
### Return type
37513752

@@ -7544,7 +7545,7 @@ Name | Type | Description | Notes
75447545

75457546
<a name="putPdfInRequestToPptx"></a>
75467547
## **putPdfInRequestToPptx**
7547-
> putPdfInRequestToPptx(outPath, separateImages, slidesAsImages, storage, file)
7548+
> putPdfInRequestToPptx(outPath, separateImages, slidesAsImages, storage, password, file)
75487549
75497550
Converts PDF document (in request content) to PPTX format and uploads resulting file to storage.
75507551

@@ -7555,6 +7556,7 @@ Name | Type | Description | Notes
75557556
**separateImages** | **boolean** | Separate images. | [optional]
75567557
**slidesAsImages** | **boolean** | Slides as images. | [optional]
75577558
**storage** | **string** | The document storage. | [optional]
7559+
**password** | **string** | Base64 encoded password. | [optional]
75587560
**file** | **Buffer** | A file to be converted. | [optional]
75597561

75607562
### Return type
@@ -7901,7 +7903,7 @@ Name | Type | Description | Notes
79017903

79027904
<a name="putPdfInStorageToPptx"></a>
79037905
## **putPdfInStorageToPptx**
7904-
> putPdfInStorageToPptx(name, outPath, separateImages, slidesAsImages, folder, storage)
7906+
> putPdfInStorageToPptx(name, outPath, separateImages, slidesAsImages, folder, storage, password)
79057907
79067908
Converts PDF document (located on storage) to PPTX format and uploads resulting file to storage
79077909

@@ -7914,6 +7916,7 @@ Name | Type | Description | Notes
79147916
**slidesAsImages** | **boolean** | Slides as images. | [optional]
79157917
**folder** | **string** | The document folder. | [optional]
79167918
**storage** | **string** | The document storage. | [optional]
7919+
**password** | **string** | Base64 encoded password. | [optional]
79177920

79187921
### Return type
79197922

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "asposepdfcloud",
3-
"version": "23.5.0",
3+
"version": "23.6.0",
44
"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.",
55
"homepage": "https://products.aspose.cloud/pdf/cloud",
66
"author": {

src/api/api.ts

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8957,8 +8957,9 @@ export class PdfApi {
89578957
* @param slidesAsImages Slides as images.
89588958
* @param folder The document folder.
89598959
* @param storage The document storage.
8960+
* @param password Base64 encoded password.
89608961
*/
8961-
public async getPdfInStorageToPptx (name: string, separateImages?: boolean, slidesAsImages?: boolean, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
8962+
public async getPdfInStorageToPptx (name: string, separateImages?: boolean, slidesAsImages?: boolean, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
89628963
const localVarPath = this.basePath + '/pdf/{name}/convert/pptx'
89638964
.replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
89648965
let localVarQueryParameters: any = {};
@@ -8986,6 +8987,10 @@ export class PdfApi {
89868987
localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
89878988
}
89888989

8990+
if (password !== undefined && null !== password) {
8991+
localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
8992+
}
8993+
89898994

89908995
let localVarUseFormData = false;
89918996
let fileData = null;
@@ -19524,9 +19529,10 @@ export class PdfApi {
1952419529
* @param separateImages Separate images.
1952519530
* @param slidesAsImages Slides as images.
1952619531
* @param storage The document storage.
19532+
* @param password Base64 encoded password.
1952719533
* @param file A file to be converted.
1952819534
*/
19529-
public async putPdfInRequestToPptx (outPath: string, separateImages?: boolean, slidesAsImages?: boolean, storage?: string, file?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse; }> {
19535+
public async putPdfInRequestToPptx (outPath: string, separateImages?: boolean, slidesAsImages?: boolean, storage?: string, password?: string, file?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse; }> {
1953019536
const localVarPath = this.basePath + '/pdf/convert/pptx';
1953119537
let localVarQueryParameters: any = {};
1953219538
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
@@ -19553,6 +19559,10 @@ export class PdfApi {
1955319559
localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
1955419560
}
1955519561

19562+
if (password !== undefined && null !== password) {
19563+
localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
19564+
}
19565+
1955619566

1955719567
let localVarUseFormData = false;
1955819568
let fileData = null;
@@ -20635,8 +20645,9 @@ export class PdfApi {
2063520645
* @param slidesAsImages Slides as images.
2063620646
* @param folder The document folder.
2063720647
* @param storage The document storage.
20648+
* @param password Base64 encoded password.
2063820649
*/
20639-
public async putPdfInStorageToPptx (name: string, outPath: string, separateImages?: boolean, slidesAsImages?: boolean, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse; }> {
20650+
public async putPdfInStorageToPptx (name: string, outPath: string, separateImages?: boolean, slidesAsImages?: boolean, folder?: string, storage?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse; }> {
2064020651
const localVarPath = this.basePath + '/pdf/{name}/convert/pptx'
2064120652
.replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
2064220653
let localVarQueryParameters: any = {};
@@ -20673,6 +20684,10 @@ export class PdfApi {
2067320684
localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
2067420685
}
2067520686

20687+
if (password !== undefined && null !== password) {
20688+
localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
20689+
}
20690+
2067620691

2067720692
let localVarUseFormData = false;
2067820693
let fileData = null;

src/requestHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ async function invokeApiMethodInternal(requestOptions: request.Options, confgura
9393
//headers
9494
sa.set("User-Agent", "pdf nodejs sdk");
9595
sa.set("x-aspose-client", "nodejs sdk");
96-
sa.set("x-aspose-client-version", "23.5.0");
96+
sa.set("x-aspose-client-version", "23.6.0");
9797

9898
if (!requestOptions.headers) {
9999
requestOptions.headers = {};

test/testConvert.ts

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -421,34 +421,63 @@ describe("Convert Tests", () => {
421421
const outPath = BaseTest.remoteTempFolder + "/" + resFileName;
422422

423423
describe("GetPdfInStorageToPptx Test", () => {
424-
425424
it("should return response with code 200", async () => {
426-
427425
return BaseTest.getPdfApi().getPdfInStorageToPptx(simplePdf, null, null, BaseTest.remoteTempFolder)
428426
.then((result) => {
429427
assert.equal(result.response.statusCode, 200);
430428
});
431429
});
432430
});
433431

434-
describe("PutPdfInStorageToPptx Test", () => {
435-
432+
describe("GetPdfInStorageToPptxWithPassword Test", () => {
436433
it("should return response with code 200", async () => {
434+
const name = "4pagesEncrypted.pdf";
435+
await BaseTest.uploadFile(name);
436+
const userPassword = 'user $^Password!&';
437+
return BaseTest.getPdfApi().getPdfInStorageToPptx(name, null, null, BaseTest.remoteTempFolder, null, BaseTest.toBase64(userPassword))
438+
.then((result) => {
439+
assert.equal(result.response.statusCode, 200);
440+
});
441+
});
442+
});
437443

444+
describe("PutPdfInStorageToPptx Test", () => {
445+
it("should return response with code 200", async () => {
438446
return BaseTest.getPdfApi().putPdfInStorageToPptx(simplePdf, outPath, null, null, BaseTest.remoteTempFolder)
439447
.then((result) => {
440448
assert.equal(result.response.statusCode, 200);
441449
});
442450
});
443451
});
444452

445-
describe("PutPdfInRequestToPptx Test", () => {
446-
453+
describe("PutPdfInStorageToPptxWithPassword Test", () => {
447454
it("should return response with code 200", async () => {
455+
const name = "4pagesEncrypted.pdf";
456+
await BaseTest.uploadFile(name);
457+
const userPassword = 'user $^Password!&';
458+
return BaseTest.getPdfApi().putPdfInStorageToPptx(simplePdf, outPath, null, null, BaseTest.remoteTempFolder, null, BaseTest.toBase64(userPassword))
459+
.then((result) => {
460+
assert.equal(result.response.statusCode, 200);
461+
});
462+
});
463+
});
448464

465+
describe("PutPdfInRequestToPptx Test", () => {
466+
it("should return response with code 200", async () => {
449467
var data = fs.readFileSync(BaseTest.localTestDataFolder + "/" + simplePdf);
468+
return BaseTest.getPdfApi().putPdfInRequestToPptx(outPath, null, null, null, null, data)
469+
.then((result) => {
470+
assert.equal(result.response.statusCode, 200);
471+
});
472+
});
473+
});
450474

451-
return BaseTest.getPdfApi().putPdfInRequestToPptx(outPath, null, null, null, data)
475+
describe("PutPdfInRequestToPptxWithPassword Test", () => {
476+
it("should return response with code 200", async () => {
477+
const name = "4pagesEncrypted.pdf";
478+
const userPassword = 'user $^Password!&';
479+
var data = fs.readFileSync(BaseTest.localTestDataFolder + "/" + name);
480+
return BaseTest.getPdfApi().putPdfInRequestToPptx(outPath, null, null, null, BaseTest.toBase64(userPassword), data)
452481
.then((result) => {
453482
assert.equal(result.response.statusCode, 200);
454483
});

0 commit comments

Comments
 (0)