@@ -6046,9 +6046,15 @@ export class PdfApi {
6046
6046
*
6047
6047
* @summary Convert MHT file (located on storage) to PDF format and return resulting file in response.
6048
6048
* @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
6049
6055
* @param storage The document storage.
6050
6056
*/
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; }> {
6052
6058
const localVarPath = this.basePath + '/pdf/create/mht';
6053
6059
let localVarQueryParameters: any = {};
6054
6060
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
@@ -6059,10 +6065,64 @@ export class PdfApi {
6059
6065
throw new Error('Required parameter srcPath was null or undefined when calling getMhtInStorageToPdf.');
6060
6066
}
6061
6067
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
+
6062
6098
if (srcPath !== undefined && null !== srcPath) {
6063
6099
localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
6064
6100
}
6065
6101
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
+
6066
6126
if (storage !== undefined && null !== storage) {
6067
6127
localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
6068
6128
}
@@ -12375,6 +12435,76 @@ export class PdfApi {
12375
12435
}
12376
12436
12377
12437
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
+
12378
12508
/**
12379
12509
*
12380
12510
* @summary Create empty document.
@@ -19312,10 +19442,16 @@ export class PdfApi {
19312
19442
* @summary Convert MHT file (located on storage) to PDF format and upload resulting file to storage.
19313
19443
* @param name The document name.
19314
19444
* @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
19315
19451
* @param dstFolder The destination document folder.
19316
19452
* @param storage The document storage.
19317
19453
*/
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; }> {
19319
19455
const localVarPath = this.basePath + '/pdf/{name}/create/mht'
19320
19456
.replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
19321
19457
let localVarQueryParameters: any = {};
@@ -19332,10 +19468,64 @@ export class PdfApi {
19332
19468
throw new Error('Required parameter srcPath was null or undefined when calling putMhtInStorageToPdf.');
19333
19469
}
19334
19470
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
+
19335
19501
if (srcPath !== undefined && null !== srcPath) {
19336
19502
localVarQueryParameters['srcPath'] = ObjectSerializer.serialize(srcPath, "string");
19337
19503
}
19338
19504
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
+
19339
19529
if (dstFolder !== undefined && null !== dstFolder) {
19340
19530
localVarQueryParameters['dstFolder'] = ObjectSerializer.serialize(dstFolder, "string");
19341
19531
}
0 commit comments