Skip to content

Commit ab42e66

Browse files
Merge pull request #35 from kaferi/master
Update to v20.4
2 parents 845d53c + 886537d commit ab42e66

11 files changed

+166
-31
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,7 @@ Class | Description
526526
[**HtmlMarkupGenerationModes**](docs/HtmlMarkupGenerationModes.md) | Sometimes specific reqirments to created HTML are present. This enum defines HTML preparing modes that can be used during conversion of PDF to HTML to match such specific requirments.
527527
[**Image**](docs/Image.md) | Represents image DTO.
528528
[**ImageFooter**](docs/ImageFooter.md) | Represents Pdf image footer.
529+
[**ImageFragment**](docs/ImageFragment.md) | Represents Image Fragment DTO.
529530
[**ImageHeader**](docs/ImageHeader.md) | Represents Pdf image header.
530531
[**ImageResponse**](docs/ImageResponse.md) | Represents response containing single image info
531532
[**Images**](docs/Images.md) | Represents list of images.

docs/Cell.md

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
99
**border** | [**BorderInfo**](BorderInfo.md) | Gets or sets the border. | [optional]
1010
**backgroundColor** | [**Color**](Color.md) | Gets or sets the background color. | [optional]
1111
**backgroundImageFile** | **string** | Gets or sets the background image file. | [optional]
12+
**backgroundImageStorageFile** | **string** | Gets or sets path of the background image file from storage. | [optional]
1213
**alignment** | [**HorizontalAlignment**](HorizontalAlignment.md) | Gets or sets the alignment. | [optional]
1314
**defaultCellTextState** | [**TextState**](TextState.md) | Gets or sets the default cell text state. | [optional]
1415
**paragraphs** | [**Array<TextRect>**](TextRect.md) | Gets or sets the cell's formatted text. | [optional]
@@ -17,6 +18,8 @@ Name | Type | Description | Notes
1718
**colSpan** | **number** | Gets or sets the column span. | [optional]
1819
**rowSpan** | **number** | Gets or sets the row span. | [optional]
1920
**width** | **number** | Gets or sets the column width. | [optional]
21+
**htmlFragment** | **string** | Gets or sets Html fragment. | [optional]
22+
**images** | [**Array<ImageFragment>**](ImageFragment.md) | Gets or sets ImageFragment list. | [optional]
2023

