Skip to content

Commit 519d2dc

Browse files
authored
Merge pull request #136 from aspose-pdf-cloud/develop
update to 25.8
2 parents 77c5de5 + 2bdb0f9 commit 519d2dc

File tree

7 files changed

+131
-8
lines changed

7 files changed

+131
-8
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ 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 25.7
34-
- Add possibility to hide subject field in signature appearance.
33+
## Enhancements in Version 25.8
34+
- Implement document page resize functionality using the Pdf.Cloud API library.
3535
- A new version of Aspose.PDF Cloud was prepared using the latest version of Aspose.PDF for .NET.
3636

37-
## Bugs fixed in Version 25.7
38-
- PostDeleteStamps removing stamps from PDF page is incorrect.
37+
## Bugs fixed in Version 25.8
38+
- Implement delete watermark from PDF document using the Pdf.Cloud API library.
3939

4040
## Installation
4141

docs/PdfApi.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ Method | HTTP request | Description
212212
*PdfApi* | [**postDocumentImageStamps**](PdfApi.md#postDocumentImageStamps) | **POST** /pdf/\{name}/stamps/image | Add document pages image stamps.
213213
*PdfApi* | [**postDocumentImageStampsPageSpecified**](PdfApi.md#postDocumentImageStampsPageSpecified) | **POST** /pdf/\{name}/stamps/image/pagespecified | Add document image stamps to specified pages.
214214
*PdfApi* | [**postDocumentPageNumberStamps**](PdfApi.md#postDocumentPageNumberStamps) | **POST** /pdf/\{name}/stamps/pagenumber | Add document page number stamps.
215+
*PdfApi* | [**postDocumentPagesResize**](PdfApi.md#postDocumentPagesResize) | **POST** /pdf/\{name}/resize | Rsize PDF document.
215216
*PdfApi* | [**postDocumentPagesRotate**](PdfApi.md#postDocumentPagesRotate) | **POST** /pdf/\{name}/rotate | Rotate PDF document.
216217
*PdfApi* | [**postDocumentTextFooter**](PdfApi.md#postDocumentTextFooter) | **POST** /pdf/\{name}/footer/text | Add document text footer.
217218
*PdfApi* | [**postDocumentTextHeader**](PdfApi.md#postDocumentTextHeader) | **POST** /pdf/\{name}/header/text | Add document text header.
@@ -5238,6 +5239,32 @@ Name | Type | Description | Notes
52385239

52395240
[**AsposeResponse**](AsposeResponse.md)
52405241

5242+
### HTTP request headers
5243+
5244+
- **Content-Type**: application/json
5245+
- **Accept**: application/json
5246+
5247+
<a name="postDocumentPagesResize"></a>
5248+
## **postDocumentPagesResize**
5249+
> postDocumentPagesResize(name, height, width, pages, storage, folder, password)
5250+
5251+
Rsize PDF document.
5252+
5253+
### Parameters
5254+
Name | Type | Description | Notes
5255+
------------- | ------------- | ------------- | -------------
5256+
**name** | **string** | The document name. |
5257+
**height** | **number** | Page Height |
5258+
**width** | **number** | Page width |
5259+
**pages** | **string** | Comma separated list of pages and page ranges. (Example: 1,3-5,8) |
5260+
**storage** | **string** | The document storage. | [optional]
5261+
**folder** | **string** | The document folder. | [optional]
5262+
**password** | **string** | Base64 encoded password. | [optional]
5263+
5264+
### Return type
5265+
5266+
[**AsposeResponse**](AsposeResponse.md)
5267+
52415268
### HTTP request headers
52425269

52435270
- **Content-Type**: application/json

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": "25.7.0",
3+
"version": "25.8.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: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13006,6 +13006,93 @@ export class PdfApi {
1300613006
}
1300713007

1300813008

13009+
/**
13010+
*
13011+
* @summary Rsize PDF document.
13012+
* @param name The document name.
13013+
* @param height Page Height
13014+
* @param width Page width
13015+
* @param pages Comma separated list of pages and page ranges. (Example: 1,3-5,8)
13016+
* @param storage The document storage.
13017+
* @param folder The document folder.
13018+
* @param password Base64 encoded password.
13019+
*/
13020+
public async postDocumentPagesResize (name: string, height: number, width: number, pages: string, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse; }> {
13021+
const localVarPath = this.basePath + '/pdf/{name}/resize'
13022+
.replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
13023+
let localVarQueryParameters: any = {};
13024+
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
13025+
let localVarFormParams: any = {};
13026+
13027+
// verify required parameter 'name' is not null or undefined
13028+
if (name === null || name === undefined) {
13029+
throw new Error('Required parameter name was null or undefined when calling postDocumentPagesResize.');
13030+
}
13031+
13032+
// verify required parameter 'height' is not null or undefined
13033+
if (height === null || height === undefined) {
13034+
throw new Error('Required parameter height was null or undefined when calling postDocumentPagesResize.');
13035+
}
13036+
13037+
// verify required parameter 'width' is not null or undefined
13038+
if (width === null || width === undefined) {
13039+
throw new Error('Required parameter width was null or undefined when calling postDocumentPagesResize.');
13040+
}
13041+
13042+
// verify required parameter 'pages' is not null or undefined
13043+
if (pages === null || pages === undefined) {
13044+
throw new Error('Required parameter pages was null or undefined when calling postDocumentPagesResize.');
13045+
}
13046+
13047+
if (height !== undefined && null !== height) {
13048+
localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
13049+
}
13050+
13051+
if (width !== undefined && null !== width) {
13052+
localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
13053+
}
13054+
13055+
if (pages !== undefined && null !== pages) {
13056+
localVarQueryParameters['pages'] = ObjectSerializer.serialize(pages, "string");
13057+
}
13058+
13059+
if (storage !== undefined && null !== storage) {
13060+
localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
13061+
}
13062+
13063+
if (folder !== undefined && null !== folder) {
13064+
localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
13065+
}
13066+
13067+
if (password !== undefined && null !== password) {
13068+
localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
13069+
}
13070+
13071+
13072+
let localVarUseFormData = false;
13073+
let fileData = null;
13074+
let localVarRequestOptions: localVarRequest.Options = {
13075+
method: 'POST',
13076+
qs: localVarQueryParameters,
13077+
headers: localVarHeaderParams,
13078+
uri: localVarPath,
13079+
useQuerystring: this._useQuerystring,
13080+
json: true,
13081+
};
13082+
13083+
if (Object.keys(localVarFormParams).length) {
13084+
if (localVarUseFormData) {
13085+
(<any>localVarRequestOptions).formData = localVarFormParams;
13086+
} else {
13087+
localVarRequestOptions.form = localVarFormParams;
13088+
}
13089+
}
13090+
const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
13091+
const result = ObjectSerializer.deserialize(response.body, "AsposeResponse");
13092+
return Promise.resolve({body: result, response});
13093+
}
13094+
13095+
1300913096
/**
1301013097
*
1301113098
* @summary Rotate PDF document.

src/requestHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ async function invokeApiMethodInternal(requestOptions: request.Options, confgura
9595
//headers
9696
sa.set("User-Agent", "pdf nodejs sdk");
9797
sa.set("x-aspose-client", "nodejs sdk");
98-
sa.set("x-aspose-client-version", "25.7.0");
98+
sa.set("x-aspose-client-version", "25.8.0");
9999

100100
if (!requestOptions.headers) {
101101
requestOptions.headers = {};

test/testDocument.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,4 +235,13 @@ describe("Document Tests", () => {
235235
assert.equal(result.response.statusCode, 200);
236236
});
237237
});
238+
239+
describe("PostDocumentPagesResize Test", () => {
240+
it("should return response with code 200", async () => {
241+
const name = "4pages.pdf";
242+
await BaseTest.uploadFile(name);
243+
const result = await BaseTest.getPdfApi().postDocumentPagesResize(name, 100, 200, "2-3", null, BaseTest.remoteTempFolder)
244+
assert.equal(result.response.statusCode, 200);
245+
});
246+
});
238247
});

0 commit comments

Comments
 (0)