Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +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 25.7
- Add possibility to hide subject field in signature appearance.
## Enhancements in Version 25.8
- Implement document page resize functionality using the Pdf.Cloud API library.
- A new version of Aspose.PDF Cloud was prepared using the latest version of Aspose.PDF for .NET.

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

## Installation

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

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

### HTTP request headers

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

<a name="postDocumentPagesResize"></a>
## **postDocumentPagesResize**
> postDocumentPagesResize(name, height, width, pages, storage, folder, password)

Rsize PDF document.

### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**name** | **string** | The document name. |
**height** | **number** | Page Height |
**width** | **number** | Page width |
**pages** | **string** | Comma separated list of pages and page ranges. (Example: 1,3-5,8) |
**storage** | **string** | The document storage. | [optional]
**folder** | **string** | The document folder. | [optional]
**password** | **string** | Base64 encoded password. | [optional]

### Return type

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

### HTTP request headers

- **Content-Type**: application/json
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "asposepdfcloud",
"version": "25.7.0",
"version": "25.8.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": {
Expand Down
87 changes: 87 additions & 0 deletions src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13006,6 +13006,93 @@ export class PdfApi {
}


/**
*
* @summary Rsize PDF document.
* @param name The document name.
* @param height Page Height
* @param width Page width
* @param pages Comma separated list of pages and page ranges. (Example: 1,3-5,8)
* @param storage The document storage.
* @param folder The document folder.
* @param password Base64 encoded password.
*/
public async postDocumentPagesResize (name: string, height: number, width: number, pages: string, storage?: string, folder?: string, password?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse; }> {
const localVarPath = this.basePath + '/pdf/{name}/resize'
.replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
let localVarQueryParameters: any = {};
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
let localVarFormParams: any = {};

// verify required parameter 'name' is not null or undefined
if (name === null || name === undefined) {
throw new Error('Required parameter name was null or undefined when calling postDocumentPagesResize.');
}

// verify required parameter 'height' is not null or undefined
if (height === null || height === undefined) {
throw new Error('Required parameter height was null or undefined when calling postDocumentPagesResize.');
}

// verify required parameter 'width' is not null or undefined
if (width === null || width === undefined) {
throw new Error('Required parameter width was null or undefined when calling postDocumentPagesResize.');
}

// verify required parameter 'pages' is not null or undefined
if (pages === null || pages === undefined) {
throw new Error('Required parameter pages was null or undefined when calling postDocumentPagesResize.');
}

if (height !== undefined && null !== height) {
localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
}

if (width !== undefined && null !== width) {
localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
}

if (pages !== undefined && null !== pages) {
localVarQueryParameters['pages'] = ObjectSerializer.serialize(pages, "string");
}

if (storage !== undefined && null !== storage) {
localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
}

if (folder !== undefined && null !== folder) {
localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
}

if (password !== undefined && null !== password) {
localVarQueryParameters['password'] = ObjectSerializer.serialize(password, "string");
}


let localVarUseFormData = false;
let fileData = null;
let localVarRequestOptions: localVarRequest.Options = {
method: 'POST',
qs: localVarQueryParameters,
headers: localVarHeaderParams,
uri: localVarPath,
useQuerystring: this._useQuerystring,
json: true,
};

if (Object.keys(localVarFormParams).length) {
if (localVarUseFormData) {
(<any>localVarRequestOptions).formData = localVarFormParams;
} else {
localVarRequestOptions.form = localVarFormParams;
}
}
const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
const result = ObjectSerializer.deserialize(response.body, "AsposeResponse");
return Promise.resolve({body: result, response});
}


/**
*
* @summary Rotate PDF document.
Expand Down
2 changes: 1 addition & 1 deletion src/requestHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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", "25.7.0");
sa.set("x-aspose-client-version", "25.8.0");

if (!requestOptions.headers) {
requestOptions.headers = {};
Expand Down
9 changes: 9 additions & 0 deletions test/testDocument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,4 +235,13 @@ describe("Document Tests", () => {
assert.equal(result.response.statusCode, 200);
});
});

describe("PostDocumentPagesResize Test", () => {
it("should return response with code 200", async () => {
const name = "4pages.pdf";
await BaseTest.uploadFile(name);
const result = await BaseTest.getPdfApi().postDocumentPagesResize(name, 100, 200, "2-3", null, BaseTest.remoteTempFolder)
assert.equal(result.response.statusCode, 200);
});
});
});