Skip to content

Commit 0393628

Browse files
authored
Merge pull request #39 from kaferi/master
Update to v20.8
2 parents da268a2 + 9ae0901 commit 0393628

File tree

11 files changed

+53
-23
lines changed

11 files changed

+53
-23
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Aspose.PDF Cloud
22
- API version: 3.0
3-
- Package version: 20.7.0
3+
- Package version: 20.8.0
44

55
[Aspose.PDF Cloud](https://products.aspose.cloud/pdf) is a true REST API that enables you to perform a wide range of document processing operations including creation, manipulation, conversion and rendering of PDF documents in the cloud.
66

@@ -38,7 +38,7 @@ Add this dependency to your project's POM:
3838
<dependency>
3939
<groupId>com.aspose</groupId>
4040
<artifactId>aspose-cloud-pdf-android</artifactId>
41-
<version>20.7.0</version>
41+
<version>20.8.0</version>
4242
<scope>compile</scope>
4343
</dependency>
4444
```
@@ -48,7 +48,7 @@ Add this dependency to your project's POM:
4848
Add this dependency to your project's build file:
4949

5050
```groovy
51-
compile "com.aspose:aspose-cloud-pdf-android:20.7.0"
51+
compile "com.aspose:aspose-cloud-pdf-android:20.8.0"
5252
```
5353

5454
### Others
@@ -59,7 +59,7 @@ At first generate the JAR by executing:
5959

6060
Then manually install the following JARs:
6161

62-
* target/aspose-cloud-pdf-android-20.7.0.jar
62+
* target/aspose-cloud-pdf-android-20.8.0.jar
6363
* target/lib/*.jar
6464

6565
## Getting Started

sdk/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ apply plugin: 'idea'
2020
apply plugin: 'eclipse'
2121

2222
group = 'com.aspose'
23-
version = '20.7.0'
23+
version = '20.8.0'
2424

2525
buildscript {
2626
repositories {
@@ -96,7 +96,7 @@ dependencies {
9696
publish {
9797
groupId = 'com.aspose'
9898
artifactId = 'aspose-cloud-pdf-android'
99-
publishVersion = '20.7.0'
99+
publishVersion = '20.8.0'
100100
desc = 'Aspose.PDF Cloud is a REST API for creating and editing PDF files. 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.'
101101
licences = ['MIT']
102102
website = 'https://products.aspose.cloud/pdf/cloud'

sdk/docs/Paragraph.md

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

2121

sdk/docs/TextState.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@ Represents a text state of a text
66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**fontSize** | **Double** | Gets or sets font size of the text. |
9-
**font** | **String** | Gets or sets font of the text. | [optional]
9+
**font** | **String** | Gets or sets font name of the text. | [optional]
1010
**foregroundColor** | [**Color**](Color.md) | Gets or sets foreground color of the text. | [optional]
1111
**backgroundColor** | [**Color**](Color.md) | Sets background color of the text. | [optional]
1212
**fontStyle** | [**FontStyles**](FontStyles.md) | Sets font style of the text. |
13+
**fontFile** | **String** | Sets path of font file in storage. | [optional]
1314

1415

1516
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)

sdk/src/main/java/com/aspose/asposecloudpdfandroid/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public ApiClient() {
9292

9393
// Add custom headers
9494
addDefaultHeader("x-aspose-client", "android sdk");
95-
addDefaultHeader("x-aspose-client-version", "20.7.0");
95+
addDefaultHeader("x-aspose-client-version", "20.8.0");
9696

9797
// PDFCLOUD-418 Set default Connect Timeout
9898
setConnectTimeout(5 * 60 * 1000);

sdk/src/main/java/com/aspose/asposecloudpdfandroid/model/Paragraph.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ public Paragraph horizontalAlignment(TextHorizontalAlignment horizontalAlignment
124124
}
125125

126126
/**
127-
* Horizontal alignment for the text inside paragrph&#39;s rectangle.
127+
* Horizontal alignment for the text inside paragraph&#39;s rectangle.
128128
* @return horizontalAlignment
129129
**/
130-
@ApiModelProperty(value = "Horizontal alignment for the text inside paragrph's rectangle.")
130+
@ApiModelProperty(value = "Horizontal alignment for the text inside paragraph's rectangle.")
131131
public TextHorizontalAlignment getHorizontalAlignment() {
132132
return horizontalAlignment;
133133
}
@@ -268,10 +268,10 @@ public Paragraph verticalAlignment(VerticalAlignment verticalAlignment) {
268268
}
269269

270270
/**
271-
* Vertical alignment for the text inside paragrph&#39;s rectangle
271+
* Vertical alignment for the text inside paragraph&#39;s rectangle
272272
* @return verticalAlignment
273273
**/
274-
@ApiModelProperty(value = "Vertical alignment for the text inside paragrph's rectangle")
274+
@ApiModelProperty(value = "Vertical alignment for the text inside paragraph's rectangle")
275275
public VerticalAlignment getVerticalAlignment() {
276276
return verticalAlignment;
277277
}

sdk/src/main/java/com/aspose/asposecloudpdfandroid/model/TextState.java

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ public class TextState {
5555
@SerializedName("FontStyle")
5656
private FontStyles fontStyle = null;
5757

58+
@SerializedName("FontFile")
59+
private String fontFile = null;
60+
5861
public TextState fontSize(Double fontSize) {
5962
this.fontSize = fontSize;
6063
return this;
@@ -79,10 +82,10 @@ public TextState font(String font) {
7982
}
8083

8184
/**
82-
* Gets or sets font of the text.
85+
* Gets or sets font name of the text.
8386
* @return font
8487
**/
85-
@ApiModelProperty(value = "Gets or sets font of the text.")
88+
@ApiModelProperty(value = "Gets or sets font name of the text.")
8689
public String getFont() {
8790
return font;
8891
}
@@ -145,6 +148,24 @@ public void setFontStyle(FontStyles fontStyle) {
145148
this.fontStyle = fontStyle;
146149
}
147150

151+
public TextState fontFile(String fontFile) {
152+
this.fontFile = fontFile;
153+
return this;
154+
}
155+
156+
/**
157+
* Sets path of font file in storage.
158+
* @return fontFile
159+
**/
160+
@ApiModelProperty(value = "Sets path of font file in storage.")
161+
public String getFontFile() {
162+
return fontFile;
163+
}
164+
165+
public void setFontFile(String fontFile) {
166+
this.fontFile = fontFile;
167+
}
168+
148169

149170
@Override
150171
public boolean equals(java.lang.Object o) {
@@ -159,12 +180,13 @@ public boolean equals(java.lang.Object o) {
159180
Objects.equals(this.font, textState.font) &&
160181
Objects.equals(this.foregroundColor, textState.foregroundColor) &&
161182
Objects.equals(this.backgroundColor, textState.backgroundColor) &&
162-
Objects.equals(this.fontStyle, textState.fontStyle);
183+
Objects.equals(this.fontStyle, textState.fontStyle) &&
184+
Objects.equals(this.fontFile, textState.fontFile);
163185
}
164186

165187
@Override
166188
public int hashCode() {
167-
return Objects.hash(fontSize, font, foregroundColor, backgroundColor, fontStyle);
189+
return Objects.hash(fontSize, font, foregroundColor, backgroundColor, fontStyle, fontFile);
168190
}
169191

170192

@@ -178,6 +200,7 @@ public String toString() {
178200
sb.append(" foregroundColor: ").append(toIndentedString(foregroundColor)).append("\n");
179201
sb.append(" backgroundColor: ").append(toIndentedString(backgroundColor)).append("\n");
180202
sb.append(" fontStyle: ").append(toIndentedString(fontStyle)).append("\n");
203+
sb.append(" fontFile: ").append(toIndentedString(fontFile)).append("\n");
181204
sb.append("}");
182205
return sb.toString();
183206
}

sdk/src/test/java/com/aspose/asposecloudpdfandroid/api/HeaderFooterTests.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ public void postDocumentTextHeaderTest()throws ApiException
6464
TextState textState = new TextState()
6565
.fontSize(14.)
6666
.foregroundColor(foregroundColor)
67-
.backgroundColor(backgroundColor);
67+
.backgroundColor(backgroundColor)
68+
.font("Arial");
6869

6970
TextHeader header = new TextHeader()
7071
.leftMargin(1.)
@@ -116,7 +117,8 @@ public void postDocumentTextFooterTest()throws ApiException
116117
TextState textState = new TextState()
117118
.fontSize(14.)
118119
.foregroundColor(foregroundColor)
119-
.backgroundColor(backgroundColor);
120+
.backgroundColor(backgroundColor)
121+
.font("Arial");
120122

121123
TextFooter footer = new TextFooter()
122124
.leftMargin(1.)

sdk/src/test/java/com/aspose/asposecloudpdfandroid/api/StampTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public void postPageTextStampsTest()throws ApiException
111111
th.uploadFile(name);
112112
int pageNumber = 1;
113113

114-
TextState textState = new TextState().fontSize(14.);
114+
TextState textState = new TextState().fontSize(14.).font("Arial");
115115

116116
TextStamp stamp = new TextStamp()
117117
.textAlignment(HorizontalAlignment.CENTER)

sdk/src/test/java/com/aspose/asposecloudpdfandroid/api/TextTests.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ public void putAddTextTest() throws ApiException
9999
String name = "4pages.pdf";
100100
th.uploadFile(name);
101101

102+
String fontFile = "Righteous-Regular.ttf";
103+
th.uploadFile(fontFile);
104+
102105
int pageNumber = 1;
103106
String folder = th.tempFolder;
104107

@@ -121,11 +124,12 @@ public void putAddTextTest() throws ApiException
121124
backgroundColor.setB(0x00);
122125

123126
TextState textState = new TextState();
124-
textState.setFont("Arial");
127+
textState.setFont("Righteous");
125128
textState.setFontSize(10.);
126129
textState.setForegroundColor(foregroundColor);
127130
textState.setBackgroundColor(backgroundColor);
128-
textState.setFontStyle(FontStyles.BOLD);
131+
textState.setFontStyle(FontStyles.REGULAR);
132+
textState.setFontFile(folder + '/' + fontFile);
129133

130134
final Segment segment = new Segment();
131135
segment.setValue("segment 1");

0 commit comments

Comments
 (0)