Skip to content

Commit 1b85d24

Browse files
authored
Merge pull request #78 from aspose-pdf-cloud/develop
update to 23.4
2 parents d5fda4b + 167d42e commit 1b85d24

13 files changed

+345
-659
lines changed

README.md

Lines changed: 2 additions & 653 deletions
Large diffs are not rendered by default.

docs/OrganizeDocumentData.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# OrganizeDocumentData
2+
Data for document organizing.
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**path** | **string** | Full filename of the document for organizing. |
8+
**pages** | **string** | 1-based page numbers of the document that make up the resulting document. |
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[View Source]](../src/models/organizeDocumentData.ts)
11+

docs/OrganizeDocumentRequest.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# OrganizeDocumentRequest
2+
Documents data for organizing.
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**list** | [**Array<OrganizeDocumentData>**](OrganizeDocumentData.md) | List of document data for organizing. |
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) [[View Source]](../src/models/organizeDocumentRequest.ts)
10+

docs/PdfApi.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ Method | HTTP request | Description
214214
*PdfApi* | [**postListBoxFields**](PdfApi.md#postListBoxFields) | **POST** /pdf/\{name}/fields/listbox | Add document listbox fields.
215215
*PdfApi* | [**postMovePage**](PdfApi.md#postMovePage) | **POST** /pdf/\{name}/pages/\{pageNumber}/movePage | Move page to new position.
216216
*PdfApi* | [**postOptimizeDocument**](PdfApi.md#postOptimizeDocument) | **POST** /pdf/\{name}/optimize | Optimize document.
217+
*PdfApi* | [**postOrganizeDocument**](PdfApi.md#postOrganizeDocument) | **POST** /pdf/\{name}/organize | Merge selected pages of a document.
218+
*PdfApi* | [**postOrganizeDocuments**](PdfApi.md#postOrganizeDocuments) | **POST** /pdf/organize | Merge selected pages of different documents.
217219
*PdfApi* | [**postPageCaretAnnotations**](PdfApi.md#postPageCaretAnnotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/caret | Add document page caret annotations.
218220
*PdfApi* | [**postPageCertify**](PdfApi.md#postPageCertify) | **POST** /pdf/\{name}/pages/\{pageNumber}/certify | Certify document page.
219221
*PdfApi* | [**postPageCircleAnnotations**](PdfApi.md#postPageCircleAnnotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/circle | Add document page circle annotations.
@@ -5250,6 +5252,52 @@ Name | Type | Description | Notes
52505252

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

5255+
### HTTP request headers
5256+
5257+
- **Content-Type**: application/json
5258+
- **Accept**: application/json
5259+
5260+
<a name="postOrganizeDocument"></a>
5261+
## **postOrganizeDocument**
5262+
> postOrganizeDocument(name, pages, outPath, storage, folder)
5263+
5264+
Merge selected pages of a document.
5265+
5266+
### Parameters
5267+
Name | Type | Description | Notes
5268+
------------- | ------------- | ------------- | -------------
5269+
**name** | **string** | The original document name. |
5270+
**pages** | **string** | 1-based page numbers of the source document that make up the resulting document. |
5271+
**outPath** | **string** | Full filename of the resulting document. |
5272+
**storage** | **string** | The documents storage. | [optional]
5273+
**folder** | **string** | The source document folder. | [optional]
5274+
5275+
### Return type
5276+
5277+
[**AsposeResponse**](AsposeResponse.md)
5278+
5279+
### HTTP request headers
5280+
5281+
- **Content-Type**: application/json
5282+
- **Accept**: application/json
5283+
5284+
<a name="postOrganizeDocuments"></a>
5285+
## **postOrganizeDocuments**
5286+
> postOrganizeDocuments(organizeDocuments, outPath, storage)
5287+
5288+
Merge selected pages of different documents.
5289+
5290+
### Parameters
5291+
Name | Type | Description | Notes
5292+
------------- | ------------- | ------------- | -------------
5293+
**organizeDocuments** | [**OrganizeDocumentRequest**](OrganizeDocumentRequest.md) | Array of OrganizeDocumentData to make up the resulting document. |
5294+
**outPath** | **string** | Full filename of the resulting document. |
5295+
**storage** | **string** | The documents storage. | [optional]
5296+
5297+
### Return type
5298+
5299+
[**AsposeResponse**](AsposeResponse.md)
5300+
52535301
### HTTP request headers
52545302

52555303
- **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": "23.3.0",
3+
"version": "23.4.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: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ import { ModelError } from "../models/modelError";
8585
import { ObjectExist } from "../models/objectExist";
8686
import { OptimizeOptions } from "../models/optimizeOptions";
8787
import { Option } from "../models/option";
88+
import { OrganizeDocumentData } from "../models/organizeDocumentData";
89+
import { OrganizeDocumentRequest } from "../models/organizeDocumentRequest";
8890
import { OutputFormat } from "../models/outputFormat";
8991
import { PageLayout } from "../models/pageLayout";
9092
import { PageMode } from "../models/pageMode";
@@ -13068,6 +13070,135 @@ export class PdfApi {
1306813070
}
1306913071

1307013072

13073+
/**
13074+
*
13075+
* @summary Merge selected pages of a document.
13076+
* @param name The original document name.
13077+
* @param pages 1-based page numbers of the source document that make up the resulting document.
13078+
* @param outPath Full filename of the resulting document.
13079+
* @param storage The documents storage.
13080+
* @param folder The source document folder.
13081+
*/
13082+
public async postOrganizeDocument (name: string, pages: string, outPath: string, storage?: string, folder?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse; }> {
13083+
const localVarPath = this.basePath + '/pdf/{name}/organize'
13084+
.replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
13085+
let localVarQueryParameters: any = {};
13086+
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
13087+
let localVarFormParams: any = {};
13088+
13089+
// verify required parameter 'name' is not null or undefined
13090+
if (name === null || name === undefined) {
13091+
throw new Error('Required parameter name was null or undefined when calling postOrganizeDocument.');
13092+
}
13093+
13094+
// verify required parameter 'pages' is not null or undefined
13095+
if (pages === null || pages === undefined) {
13096+
throw new Error('Required parameter pages was null or undefined when calling postOrganizeDocument.');
13097+
}
13098+
13099+
// verify required parameter 'outPath' is not null or undefined
13100+
if (outPath === null || outPath === undefined) {
13101+
throw new Error('Required parameter outPath was null or undefined when calling postOrganizeDocument.');
13102+
}
13103+
13104+
if (pages !== undefined && null !== pages) {
13105+
localVarQueryParameters['pages'] = ObjectSerializer.serialize(pages, "string");
13106+
}
13107+
13108+
if (outPath !== undefined && null !== outPath) {
13109+
localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
13110+
}
13111+
13112+
if (storage !== undefined && null !== storage) {
13113+
localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
13114+
}
13115+
13116+
if (folder !== undefined && null !== folder) {
13117+
localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
13118+
}
13119+
13120+
13121+
let localVarUseFormData = false;
13122+
let fileData = null;
13123+
let localVarRequestOptions: localVarRequest.Options = {
13124+
method: 'POST',
13125+
qs: localVarQueryParameters,
13126+
headers: localVarHeaderParams,
13127+
uri: localVarPath,
13128+
useQuerystring: this._useQuerystring,
13129+
json: true,
13130+
};
13131+
13132+
if (Object.keys(localVarFormParams).length) {
13133+
if (localVarUseFormData) {
13134+
(<any>localVarRequestOptions).formData = localVarFormParams;
13135+
} else {
13136+
localVarRequestOptions.form = localVarFormParams;
13137+
}
13138+
}
13139+
const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
13140+
const result = ObjectSerializer.deserialize(response.body, "AsposeResponse");
13141+
return Promise.resolve({body: result, response});
13142+
}
13143+
13144+
13145+
/**
13146+
*
13147+
* @summary Merge selected pages of different documents.
13148+
* @param organizeDocuments Array of OrganizeDocumentData to make up the resulting document.
13149+
* @param outPath Full filename of the resulting document.
13150+
* @param storage The documents storage.
13151+
*/
13152+
public async postOrganizeDocuments (organizeDocuments: OrganizeDocumentRequest, outPath: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse; }> {
13153+
const localVarPath = this.basePath + '/pdf/organize';
13154+
let localVarQueryParameters: any = {};
13155+
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
13156+
let localVarFormParams: any = {};
13157+
13158+
// verify required parameter 'organizeDocuments' is not null or undefined
13159+
if (organizeDocuments === null || organizeDocuments === undefined) {
13160+
throw new Error('Required parameter organizeDocuments was null or undefined when calling postOrganizeDocuments.');
13161+
}
13162+
13163+
// verify required parameter 'outPath' is not null or undefined
13164+
if (outPath === null || outPath === undefined) {
13165+
throw new Error('Required parameter outPath was null or undefined when calling postOrganizeDocuments.');
13166+
}
13167+
13168+
if (outPath !== undefined && null !== outPath) {
13169+
localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
13170+
}
13171+
13172+
if (storage !== undefined && null !== storage) {
13173+
localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
13174+
}
13175+
13176+
13177+
let localVarUseFormData = false;
13178+
let fileData = null;
13179+
let localVarRequestOptions: localVarRequest.Options = {
13180+
method: 'POST',
13181+
qs: localVarQueryParameters,
13182+
headers: localVarHeaderParams,
13183+
uri: localVarPath,
13184+
useQuerystring: this._useQuerystring,
13185+
json: true,
13186+
body: ObjectSerializer.serialize(organizeDocuments, "OrganizeDocumentRequest")
13187+
};
13188+
13189+
if (Object.keys(localVarFormParams).length) {
13190+
if (localVarUseFormData) {
13191+
(<any>localVarRequestOptions).formData = localVarFormParams;
13192+
} else {
13193+
localVarRequestOptions.form = localVarFormParams;
13194+
}
13195+
}
13196+
const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
13197+
const result = ObjectSerializer.deserialize(response.body, "AsposeResponse");
13198+
return Promise.resolve({body: result, response});
13199+
}
13200+
13201+
1307113202
/**
1307213203
*
1307313204
* @summary Add document page caret annotations.

src/models/organizeDocumentData.ts

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
 /**
2+
*
3+
* Copyright (c) 2023 Aspose.PDF Cloud
4+
* Permission is hereby granted, free of charge, to any person obtaining a copy
5+
* of this software and associated documentation files (the "Software"), to deal
6+
* in the Software without restriction, including without limitation the rights
7+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
* copies of the Software, and to permit persons to whom the Software is
9+
* furnished to do so, subject to the following conditions:
10+
* The above copyright notice and this permission notice shall be included in all
11+
* copies or substantial portions of the Software.
12+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18+
* SOFTWARE.
19+
*
20+
*/
21+
22+
23+
/**
24+
* Data for document organizing.
25+
*/
26+
export class OrganizeDocumentData {
27+
/**
28+
* Full filename of the document for organizing.
29+
*/
30+
'path': string;
31+
/**
32+
* 1-based page numbers of the document that make up the resulting document.
33+
*/
34+
'pages': string;
35+
36+
static discriminator = undefined;
37+
38+
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
39+
{
40+
"name": "path",
41+
"baseName": "Path",
42+
"type": "string"
43+
},
44+
{
45+
"name": "pages",
46+
"baseName": "Pages",
47+
"type": "string"
48+
} ];
49+
50+
static getAttributeTypeMap() {
51+
return OrganizeDocumentData.attributeTypeMap;
52+
}
53+
}
54+
55+

src/models/organizeDocumentRequest.ts

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
 /**
2+
*
3+
* Copyright (c) 2023 Aspose.PDF Cloud
4+
* Permission is hereby granted, free of charge, to any person obtaining a copy
5+
* of this software and associated documentation files (the "Software"), to deal
6+
* in the Software without restriction, including without limitation the rights
7+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
* copies of the Software, and to permit persons to whom the Software is
9+
* furnished to do so, subject to the following conditions:
10+
* The above copyright notice and this permission notice shall be included in all
11+
* copies or substantial portions of the Software.
12+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18+
* SOFTWARE.
19+
*
20+
*/
21+
22+
import { OrganizeDocumentData } from "./organizeDocumentData";
23+
24+
/**
25+
* Documents data for organizing.
26+
*/
27+
export class OrganizeDocumentRequest {
28+
/**
29+
* List of document data for organizing.
30+
*/
31+
'list': Array<OrganizeDocumentData>;
32+
33+
static discriminator = undefined;
34+
35+
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
36+
{
37+
"name": "list",
38+
"baseName": "List",
39+
"type": "Array<OrganizeDocumentData>"
40+
} ];
41+
42+
static getAttributeTypeMap() {
43+
return OrganizeDocumentRequest.attributeTypeMap;
44+
}
45+
}
46+
47+

src/models/pageRange.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ export class PageRange {
2929
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
3030
{
3131
"name": "from",
32-
"baseName": "from",
32+
"baseName": "From",
3333
"type": "number"
3434
},
3535
{
3636
"name": "to",
37-
"baseName": "to",
37+
"baseName": "To",
3838
"type": "number"
3939
} ];
4040

0 commit comments

Comments
 (0)