Skip to content

Commit 3c21a2f

Browse files
authored
Merge pull request #38 from kaferi/master
Update to v20.8
2 parents d1dff68 + 488cbdf commit 3c21a2f

File tree

8 files changed

+31
-17
lines changed

8 files changed

+31
-17
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Aspose.PDF Cloud
22

33
- API version: 3.0
4-
- Package version: 20.7.0
4+
- Package version: 20.8.0
55

66
[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.
77

@@ -24,15 +24,15 @@ gem build aspose_pdf_cloud.gemspec
2424
Then either install the gem locally:
2525

2626
```shell
27-
gem install ./aspose_pdf_cloud-20.7.0.gem
27+
gem install ./aspose_pdf_cloud-20.8.0.gem
2828
```
29-
(for development, run `gem install --dev ./aspose_pdf_cloud-20.7.0.gem` to install the development dependencies)
29+
(for development, run `gem install --dev ./aspose_pdf_cloud-20.8.0.gem` to install the development dependencies)
3030

3131
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
3232

3333
Finally add this to the Gemfile:
3434

35-
gem 'aspose_pdf_cloud', '~> 20.7.0'
35+
gem 'aspose_pdf_cloud', '~> 20.8.0'
3636

3737
### Install from Git
3838

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
**line_spacing** | [**LineSpacing**](LineSpacing.md) | Line spacing mode. | [optional]
88
**wrap_mode** | [**WrapMode**](WrapMode.md) | Word wrap mode. | [optional]
9-
**horizontal_alignment** | [**TextHorizontalAlignment**](TextHorizontalAlignment.md) | Horizontal alignment for the text inside paragrph's rectangle. | [optional]
9+
**horizontal_alignment** | [**TextHorizontalAlignment**](TextHorizontalAlignment.md) | Horizontal alignment for the text inside paragraph's rectangle. | [optional]
1010
**left_margin** | **Float** | Left margin. | [optional]
1111
**right_margin** | **Float** | Right margin. | [optional]
1212
**top_margin** | **Float** | Top margin. | [optional]
1313
**bottom_margin** | **Float** | Bottom margin. | [optional]
1414
**rectangle** | [**Rectangle**](Rectangle.md) | Rectangle of the paragraph. | [optional]
1515
**rotation** | **Float** | Rotation angle in degrees. | [optional]
1616
**subsequent_lines_indent** | **Float** | Subsequent lines indent value. | [optional]
17-
**vertical_alignment** | [**VerticalAlignment**](VerticalAlignment.md) | Vertical alignment for the text inside paragrph's rectangle | [optional]
17+
**vertical_alignment** | [**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

docs/TextState.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ Represents a text state of a text
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**font_size** | **Float** | 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
**foreground_color** | [**Color**](Color.md) | Gets or sets foreground color of the text. | [optional]
1010
**background_color** | [**Color**](Color.md) | Sets background color of the text. | [optional]
1111
**font_style** | [**FontStyles**](FontStyles.md) | Sets font style of the text. |
12+
**font_file** | **String** | Sets path of font file in storage. | [optional]
1213

1314

lib/aspose_pdf_cloud/models/paragraph.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Paragraph
3131
# Word wrap mode.
3232
attr_accessor :wrap_mode
3333

34-
# Horizontal alignment for the text inside paragrph's rectangle.
34+
# Horizontal alignment for the text inside paragraph's rectangle.
3535
attr_accessor :horizontal_alignment
3636

3737
# Left margin.
@@ -55,7 +55,7 @@ class Paragraph
5555
# Subsequent lines indent value.
5656
attr_accessor :subsequent_lines_indent
5757

58-
# Vertical alignment for the text inside paragrph's rectangle
58+
# Vertical alignment for the text inside paragraph's rectangle
5959
attr_accessor :vertical_alignment
6060

6161
# An array of text lines.

lib/aspose_pdf_cloud/models/text_state.rb

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class TextState
2828
# Gets or sets font size of the text.
2929
attr_accessor :font_size
3030

31-
# Gets or sets font of the text.
31+
# Gets or sets font name of the text.
3232
attr_accessor :font
3333

3434
# Gets or sets foreground color of the text.
@@ -40,6 +40,9 @@ class TextState
4040
# Sets font style of the text.
4141
attr_accessor :font_style
4242

43+
# Sets path of font file in storage.
44+
attr_accessor :font_file
45+
4346

4447
# Attribute mapping from ruby-style variable name to JSON key.
4548
def self.attribute_map
@@ -48,7 +51,8 @@ def self.attribute_map
4851
:'font' => :'Font',
4952
:'foreground_color' => :'ForegroundColor',
5053
:'background_color' => :'BackgroundColor',
51-
:'font_style' => :'FontStyle'
54+
:'font_style' => :'FontStyle',
55+
:'font_file' => :'FontFile'
5256
}
5357
end
5458

@@ -59,7 +63,8 @@ def self.swagger_types
5963
:'font' => :'String',
6064
:'foreground_color' => :'Color',
6165
:'background_color' => :'Color',
62-
:'font_style' => :'FontStyles'
66+
:'font_style' => :'FontStyles',
67+
:'font_file' => :'String'
6368
}
6469
end
6570

@@ -91,6 +96,10 @@ def initialize(attributes = {})
9196
self.font_style = attributes[:'FontStyle']
9297
end
9398

99+
if attributes.has_key?(:'FontFile')
100+
self.font_file = attributes[:'FontFile']
101+
end
102+
94103
end
95104

96105
# Show invalid properties with the reasons. Usually used together with valid?
@@ -125,7 +134,8 @@ def ==(o)
125134
font == o.font &&
126135
foreground_color == o.foreground_color &&
127136
background_color == o.background_color &&
128-
font_style == o.font_style
137+
font_style == o.font_style &&
138+
font_file == o.font_file
129139
end
130140

131141
# @see the `==` method
@@ -137,7 +147,7 @@ def eql?(o)
137147
# Calculates hash code according to all attributes.
138148
# @return [Fixnum] Hash code
139149
def hash
140-
[font_size, font, foreground_color, background_color, font_style].hash
150+
[font_size, font, foreground_color, background_color, font_style, font_file].hash
141151
end
142152

143153
# Builds the object from hash

lib/aspose_pdf_cloud/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020
=end
2121

2222
module AsposePdfCloud
23-
VERSION = "20.7.0"
23+
VERSION = "20.8.0"
2424
end

test/pdf_tests.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5875,6 +5875,8 @@ def test_get_page_text_by_two_text_on_page
58755875
def test_put_add_text
58765876
file_name = '4pages.pdf'
58775877
upload_file(file_name)
5878+
font_name = 'Righteous-Regular.ttf'
5879+
upload_file(font_name)
58785880

58795881
page_number = 1
58805882

@@ -5897,11 +5899,12 @@ def test_put_add_text
58975899
background_color.b = 0x00
58985900

58995901
text_state = TextState.new
5900-
text_state.font = 'Arial'
5902+
text_state.font = 'Righteous'
59015903
text_state.font_size = 10
59025904
text_state.foreground_color = foreground_color
59035905
text_state.background_color = background_color
5904-
text_state.font_style = FontStyles::BOLD
5906+
text_state.font_style = FontStyles::REGULAR
5907+
text_state.font_file = @temp_folder + '/' + font_name
59055908

59065909
segment = Segment.new
59075910
segment.value = 'segment 1'

test_data/Righteous-Regular.ttf

39.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)