Skip to content

Commit 919b012

Browse files
authored
Merge pull request #44 from kaferi/master
Update to v20.8
2 parents bfed51e + e9af037 commit 919b012

File tree

11 files changed

+33
-15
lines changed

11 files changed

+33
-15
lines changed

docs/Paragraph.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**lineSpacing** | [**LineSpacing**](LineSpacing.md) | Line spacing mode. | [optional]
88
**wrapMode** | [**WrapMode**](WrapMode.md) | Word wrap mode. | [optional]
9-
**horizontalAlignment** | [**TextHorizontalAlignment**](TextHorizontalAlignment.md) | Horizontal alignment for the text inside paragrph's rectangle. | [optional]
9+
**horizontalAlignment** | [**TextHorizontalAlignment**](TextHorizontalAlignment.md) | Horizontal alignment for the text inside paragraph's rectangle. | [optional]
1010
**leftMargin** | **number** | Left margin. | [optional]
1111
**rightMargin** | **number** | Right margin. | [optional]
1212
**topMargin** | **number** | Top margin. | [optional]
1313
**bottomMargin** | **number** | Bottom margin. | [optional]
1414
**rectangle** | [**Rectangle**](Rectangle.md) | Rectangle of the paragraph. | [optional]
1515
**rotation** | **number** | Rotation angle in degrees. | [optional]
1616
**subsequentLinesIndent** | **number** | Subsequent lines indent value. | [optional]
17-
**verticalAlignment** | [**VerticalAlignment**](VerticalAlignment.md) | Vertical alignment for the text inside paragrph's rectangle | [optional]
17+
**verticalAlignment** | [**VerticalAlignment**](VerticalAlignment.md) | Vertical alignment for the text inside paragraph's rectangle | [optional]
1818
**lines** | [**Array<TextLine>**](TextLine.md) | An array of text lines. |
1919