2124
[[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/cell.ts)
2225

docs/ImageFragment.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# ImageFragment
2+
Represents Image Fragment DTO.
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**imageFile** | **string** | Gets or sets full storage path of image. |
8+
**fixWidth** | **number** | Gets or sets fix width of the image. | [optional]
9+
**fixHeight** | **number** | Gets or sets fix height of the image. | [optional]
10+
**horizontalAlignment** | [**HorizontalAlignment**](HorizontalAlignment.md) | Gets or sets horizontal alignment of the image. | [optional]
11+
**verticalAlignment** | [**VerticalAlignment**](VerticalAlignment.md) | Gets or sets vertical alignment of the image. | [optional]
12+
**imageScale** | **number** | Gets or sets ImageScale of the image. | [optional]
13+
**margin** | [**MarginInfo**](MarginInfo.md) | Gets or sets Margin of the image. | [optional]
14+
15+
[[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/imageFragment.ts)
16+

docs/PdfApi.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -3700,15 +3700,14 @@ Name | Type | Description | Notes
37003700

37013701
<a name="getPdfInStorageToLaTeX"></a>
37023702
## **getPdfInStorageToLaTeX**
3703-
> getPdfInStorageToLaTeX(name, pagesCount, folder, storage)
3703+
> getPdfInStorageToLaTeX(name, folder, storage)
37043704
37053705
Converts PDF document (located on storage) to LaTeX format and returns resulting file in response content
37063706

37073707
### Parameters
37083708
Name | Type | Description | Notes
37093709
------------- | ------------- | ------------- | -------------
37103710
**name** | **string** | The document name. |
3711-
**pagesCount** | **number** | Pages count. | [optional]
37123711
**folder** | **string** | The document folder. | [optional]
37133712
**storage** | **string** | The document storage. | [optional]
37143713

@@ -7435,15 +7434,14 @@ Name | Type | Description | Notes
74357434

74367435
<a name="putPdfInRequestToLaTeX"></a>
74377436
## **putPdfInRequestToLaTeX**
7438-
> putPdfInRequestToLaTeX(outPath, pagesCount, storage, file)
7437+
> putPdfInRequestToLaTeX(outPath, storage, file)
74397438
74407439
Converts PDF document (in request content) to LaTeX format and uploads resulting file to storage.
74417440

74427441
### Parameters
74437442
Name | Type | Description | Notes
74447443
------------- | ------------- | ------------- | -------------
74457444
**outPath** | **string** | Full resulting filename (ex. /folder1/folder2/result.tex) |
7446-
**pagesCount** | **number** | Pages count. | [optional]
74477445
**storage** | **string** | The document storage. | [optional]
74487446
**file** | **Buffer** | A file to be converted. | [optional]
74497447

@@ -7789,7 +7787,7 @@ Name | Type | Description | Notes
77897787

77907788
<a name="putPdfInStorageToLaTeX"></a>
77917789
## **putPdfInStorageToLaTeX**
7792-
> putPdfInStorageToLaTeX(name, outPath, pagesCount, folder, storage)
7790+
> putPdfInStorageToLaTeX(name, outPath, folder, storage)
77937791
77947792
Converts PDF document (located on storage) to LaTeX format and uploads resulting file to storage
77957793

@@ -7798,7 +7796,6 @@ Name | Type | Description | Notes
77987796
------------- | ------------- | ------------- | -------------
77997797
**name** | **string** | The document name. |
78007798
**outPath** | **string** | Full resulting filename (ex. /folder1/folder2/result.tex) |
7801-
**pagesCount** | **number** | Pages count. | [optional]
78027799
**folder** | **string** | The document folder. | [optional]
78037800
**storage** | **string** | The document storage. | [optional]
78047801

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "asposepdfcloud",
3-
"version": "20.2.0",
3+
"version": "20.4.0",
44
"description": "Aspose.PDF Cloud SDK",
55
"homepage": "https://products.aspose.cloud/pdf/cloud",
66
"author": {

src/api/api.ts

+4-18
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ import { GraphInfo } from "../models/graphInfo";
6464
import { HorizontalAlignment } from "../models/horizontalAlignment";
6565
import { HtmlDocumentType } from "../models/htmlDocumentType";
6666
import { HtmlMarkupGenerationModes } from "../models/htmlMarkupGenerationModes";
67+
import { ImageFragment } from "../models/imageFragment";
6768
import { ImageSrcType } from "../models/imageSrcType";
6869
import { ImageTemplate } from "../models/imageTemplate";
6970
import { ImageTemplatesRequest } from "../models/imageTemplatesRequest";
@@ -8846,11 +8847,10 @@ export class PdfApi {
88468847
*
88478848
* @summary Converts PDF document (located on storage) to LaTeX format and returns resulting file in response content
88488849
* @param name The document name.
8849-
* @param pagesCount Pages count.
88508850
* @param folder The document folder.
88518851
* @param storage The document storage.
88528852
*/
8853-
public async getPdfInStorageToLaTeX (name: string, pagesCount?: number, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
8853+
public async getPdfInStorageToLaTeX (name: string, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: Buffer; }> {
88548854
const localVarPath = this.basePath + '/pdf/{name}/convert/latex'
88558855
.replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
88568856
let localVarQueryParameters: any = {};
@@ -8862,10 +8862,6 @@ export class PdfApi {
88628862
throw new Error('Required parameter name was null or undefined when calling getPdfInStorageToLaTeX.');
88638863
}
88648864

8865-
if (pagesCount !== undefined && null !== pagesCount) {
8866-
localVarQueryParameters['pagesCount'] = ObjectSerializer.serialize(pagesCount, "number");
8867-
}
8868-
88698865
if (folder !== undefined && null !== folder) {
88708866
localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
88718867
}
@@ -19186,11 +19182,10 @@ export class PdfApi {
1918619182
*
1918719183
* @summary Converts PDF document (in request content) to LaTeX format and uploads resulting file to storage.
1918819184
* @param outPath Full resulting filename (ex. /folder1/folder2/result.tex)
19189-
* @param pagesCount Pages count.
1919019185
* @param storage The document storage.
1919119186
* @param file A file to be converted.
1919219187
*/
19193-
public async putPdfInRequestToLaTeX (outPath: string, pagesCount?: number, storage?: string, file?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse; }> {
19188+
public async putPdfInRequestToLaTeX (outPath: string, storage?: string, file?: Buffer) : Promise<{ response: http.IncomingMessage; body: AsposeResponse; }> {
1919419189
const localVarPath = this.basePath + '/pdf/convert/latex';
1919519190
let localVarQueryParameters: any = {};
1919619191
let localVarHeaderParams: any = (<any>Object).assign({}, this.defaultHeaders);
@@ -19205,10 +19200,6 @@ export class PdfApi {
1920519200
localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
1920619201
}
1920719202

19208-
if (pagesCount !== undefined && null !== pagesCount) {
19209-
localVarQueryParameters['pagesCount'] = ObjectSerializer.serialize(pagesCount, "number");
19210-
}
19211-
1921219203
if (storage !== undefined && null !== storage) {
1921319204
localVarQueryParameters['storage'] = ObjectSerializer.serialize(storage, "string");
1921419205
}
@@ -20283,11 +20274,10 @@ export class PdfApi {
2028320274
* @summary Converts PDF document (located on storage) to LaTeX format and uploads resulting file to storage
2028420275
* @param name The document name.
2028520276
* @param outPath Full resulting filename (ex. /folder1/folder2/result.tex)
20286-
* @param pagesCount Pages count.
2028720277
* @param folder The document folder.
2028820278
* @param storage The document storage.
2028920279
*/
20290-
public async putPdfInStorageToLaTeX (name: string, outPath: string, pagesCount?: number, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse; }> {
20280+
public async putPdfInStorageToLaTeX (name: string, outPath: string, folder?: string, storage?: string) : Promise<{ response: http.IncomingMessage; body: AsposeResponse; }> {
2029120281
const localVarPath = this.basePath + '/pdf/{name}/convert/latex'
2029220282
.replace('{' + 'name' + '}', encodeURIComponent(String(name)).replace('%2F', '/'));
2029320283
let localVarQueryParameters: any = {};
@@ -20308,10 +20298,6 @@ export class PdfApi {
2030820298
localVarQueryParameters['outPath'] = ObjectSerializer.serialize(outPath, "string");
2030920299
}
2031020300

20311-
if (pagesCount !== undefined && null !== pagesCount) {
20312-
localVarQueryParameters['pagesCount'] = ObjectSerializer.serialize(pagesCount, "number");
20313-
}
20314-
2031520301
if (folder !== undefined && null !== folder) {
2031620302
localVarQueryParameters['folder'] = ObjectSerializer.serialize(folder, "string");
2031720303
}

src/models/cell.ts

+28
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
*
2020
*/
2121

22+
import { ImageFragment } from "./imageFragment";
2223
import { VerticalAlignment } from "./verticalAlignment";
2324
import { TextRect } from "./textRect";
2425
import { TextState } from "./textState";
@@ -52,6 +53,10 @@ export class Cell {
5253
*/
5354
'backgroundImageFile': string;
5455
/**
56+
* Gets or sets path of the background image file from storage.
57+
*/
58+
'backgroundImageStorageFile': string;
59+
/**
5560
* Gets or sets the alignment.
5661
*/
5762
'alignment': HorizontalAlignment;
@@ -83,6 +88,14 @@ export class Cell {
8388
* Gets or sets the column width.
8489
*/
8590
'width': number;
91+
/**
92+
* Gets or sets Html fragment.
93+
*/
94+
'htmlFragment': string;
95+
/**
96+
* Gets or sets ImageFragment list.
97+
*/
98+
'images': Array<ImageFragment>;
8699

87100
static discriminator = undefined;
88101

@@ -112,6 +125,11 @@ export class Cell {
112125
"baseName": "BackgroundImageFile",
113126
"type": "string"
114127
},
128+
{
129+
"name": "backgroundImageStorageFile",
130+
"baseName": "BackgroundImageStorageFile",
131+
"type": "string"
132+
},
115133
{
116134
"name": "alignment",
117135
"baseName": "Alignment",
@@ -151,6 +169,16 @@ export class Cell {
151169
"name": "width",
152170
"baseName": "Width",
153171
"type": "number"
172+
},
173+
{
174+
"name": "htmlFragment",
175+
"baseName": "HtmlFragment",
176+
"type": "string"
177+
},
178+
{
179+
"name": "images",
180+
"baseName": "Images",
181+
"type": "Array<ImageFragment>"
154182
} ];
155183

156184
static getAttributeTypeMap() {

src/models/imageFragment.ts

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
 /**
2+
*
3+
* Copyright (c) 2020 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 { MarginInfo } from "./marginInfo";
23+
import { VerticalAlignment } from "./verticalAlignment";
24+
import { HorizontalAlignment } from "./horizontalAlignment";
25+
26+
/**
27+
* Represents Image Fragment DTO.
28+
*/
29+
export class ImageFragment {
30+
/**
31+
* Gets or sets full storage path of image.
32+
*/
33+
'imageFile': string;
34+
/**
35+
* Gets or sets fix width of the image.
36+
*/
37+
'fixWidth': number;
38+
/**
39+
* Gets or sets fix height of the image.
40+
*/
41+
'fixHeight': number;
42+
/**
43+
* Gets or sets horizontal alignment of the image.
44+
*/
45+
'horizontalAlignment': HorizontalAlignment;
46+
/**
47+
* Gets or sets vertical alignment of the image.
48+
*/
49+
'verticalAlignment': VerticalAlignment;
50+
/**
51+
* Gets or sets ImageScale of the image.
52+
*/
53+
'imageScale': number;
54+
/**
55+
* Gets or sets Margin of the image.
56+
*/
57+
'margin': MarginInfo;
58+
59+
static discriminator = undefined;
60+
61+
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
62+
{
63+
"name": "imageFile",
64+
"baseName": "ImageFile",
65+
"type": "string"
66+
},
67+
{
68+
"name": "fixWidth",
69+
"baseName": "FixWidth",
70+
"type": "number"
71+
},
72+
{
73+
"name": "fixHeight",
74+
"baseName": "FixHeight",
75+
"type": "number"
76+
},
77+
{
78+
"name": "horizontalAlignment",
79+
"baseName": "HorizontalAlignment",
80+
"type": "HorizontalAlignment"
81+
},
82+
{
83+
"name": "verticalAlignment",
84+
"baseName": "VerticalAlignment",
85+
"type": "VerticalAlignment"
86+
},
87+
{
88+
"name": "imageScale",
89+
"baseName": "ImageScale",
90+
"type": "number"
91+
},
92+
{
93+
"name": "margin",
94+
"baseName": "Margin",
95+
"type": "MarginInfo"
96+
} ];
97+
98+
static getAttributeTypeMap() {
99+
return ImageFragment.attributeTypeMap;
100+
}
101+
}
102+
103+

src/objectSerializer.ts

+2
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ import { GraphInfo } from "./models/graphInfo";
6464
import { HorizontalAlignment } from "./models/horizontalAlignment";
6565
import { HtmlDocumentType } from "./models/htmlDocumentType";
6666
import { HtmlMarkupGenerationModes } from "./models/htmlMarkupGenerationModes";
67+
import { ImageFragment } from "./models/imageFragment";
6768
import { ImageSrcType } from "./models/imageSrcType";
6869
import { ImageTemplate } from "./models/imageTemplate";
6970
import { ImageTemplatesRequest } from "./models/imageTemplatesRequest";
@@ -372,6 +373,7 @@ let typeMap: {[index: string]: any} = {
372373
"FilesList": FilesList,
373374
"FilesUploadResult": FilesUploadResult,
374375
"GraphInfo": GraphInfo,
376+
"ImageFragment": ImageFragment,
375377
"ImageTemplate": ImageTemplate,
376378
"ImageTemplatesRequest": ImageTemplatesRequest,
377379
"Link": Link,

test/baseTestPdfApi.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,8 @@ export function drawTable() {
155155
// change properties on paragraph AFTER first clearing and re-adding paragraphs
156156
else if (c == 4)
157157
{
158-
cell.paragraphs[0].text = "y";
159-
cell.paragraphs[0].textState = textState;
160-
cell.paragraphs[0].textState.foregroundColor = { a: 0xFF, r: 0x00, g: 0x00, b: 0xFF };
158+
cell.paragraphs = null;
159+
cell.htmlFragment = '<ul><li>First</li><li>Second</li></ul>';
161160
}
162161
row.cells.push(cell);
163162

0 commit comments

Comments
 (0)