Skip to content

Commit c540dee

Browse files
author
Kirill Novinskij
committed
update to 25.5.0
1 parent 4f9ff4c commit c540dee

File tree

3 files changed

+234
-4
lines changed

3 files changed

+234
-4
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ 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.5
34+
- Add a method for comparing pdf files.
35+
- A new version of Aspose.PDF Cloud was prepared using the latest version of Aspose.PDF for .NET.
36+
3337
## Installation
3438

3539
### NPM

docs/PdfApi.md

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ Method | HTTP request | Description
203203
*PdfApi* | [**postChangePasswordDocumentInStorage**](PdfApi.md#postChangePasswordDocumentInStorage) | **POST** /pdf/\{name}/changepassword | Change document password in storage.
204204
*PdfApi* | [**postCheckBoxFields**](PdfApi.md#postCheckBoxFields) | **POST** /pdf/\{name}/fields/checkbox | Add document checkbox fields.
205205
*PdfApi* | [**postComboBoxFields**](PdfApi.md#postComboBoxFields) | **POST** /pdf/\{name}/fields/combobox | Add document combobox fields.
206+
*PdfApi* | [**postComparePdf**](PdfApi.md#postComparePdf) | **POST** /pdf/compare | Compare two PDF documents.
206207
*PdfApi* | [**postCreateDocument**](PdfApi.md#postCreateDocument) | **POST** /pdf/\{name} | Create empty document.
207208
*PdfApi* | [**postCreateField**](PdfApi.md#postCreateField) | **POST** /pdf/\{name}/fields | Create field.
208209
*PdfApi* | [**postDecryptDocumentInStorage**](PdfApi.md#postDecryptDocumentInStorage) | **POST** /pdf/\{name}/decrypt | Decrypt document in storage.
@@ -2653,14 +2654,20 @@ Name | Type | Description | Notes
26532654

26542655
<a name="getMhtInStorageToPdf"></a>
26552656
## **getMhtInStorageToPdf**
2656-
> getMhtInStorageToPdf(srcPath, storage)
2657+
> getMhtInStorageToPdf(srcPath, height, width, marginLeft, marginBottom, marginRight, marginTop, storage)
26572658
26582659
Convert MHT file (located on storage) to PDF format and return resulting file in response.
26592660

26602661
### Parameters
26612662
Name | Type | Description | Notes
26622663
------------- | ------------- | ------------- | -------------
26632664
**srcPath** | **string** | Full source filename (ex. /folder1/folder2/template.mht) |
2665+
**height** | **number** | Page height |
2666+
**width** | **number** | Page width |
2667+
**marginLeft** | **number** | Page margin left |
2668+
**marginBottom** | **number** | Page margin bottom |
2669+
**marginRight** | **number** | Page margin right |
2670+
**marginTop** | **number** | Page margin top |
26642671
**storage** | **string** | The document storage. | [optional]
26652672

26662673
### Return type
@@ -5013,6 +5020,29 @@ Name | Type | Description | Notes
50135020

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

5023+
### HTTP request headers
5024+
5025+
- **Content-Type**: application/json
5026+
- **Accept**: application/json
5027+
5028+
<a name="postComparePdf"></a>
5029+
## **postComparePdf**
5030+
> postComparePdf(path1, path2, outPath, storage)
5031+
5032+
Compare two PDF documents.
5033+
5034+
### Parameters
5035+
Name | Type | Description | Notes
5036+
------------- | ------------- | ------------- | -------------
5037+
**path1** | **string** | Path to first PDF document. |
5038+
**path2** | **string** | Path to second PDF document. |
5039+
**outPath** | **string** | Full filename of the resulting document. |
5040+
**storage** | **string** | The documents storage. | [optional]
5041+
5042+
### Return type
5043+
5044+
[**AsposeResponse**](AsposeResponse.md)
5045+
50165046
### HTTP request headers
50175047

50185048
- **Content-Type**: application/json
@@ -7516,7 +7546,7 @@ Name | Type | Description | Notes
75167546

75177547
<a name="putMhtInStorageToPdf"></a>
75187548
## **putMhtInStorageToPdf**
7519-
> putMhtInStorageToPdf(name, srcPath, dstFolder, storage)
7549+
> putMhtInStorageToPdf(name, srcPath, height, width, marginLeft, marginBottom, marginRight, marginTop, dstFolder, storage)
75207550
75217551
Convert MHT file (located on storage) to PDF format and upload resulting file to storage.
75227552

@@ -7525,6 +7555,12 @@ Name | Type | Description | Notes
75257555
------------- | ------------- | ------------- | -------------
75267556
**name** | **string** | The document name. |
75277557
**srcPath** | **string** | Full source filename (ex. /folder1/folder2/template.mht) |
7558+
**height** | **number** | Page height |
7559+
**width** | **number** | Page width |
7560+
**marginLeft** | **number** | Page margin left |
7561+
**marginBottom** | **number** | Page margin bottom |
7562+
**marginRight** | **number** | Page margin right |
7563+
**marginTop** | **number** | Page margin top |
75287564
**dstFolder** | **string** | The destination document folder. | [optional]
75297565
**storage** | **string** | The document storage. | [optional]
75307566

src/api/api.ts

Lines changed: 192 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6046,9 +6046,15 @@ export class PdfApi {
60466046
*
60476047
* @summary Convert MHT file (located on storage) to PDF format and return resulting file in response.
60486048
* @param srcPath Full source filename (ex. /folder1/folder2/template.mht)
6049+
* @param height Page height
6050+
* @param width Page width
6051+
* @param marginLeft Page margin left
6052+
* @param marginBottom Page margin bottom
6053+
* @param marginRight Page margin right
6054+
* @param marginTop Page margin top
60496055
* @param storage The document storage.
60506056
*/
6051-
public async getMhtInStorageToPdf (srcPath: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
6057+
public async getMhtInStorageToPdf (srcPath: string, height: number, width: number, marginLeft: number, marginBottom: number, marginRight: number, marginTop: number, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
60526058
const localVarPath = this.basePath + '/pdf/create/mht';
60536059
let localVarQueryParameters: any = {};
60546060
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
@@ -6059,10 +6065,64 @@ export class PdfApi {
60596065
throw new Error('Required parameter srcPath was null or undefined when calling getMhtInStorageToPdf.');
60606066
}
60616067

6068+
// verify required parameter 'height' is not null or undefined
6069+
if (height === null || height === undefined) {
6070+
throw new Error('Required parameter height was null or undefined when calling getMhtInStorageToPdf.');
6071+
}
6072+
6073+
// verify required parameter 'width' is not null or undefined
6074+
if (width === null || width === undefined) {
6075+
throw new Error('Required parameter width was null or undefined when calling getMhtInStorageToPdf.');
6076+
}
6077+
6078+
// verify required parameter 'marginLeft' is not null or undefined
6079+
if (marginLeft === null || marginLeft === undefined) {
6080+
throw new Error('Required parameter marginLeft was null or undefined when calling getMhtInStorageToPdf.');
6081+
}
6082+
6083+
// verify required parameter 'marginBottom' is not null or undefined
6084+
if (marginBottom === null || marginBottom === undefined) {
6085+
throw new Error('Required parameter marginBottom was null or undefined when calling getMhtInStorageToPdf.');
6086+
}
6087+
6088+
// verify required parameter 'marginRight' is not null or undefined
6089+
if (marginRight === null || marginRight === undefined) {
6090+
throw new Error('Required parameter marginRight was null or undefined when calling getMhtInStorageToPdf.');
6091+
}
6092+
6093+
// verify required parameter 'marginTop' is not null or undefined
6094+
if (marginTop === null || marginTop === undefined) {
6095+
throw new Error('Required parameter marginTop was null or undefined when calling getMhtInStorageToPdf.');
6096+
}
6097+
60626098
if (srcPath !== undefined && null !== srcPath) {
60636099
localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
60646100
}
60656101

6102+
if (height !== undefined && null !== height) {
6103+
localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
6104+
}
6105+
6106+
if (width !== undefined && null !== width) {
6107+
localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
6108+
}
6109+
6110+
if (marginLeft !== undefined && null !== marginLeft) {
6111+
localVarQueryParameters['marginLeft'] = ObjectSerializer.serialize(marginLeft, "number");
6112+
}
6113+
6114+
if (marginBottom !== undefined && null !== marginBottom) {
6115+
localVarQueryParameters['marginBottom'] = ObjectSerializer.serialize(marginBottom, "number");
6116+
}
6117+
6118+
if (marginRight !== undefined && null !== marginRight) {
6119+
localVarQueryParameters['marginRight'] = ObjectSerializer.serialize(marginRight, "number");
6120+
}
6121+
6122+
if (marginTop !== undefined && null !== marginTop) {
6123+
localVarQueryParameters['marginTop'] = ObjectSerializer.serialize(marginTop, "number");
6124+
}
6125+
60666126
if (storage !== undefined && null !== storage) {
60676127
localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
60686128
}
@@ -12375,6 +12435,76 @@ export class PdfApi {
1237512435
}
1237612436

1237712437

12438+
/**
12439+
*
12440+
* @summary Compare two PDF documents.
12441+
* @param path1 Path to first PDF document.
12442+
* @param path2 Path to second PDF document.
12443+
* @param outPath Full filename of the resulting document.
12444+
* @param storage The documents storage.
12445+
*/
12446+
public async postComparePdf (path1: string, path2: string, outPath: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse; }> {
12447+
const localVarPath = this.basePath + '/pdf/compare';
12448+
let localVarQueryParameters: any = {};
12449+
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
12450+
let localVarFormParams: any = {};
12451+
12452+
// verify required parameter 'path1' is not null or undefined
12453+
if (path1 === null || path1 === undefined) {
12454+
throw new Error('Required parameter path1 was null or undefined when calling postComparePdf.');
12455+
}
12456+
12457+
// verify required parameter 'path2' is not null or undefined
12458+
if (path2 === null || path2 === undefined) {
12459+
throw new Error('Required parameter path2 was null or undefined when calling postComparePdf.');
12460+
}
12461+
12462+
// verify required parameter 'outPath' is not null or undefined
12463+
if (outPath === null || outPath === undefined) {
12464+
throw new Error('Required parameter outPath was null or undefined when calling postComparePdf.');
12465+
}
12466+
12467+
if (path1 !== undefined && null !== path1) {
12468+
localVarQueryParameters['path1'] = ObjectSerializer.serialize(path1, "string");
12469+
}
12470+
12471+
if (path2 !== undefined && null !== path2) {
12472+
localVarQueryParameters['path2'] = ObjectSerializer.serialize(path2, "string");
12473+
}
12474+
12475+
if (outPath !== undefined && null !== outPath) {
12476+
localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
12477+
}
12478+
12479+
if (storage !== undefined && null !== storage) {
12480+
localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
12481+
}
12482+
12483+
12484+
let localVarUseFormData = false;
12485+
let fileData = null;
12486+
let localVarRequestOptions: localVarRequest.Options = {
12487+
method: 'POST',
12488+
qs: localVarQueryParameters,
12489+
headers: localVarHeaderParams,
12490+
uri: localVarPath,
12491+
useQuerystring: this._useQuerystring,
12492+
json: true,
12493+
};
12494+
12495+
if (Object.keys(localVarFormParams).length) {
12496+
if (localVarUseFormData) {
12497+
(<any>localVarRequestOptions).formData = localVarFormParams;
12498+
} else {
12499+
localVarRequestOptions.form = localVarFormParams;
12500+
}
12501+
}
12502+
const response = await invokeApiMethod(localVarRequestOptions, this.configuration, false, fileData);
12503+
const result = ObjectSerializer.deserialize(response.body, "AsposeResponse");
12504+
return Promise.resolve({body: result, response});
12505+
}
12506+
12507+
1237812508
/**
1237912509
*
1238012510
* @summary Create empty document.
@@ -19312,10 +19442,16 @@ export class PdfApi {
1931219442
* @summary Convert MHT file (located on storage) to PDF format and upload resulting file to storage.
1931319443
* @param name The document name.
1931419444
* @param srcPath Full source filename (ex. /folder1/folder2/template.mht)
19445+
* @param height Page height
19446+
* @param width Page width
19447+
* @param marginLeft Page margin left
19448+
* @param marginBottom Page margin bottom
19449+
* @param marginRight Page margin right
19450+
* @param marginTop Page margin top
1931519451
* @param dstFolder The destination document folder.
1931619452
* @param storage The document storage.
1931719453
*/
19318-
public async putMhtInStorageToPdf (name: string, srcPath: string, dstFolder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse; }> {
19454+
public async putMhtInStorageToPdf (name: string, srcPath: string, height: number, width: number, marginLeft: number, marginBottom: number, marginRight: number, marginTop: number, dstFolder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse; }> {
1931919455
const localVarPath = this.basePath + '/pdf/{name}/create/mht'
1932019456
.replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
1932119457
let localVarQueryParameters: any = {};
@@ -19332,10 +19468,64 @@ export class PdfApi {
1933219468
throw new Error('Required parameter srcPath was null or undefined when calling putMhtInStorageToPdf.');
1933319469
}
1933419470

19471+
// verify required parameter 'height' is not null or undefined
19472+
if (height === null || height === undefined) {
19473+
throw new Error('Required parameter height was null or undefined when calling putMhtInStorageToPdf.');
19474+
}
19475+
19476+
// verify required parameter 'width' is not null or undefined
19477+
if (width === null || width === undefined) {
19478+
throw new Error('Required parameter width was null or undefined when calling putMhtInStorageToPdf.');
19479+
}
19480+
19481+
// verify required parameter 'marginLeft' is not null or undefined
19482+
if (marginLeft === null || marginLeft === undefined) {
19483+
throw new Error('Required parameter marginLeft was null or undefined when calling putMhtInStorageToPdf.');
19484+
}
19485+
19486+
// verify required parameter 'marginBottom' is not null or undefined
19487+
if (marginBottom === null || marginBottom === undefined) {
19488+
throw new Error('Required parameter marginBottom was null or undefined when calling putMhtInStorageToPdf.');
19489+
}
19490+
19491+
// verify required parameter 'marginRight' is not null or undefined
19492+
if (marginRight === null || marginRight === undefined) {
19493+
throw new Error('Required parameter marginRight was null or undefined when calling putMhtInStorageToPdf.');
19494+
}
19495+
19496+
// verify required parameter 'marginTop' is not null or undefined
19497+
if (marginTop === null || marginTop === undefined) {
19498+
throw new Error('Required parameter marginTop was null or undefined when calling putMhtInStorageToPdf.');
19499+
}
19500+
1933519501
if (srcPath !== undefined && null !== srcPath) {
1933619502
localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
1933719503
}
1933819504

19505+
if (height !== undefined && null !== height) {
19506+
localVarQueryParameters['height'] = ObjectSerializer.serialize(height, "number");
19507+
}
19508+
19509+
if (width !== undefined && null !== width) {
19510+
localVarQueryParameters['width'] = ObjectSerializer.serialize(width, "number");
19511+
}
19512+
19513+
if (marginLeft !== undefined && null !== marginLeft) {
19514+
localVarQueryParameters['marginLeft'] = ObjectSerializer.serialize(marginLeft, "number");
19515+
}
19516+
19517+
if (marginBottom !== undefined && null !== marginBottom) {
19518+
localVarQueryParameters['marginBottom'] = ObjectSerializer.serialize(marginBottom, "number");
19519+
}
19520+
19521+
if (marginRight !== undefined && null !== marginRight) {
19522+
localVarQueryParameters['marginRight'] = ObjectSerializer.serialize(marginRight, "number");
19523+
}
19524+
19525+
if (marginTop !== undefined && null !== marginTop) {
19526+
localVarQueryParameters['marginTop'] = ObjectSerializer.serialize(marginTop, "number");
19527+
}
19528+
1933919529
if (dstFolder !== undefined && null !== dstFolder) {
1934019530
localVarQueryParameters['dstFolder'] = ObjectSerializer.serialize(dstFolder, "string");
1934119531
}

0 commit comments

Comments
 (0)