2020
[[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/paragraph.ts)

docs/TextState.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ Represents a text state of a text
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**fontSize** | **number** | Gets or sets font size of the text. |
8-
**font** | **string** | Gets or sets font of the text. | [optional]
8+
**font** | **string** | Gets or sets font name of the text. | [optional]
99
**foregroundColor** | [**Color**](Color.md) | Gets or sets foreground color of the text. | [optional]
1010
**backgroundColor** | [**Color**](Color.md) | Sets background color of the text. | [optional]
1111
**fontStyle** | [**FontStyles**](FontStyles.md) | Sets font style of the text. |
12+
**fontFile** | **string** | Sets path of font file in storage. | [optional]
1213

1314
[[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/textState.ts)
1415

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": "20.7.0",
3+
"version": "20.8.0",
44
"description": "Aspose.PDF Cloud SDK",
55
"homepage": "https://products.aspose.cloud/pdf/cloud",
66
"author": {

src/models/paragraph.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export class Paragraph {
3939
*/
4040
'wrapMode': WrapMode;
4141
/**
42-
* Horizontal alignment for the text inside paragrph's rectangle.
42+
* Horizontal alignment for the text inside paragraph's rectangle.
4343
*/
4444
'horizontalAlignment': TextHorizontalAlignment;
4545
/**
@@ -71,7 +71,7 @@ export class Paragraph {
7171
*/
7272
'subsequentLinesIndent': number;
7373
/**
74-
* Vertical alignment for the text inside paragrph's rectangle
74+
* Vertical alignment for the text inside paragraph's rectangle
7575
*/
7676
'verticalAlignment': VerticalAlignment;
7777
/**

src/models/textState.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export class TextState {
3131
*/
3232
'fontSize': number;
3333
/**
34-
* Gets or sets font of the text.
34+
* Gets or sets font name of the text.
3535
*/
3636
'font': string;
3737
/**
@@ -46,6 +46,10 @@ export class TextState {
4646
* Sets font style of the text.
4747
*/
4848
'fontStyle': FontStyles;
49+
/**
50+
* Sets path of font file in storage.
51+
*/
52+
'fontFile': string;
4953

5054
static discriminator = undefined;
5155

@@ -74,6 +78,11 @@ export class TextState {
7478
"name": "fontStyle",
7579
"baseName": "FontStyle",
7680
"type": "FontStyles"
81+
},
82+
{
83+
"name": "fontFile",
84+
"baseName": "FontFile",
85+
"type": "string"
7786
} ];
7887

7988
static getAttributeTypeMap() {

src/requestHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ async function invokeApiMethodInternal(requestOptions: request.Options, confgura
9393
//headers
9494
sa.set("User-Agent", "pdf nodejs sdk");
9595
sa.set("x-aspose-client", "nodejs sdk");
96-
sa.set("x-aspose-client-version", "20.6.0");
96+
sa.set("x-aspose-client-version", "20.8.0");
9797

9898
if (!requestOptions.headers) {
9999
requestOptions.headers = {};

test/baseTestPdfApi.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ let pdfApi: PdfApi;
3939
export function getPdfApi() {
4040
if (!pdfApi) {
4141

42-
//Get App key and App SID from https://aspose.cloud
42+
// Get App key and App SID from https://aspose.cloud
4343
pdfApi = new PdfApi(
4444
"appSID",
4545
"appKey",
@@ -83,7 +83,8 @@ export function drawTable() {
8383
fontSize: 11,
8484
foregroundColor: { a: 0xFF, r: 0x00, g: 0xFF, b: 0x00 },
8585
backgroundColor: { a: 0xFF, r: 0xFF, g: 0x00, b: 0x00},
86-
fontStyle: FontStyles.Bold
86+
fontStyle: FontStyles.Bold,
87+
fontFile: null
8788
};
8889

8990
const numOfCols = 5;

test/testHeaderFooter.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ describe("Header Footer Tests", () => {
6161
fontSize: 14,
6262
foregroundColor: { a: 0x00, r: 0x00, g: 0xFF, b: 0x00 },
6363
backgroundColor: { a: 0x00, r: 0xFF, g: 0x00, b: 0x00},
64-
fontStyle: FontStyles.Bold
64+
fontStyle: FontStyles.Bold,
65+
fontFile: null
6566
};
6667

6768
const startPage = 2;
@@ -98,7 +99,8 @@ describe("Header Footer Tests", () => {
9899
fontSize: 14,
99100
foregroundColor: { a: 0x00, r: 0x00, g: 0xFF, b: 0x00 },
100101
backgroundColor: { a: 0x00, r: 0xFF, g: 0x00, b: 0x00},
101-
fontStyle: FontStyles.Bold
102+
fontStyle: FontStyles.Bold,
103+
fontFile: null
102104
};
103105

104106
const startPage = 2;

test/testStamps.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ describe("Stamps Tests", () => {
9393

9494
const textState = new TextState();
9595
textState.fontSize = 14;
96+
textState.font = 'Arial';
9697

9798
const stamp = new TextStamp();
9899
stamp.background = true;

test/testText.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ describe("Text Tests", () => {
6868

6969
describe("PutAddText Test", () => {
7070

71-
it("should return response with code 200", () => {
71+
it("should return response with code 200", async() => {
72+
73+
let fontName = 'Righteous-Regular.ttf';
74+
await BaseTest.uploadFile(fontName);
7275

7376
const paragraph = new Paragraph();
7477
paragraph.rectangle = { lLX: 100, lLY: 100, uRX: 200, uRY: 200};
@@ -90,11 +93,12 @@ describe("Text Tests", () => {
9093
{
9194
value: "segment 1",
9295
textState: {
93-
font: "Arial",
96+
font: "Righteous",
9497
fontSize: 10,
9598
foregroundColor: { a: 0x00, r: 0x00, g: 0xFF, b: 0x00 },
9699
backgroundColor: { a: 0x00, r: 0xFF, g: 0x00, b: 0x00},
97-
fontStyle: FontStyles.Bold
100+
fontStyle: FontStyles.Bold,
101+
fontFile: BaseTest.remoteTempFolder + '/' + fontName
98102
}
99103
}
100104
]

0 commit comments

Comments
 (0)