aspose_pdf_cloud 20.7.0 → 20.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/docs/Paragraph.md +2 -2
- data/docs/TextState.md +2 -1
- data/lib/aspose_pdf_cloud/models/paragraph.rb +2 -2
- data/lib/aspose_pdf_cloud/models/text_state.rb +15 -5
- data/lib/aspose_pdf_cloud/version.rb +1 -1
- data/test/pdf_tests.rb +5 -2
- data/test_data/Righteous-Regular.ttf +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2dd5106417cbdff73d81f93aae9860b8f59c3a06761ce78edaba1db314067a10
|
4
|
+
data.tar.gz: c2ed4a16965659d81862f449f5a1da45e329048fa94c60a8ab0a7aea766c75c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d34e9f60eec5b0cfe4cc0fc40d8a9e2527534220f1bab8671b2e851ff0e512ce7b2d5aa876be37ae233ea0c20ddceb204809c3c3f8d5f6c4bc401115a5ba8dc2
|
7
|
+
data.tar.gz: c2b916da6d2485f12d75422efb3a5acc761f7d6b8f055facb70d485f0f8aa5286f460b150236da03650f027bc7a4406169de0111a8827ac076423d1a8a61ee95
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Aspose.PDF Cloud
|
2
2
|
|
3
3
|
- API version: 3.0
|
4
|
-
- Package version: 20.
|
4
|
+
- Package version: 20.8.0
|
5
5
|
|
6
6
|
[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.
|
7
7
|
|
@@ -24,15 +24,15 @@ gem build aspose_pdf_cloud.gemspec
|
|
24
24
|
Then either install the gem locally:
|
25
25
|
|
26
26
|
```shell
|
27
|
-
gem install ./aspose_pdf_cloud-20.
|
27
|
+
gem install ./aspose_pdf_cloud-20.8.0.gem
|
28
28
|
```
|
29
|
-
(for development, run `gem install --dev ./aspose_pdf_cloud-20.
|
29
|
+
(for development, run `gem install --dev ./aspose_pdf_cloud-20.8.0.gem` to install the development dependencies)
|
30
30
|
|
31
31
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
32
32
|
|
33
33
|
Finally add this to the Gemfile:
|
34
34
|
|
35
|
-
gem 'aspose_pdf_cloud', '~> 20.
|
35
|
+
gem 'aspose_pdf_cloud', '~> 20.8.0'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
data/docs/Paragraph.md
CHANGED
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
|
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**line_spacing** | [**LineSpacing**](LineSpacing.md) | Line spacing mode. | [optional]
|
8
8
|
**wrap_mode** | [**WrapMode**](WrapMode.md) | Word wrap mode. | [optional]
|
9
|
-
**horizontal_alignment** | [**TextHorizontalAlignment**](TextHorizontalAlignment.md) | Horizontal alignment for the text inside
|
9
|
+
**horizontal_alignment** | [**TextHorizontalAlignment**](TextHorizontalAlignment.md) | Horizontal alignment for the text inside paragraph's rectangle. | [optional]
|
10
10
|
**left_margin** | **Float** | Left margin. | [optional]
|
11
11
|
**right_margin** | **Float** | Right margin. | [optional]
|
12
12
|
**top_margin** | **Float** | Top margin. | [optional]
|
@@ -14,7 +14,7 @@ Name | Type | Description | Notes
|
|
14
14
|
**rectangle** | [**Rectangle**](Rectangle.md) | Rectangle of the paragraph. | [optional]
|
15
15
|
**rotation** | **Float** | Rotation angle in degrees. | [optional]
|
16
16
|
**subsequent_lines_indent** | **Float** | Subsequent lines indent value. | [optional]
|
17
|
-
**vertical_alignment** | [**VerticalAlignment**](VerticalAlignment.md) | Vertical alignment for the text inside
|
17
|
+
**vertical_alignment** | [**VerticalAlignment**](VerticalAlignment.md) | Vertical alignment for the text inside paragraph's rectangle | [optional]
|
18
18
|
**lines** | [**Array<TextLine>**](TextLine.md) | An array of text lines. |
|
19
19
|
|
20
20
|
|
data/docs/TextState.md
CHANGED
@@ -5,9 +5,10 @@ Represents a text state of a text
|
|
5
5
|
Name | Type | Description | Notes
|
6
6
|
------------ | ------------- | ------------- | -------------
|
7
7
|
**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]
|
9
9
|
**foreground_color** | [**Color**](Color.md) | Gets or sets foreground color of the text. | [optional]
|
10
10
|
**background_color** | [**Color**](Color.md) | Sets background color of the text. | [optional]
|
11
11
|
**font_style** | [**FontStyles**](FontStyles.md) | Sets font style of the text. |
|
12
|
+
**font_file** | **String** | Sets path of font file in storage. | [optional]
|
12
13
|
|
13
14
|
|
@@ -31,7 +31,7 @@ module AsposePdfCloud
|
|
31
31
|
# Word wrap mode.
|
32
32
|
attr_accessor :wrap_mode
|
33
33
|
|
34
|
-
# Horizontal alignment for the text inside
|
34
|
+
# Horizontal alignment for the text inside paragraph's rectangle.
|
35
35
|
attr_accessor :horizontal_alignment
|
36
36
|
|
37
37
|
# Left margin.
|
@@ -55,7 +55,7 @@ module AsposePdfCloud
|
|
55
55
|
# Subsequent lines indent value.
|
56
56
|
attr_accessor :subsequent_lines_indent
|
57
57
|
|
58
|
-
# Vertical alignment for the text inside
|
58
|
+
# Vertical alignment for the text inside paragraph's rectangle
|
59
59
|
attr_accessor :vertical_alignment
|
60
60
|
|
61
61
|
# An array of text lines.
|
@@ -28,7 +28,7 @@ module AsposePdfCloud
|
|
28
28
|
# Gets or sets font size of the text.
|
29
29
|
attr_accessor :font_size
|
30
30
|
|
31
|
-
# Gets or sets font of the text.
|
31
|
+
# Gets or sets font name of the text.
|
32
32
|
attr_accessor :font
|
33
33
|
|
34
34
|
# Gets or sets foreground color of the text.
|
@@ -40,6 +40,9 @@ module AsposePdfCloud
|
|
40
40
|
# Sets font style of the text.
|
41
41
|
attr_accessor :font_style
|
42
42
|
|
43
|
+
# Sets path of font file in storage.
|
44
|
+
attr_accessor :font_file
|
45
|
+
|
43
46
|
|
44
47
|
# Attribute mapping from ruby-style variable name to JSON key.
|
45
48
|
def self.attribute_map
|
@@ -48,7 +51,8 @@ module AsposePdfCloud
|
|
48
51
|
:'font' => :'Font',
|
49
52
|
:'foreground_color' => :'ForegroundColor',
|
50
53
|
:'background_color' => :'BackgroundColor',
|
51
|
-
:'font_style' => :'FontStyle'
|
54
|
+
:'font_style' => :'FontStyle',
|
55
|
+
:'font_file' => :'FontFile'
|
52
56
|
}
|
53
57
|
end
|
54
58
|
|
@@ -59,7 +63,8 @@ module AsposePdfCloud
|
|
59
63
|
:'font' => :'String',
|
60
64
|
:'foreground_color' => :'Color',
|
61
65
|
:'background_color' => :'Color',
|
62
|
-
:'font_style' => :'FontStyles'
|
66
|
+
:'font_style' => :'FontStyles',
|
67
|
+
:'font_file' => :'String'
|
63
68
|
}
|
64
69
|
end
|
65
70
|
|
@@ -91,6 +96,10 @@ module AsposePdfCloud
|
|
91
96
|
self.font_style = attributes[:'FontStyle']
|
92
97
|
end
|
93
98
|
|
99
|
+
if attributes.has_key?(:'FontFile')
|
100
|
+
self.font_file = attributes[:'FontFile']
|
101
|
+
end
|
102
|
+
|
94
103
|
end
|
95
104
|
|
96
105
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -125,7 +134,8 @@ module AsposePdfCloud
|
|
125
134
|
font == o.font &&
|
126
135
|
foreground_color == o.foreground_color &&
|
127
136
|
background_color == o.background_color &&
|
128
|
-
font_style == o.font_style
|
137
|
+
font_style == o.font_style &&
|
138
|
+
font_file == o.font_file
|
129
139
|
end
|
130
140
|
|
131
141
|
# @see the `==` method
|
@@ -137,7 +147,7 @@ module AsposePdfCloud
|
|
137
147
|
# Calculates hash code according to all attributes.
|
138
148
|
# @return [Fixnum] Hash code
|
139
149
|
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
|
141
151
|
end
|
142
152
|
|
143
153
|
# Builds the object from hash
|
data/test/pdf_tests.rb
CHANGED
@@ -5875,6 +5875,8 @@ class PdfTests < Minitest::Test
|
|
5875
5875
|
def test_put_add_text
|
5876
5876
|
file_name = '4pages.pdf'
|
5877
5877
|
upload_file(file_name)
|
5878
|
+
font_name = 'Righteous-Regular.ttf'
|
5879
|
+
upload_file(font_name)
|
5878
5880
|
|
5879
5881
|
page_number = 1
|
5880
5882
|
|
@@ -5897,11 +5899,12 @@ class PdfTests < Minitest::Test
|
|
5897
5899
|
background_color.b = 0x00
|
5898
5900
|
|
5899
5901
|
text_state = TextState.new
|
5900
|
-
text_state.font = '
|
5902
|
+
text_state.font = 'Righteous'
|
5901
5903
|
text_state.font_size = 10
|
5902
5904
|
text_state.foreground_color = foreground_color
|
5903
5905
|
text_state.background_color = background_color
|
5904
|
-
text_state.font_style = FontStyles::
|
5906
|
+
text_state.font_style = FontStyles::REGULAR
|
5907
|
+
text_state.font_file = @temp_folder + '/' + font_name
|
5905
5908
|
|
5906
5909
|
segment = Segment.new
|
5907
5910
|
segment.value = 'segment 1'
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aspose_pdf_cloud
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 20.
|
4
|
+
version: 20.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aspose PDF Cloud
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -674,6 +674,7 @@ files:
|
|
674
674
|
- test_data/PdfWithXfaForm.pdf
|
675
675
|
- test_data/Penguins.emf
|
676
676
|
- test_data/Penguins.jpg
|
677
|
+
- test_data/Righteous-Regular.ttf
|
677
678
|
- test_data/ScreenMovie.swf
|
678
679
|
- test_data/Simple.svg
|
679
680
|
- test_data/Simple.xps
|