aspose_pdf_cloud 20.5.0 → 20.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -8
- data/docs/ApiInfo.md +10 -0
- data/docs/CheckBoxField.md +1 -0
- data/docs/ChoiceField.md +1 -0
- data/docs/ComboBoxField.md +1 -0
- data/docs/FormField.md +1 -0
- data/docs/ImageCompressionVersion.md +12 -0
- data/docs/ImageEncoding.md +13 -0
- data/docs/ListBoxField.md +1 -0
- data/docs/OptimizeOptions.md +13 -7
- data/docs/OutputFormat.md +11 -0
- data/docs/Paragraph.md +2 -2
- data/docs/PdfAType.md +3 -2
- data/docs/PdfApi.md +36 -12
- data/docs/RadioButtonField.md +1 -0
- data/docs/RadioButtonOptionField.md +1 -0
- data/docs/RedactionAnnotation.md +1 -1
- data/docs/SignatureCustomAppearance.md +1 -1
- data/docs/SignatureField.md +1 -0
- data/docs/TextBoxField.md +1 -0
- data/docs/TextState.md +2 -1
- data/docs/TextStyle.md +1 -0
- data/lib/aspose_pdf_cloud.rb +4 -0
- data/lib/aspose_pdf_cloud/api/pdf_api.rb +100 -22
- data/lib/aspose_pdf_cloud/models/api_info.rb +209 -0
- data/lib/aspose_pdf_cloud/models/check_box_field.rb +11 -1
- data/lib/aspose_pdf_cloud/models/choice_field.rb +11 -1
- data/lib/aspose_pdf_cloud/models/combo_box_field.rb +11 -1
- data/lib/aspose_pdf_cloud/models/form_field.rb +11 -1
- data/lib/aspose_pdf_cloud/models/image_compression_version.rb +45 -0
- data/lib/aspose_pdf_cloud/models/image_encoding.rb +46 -0
- data/lib/aspose_pdf_cloud/models/list_box_field.rb +11 -1
- data/lib/aspose_pdf_cloud/models/optimize_options.rb +60 -35
- data/lib/aspose_pdf_cloud/models/output_format.rb +44 -0
- data/lib/aspose_pdf_cloud/models/paragraph.rb +2 -2
- data/lib/aspose_pdf_cloud/models/pdf_a_type.rb +1 -0
- data/lib/aspose_pdf_cloud/models/radio_button_field.rb +11 -1
- data/lib/aspose_pdf_cloud/models/radio_button_option_field.rb +11 -1
- data/lib/aspose_pdf_cloud/models/redaction_annotation.rb +1 -1
- data/lib/aspose_pdf_cloud/models/signature_custom_appearance.rb +1 -1
- data/lib/aspose_pdf_cloud/models/signature_field.rb +11 -1
- data/lib/aspose_pdf_cloud/models/text_box_field.rb +11 -1
- data/lib/aspose_pdf_cloud/models/text_state.rb +15 -5
- data/lib/aspose_pdf_cloud/models/text_style.rb +14 -4
- data/lib/aspose_pdf_cloud/version.rb +1 -1
- data/test/pdf_tests.rb +8 -4
- data/test_data/Righteous-Regular.ttf +0 -0
- metadata +11 -2
@@ -31,6 +31,9 @@ module AsposePdfCloud
|
|
31
31
|
# Field name.
|
32
32
|
attr_accessor :partial_name
|
33
33
|
|
34
|
+
# Full Field name.
|
35
|
+
attr_accessor :full_name
|
36
|
+
|
34
37
|
# Field rectangle.
|
35
38
|
attr_accessor :rect
|
36
39
|
|
@@ -103,6 +106,7 @@ module AsposePdfCloud
|
|
103
106
|
{
|
104
107
|
:'links' => :'Links',
|
105
108
|
:'partial_name' => :'PartialName',
|
109
|
+
:'full_name' => :'FullName',
|
106
110
|
:'rect' => :'Rect',
|
107
111
|
:'value' => :'Value',
|
108
112
|
:'page_index' => :'PageIndex',
|
@@ -133,6 +137,7 @@ module AsposePdfCloud
|
|
133
137
|
{
|
134
138
|
:'links' => :'Array<Link>',
|
135
139
|
:'partial_name' => :'String',
|
140
|
+
:'full_name' => :'String',
|
136
141
|
:'rect' => :'Rectangle',
|
137
142
|
:'value' => :'String',
|
138
143
|
:'page_index' => :'Integer',
|
@@ -176,6 +181,10 @@ module AsposePdfCloud
|
|
176
181
|
self.partial_name = attributes[:'PartialName']
|
177
182
|
end
|
178
183
|
|
184
|
+
if attributes.has_key?(:'FullName')
|
185
|
+
self.full_name = attributes[:'FullName']
|
186
|
+
end
|
187
|
+
|
179
188
|
if attributes.has_key?(:'Rect')
|
180
189
|
self.rect = attributes[:'Rect']
|
181
190
|
end
|
@@ -300,6 +309,7 @@ module AsposePdfCloud
|
|
300
309
|
self.class == o.class &&
|
301
310
|
links == o.links &&
|
302
311
|
partial_name == o.partial_name &&
|
312
|
+
full_name == o.full_name &&
|
303
313
|
rect == o.rect &&
|
304
314
|
value == o.value &&
|
305
315
|
page_index == o.page_index &&
|
@@ -333,7 +343,7 @@ module AsposePdfCloud
|
|
333
343
|
# Calculates hash code according to all attributes.
|
334
344
|
# @return [Fixnum] Hash code
|
335
345
|
def hash
|
336
|
-
[links, partial_name, rect, value, page_index, height, width, z_index, is_group, parent, is_shared_field, flags, color, contents, margin, highlighting, horizontal_alignment, vertical_alignment, border, allowed_states, style, active_state, checked, export_value].hash
|
346
|
+
[links, partial_name, full_name, rect, value, page_index, height, width, z_index, is_group, parent, is_shared_field, flags, color, contents, margin, highlighting, horizontal_alignment, vertical_alignment, border, allowed_states, style, active_state, checked, export_value].hash
|
337
347
|
end
|
338
348
|
|
339
349
|
# Builds the object from hash
|
@@ -31,6 +31,9 @@ module AsposePdfCloud
|
|
31
31
|
# Field name.
|
32
32
|
attr_accessor :partial_name
|
33
33
|
|
34
|
+
# Full Field name.
|
35
|
+
attr_accessor :full_name
|
36
|
+
|
34
37
|
# Field rectangle.
|
35
38
|
attr_accessor :rect
|
36
39
|
|
@@ -94,6 +97,7 @@ module AsposePdfCloud
|
|
94
97
|
{
|
95
98
|
:'links' => :'Links',
|
96
99
|
:'partial_name' => :'PartialName',
|
100
|
+
:'full_name' => :'FullName',
|
97
101
|
:'rect' => :'Rect',
|
98
102
|
:'value' => :'Value',
|
99
103
|
:'page_index' => :'PageIndex',
|
@@ -121,6 +125,7 @@ module AsposePdfCloud
|
|
121
125
|
{
|
122
126
|
:'links' => :'Array<Link>',
|
123
127
|
:'partial_name' => :'String',
|
128
|
+
:'full_name' => :'String',
|
124
129
|
:'rect' => :'Rectangle',
|
125
130
|
:'value' => :'String',
|
126
131
|
:'page_index' => :'Integer',
|
@@ -161,6 +166,10 @@ module AsposePdfCloud
|
|
161
166
|
self.partial_name = attributes[:'PartialName']
|
162
167
|
end
|
163
168
|
|
169
|
+
if attributes.has_key?(:'FullName')
|
170
|
+
self.full_name = attributes[:'FullName']
|
171
|
+
end
|
172
|
+
|
164
173
|
if attributes.has_key?(:'Rect')
|
165
174
|
self.rect = attributes[:'Rect']
|
166
175
|
end
|
@@ -266,6 +275,7 @@ module AsposePdfCloud
|
|
266
275
|
self.class == o.class &&
|
267
276
|
links == o.links &&
|
268
277
|
partial_name == o.partial_name &&
|
278
|
+
full_name == o.full_name &&
|
269
279
|
rect == o.rect &&
|
270
280
|
value == o.value &&
|
271
281
|
page_index == o.page_index &&
|
@@ -296,7 +306,7 @@ module AsposePdfCloud
|
|
296
306
|
# Calculates hash code according to all attributes.
|
297
307
|
# @return [Fixnum] Hash code
|
298
308
|
def hash
|
299
|
-
[links, partial_name, rect, value, page_index, height, width, z_index, is_group, parent, is_shared_field, flags, color, contents, margin, highlighting, horizontal_alignment, vertical_alignment, border, multi_select, selected].hash
|
309
|
+
[links, partial_name, full_name, rect, value, page_index, height, width, z_index, is_group, parent, is_shared_field, flags, color, contents, margin, highlighting, horizontal_alignment, vertical_alignment, border, multi_select, selected].hash
|
300
310
|
end
|
301
311
|
|
302
312
|
# Builds the object from hash
|
@@ -31,6 +31,9 @@ module AsposePdfCloud
|
|
31
31
|
# Field name.
|
32
32
|
attr_accessor :partial_name
|
33
33
|
|
34
|
+
# Full Field name.
|
35
|
+
attr_accessor :full_name
|
36
|
+
|
34
37
|
# Field rectangle.
|
35
38
|
attr_accessor :rect
|
36
39
|
|
@@ -106,6 +109,7 @@ module AsposePdfCloud
|
|
106
109
|
{
|
107
110
|
:'links' => :'Links',
|
108
111
|
:'partial_name' => :'PartialName',
|
112
|
+
:'full_name' => :'FullName',
|
109
113
|
:'rect' => :'Rect',
|
110
114
|
:'value' => :'Value',
|
111
115
|
:'page_index' => :'PageIndex',
|
@@ -137,6 +141,7 @@ module AsposePdfCloud
|
|
137
141
|
{
|
138
142
|
:'links' => :'Array<Link>',
|
139
143
|
:'partial_name' => :'String',
|
144
|
+
:'full_name' => :'String',
|
140
145
|
:'rect' => :'Rectangle',
|
141
146
|
:'value' => :'String',
|
142
147
|
:'page_index' => :'Integer',
|
@@ -181,6 +186,10 @@ module AsposePdfCloud
|
|
181
186
|
self.partial_name = attributes[:'PartialName']
|
182
187
|
end
|
183
188
|
|
189
|
+
if attributes.has_key?(:'FullName')
|
190
|
+
self.full_name = attributes[:'FullName']
|
191
|
+
end
|
192
|
+
|
184
193
|
if attributes.has_key?(:'Rect')
|
185
194
|
self.rect = attributes[:'Rect']
|
186
195
|
end
|
@@ -304,6 +313,7 @@ module AsposePdfCloud
|
|
304
313
|
self.class == o.class &&
|
305
314
|
links == o.links &&
|
306
315
|
partial_name == o.partial_name &&
|
316
|
+
full_name == o.full_name &&
|
307
317
|
rect == o.rect &&
|
308
318
|
value == o.value &&
|
309
319
|
page_index == o.page_index &&
|
@@ -338,7 +348,7 @@ module AsposePdfCloud
|
|
338
348
|
# Calculates hash code according to all attributes.
|
339
349
|
# @return [Fixnum] Hash code
|
340
350
|
def hash
|
341
|
-
[links, partial_name, rect, value, page_index, height, width, z_index, is_group, parent, is_shared_field, flags, color, contents, margin, highlighting, horizontal_alignment, vertical_alignment, border, multi_select, selected, options, active_state, editable, spell_check].hash
|
351
|
+
[links, partial_name, full_name, rect, value, page_index, height, width, z_index, is_group, parent, is_shared_field, flags, color, contents, margin, highlighting, horizontal_alignment, vertical_alignment, border, multi_select, selected, options, active_state, editable, spell_check].hash
|
342
352
|
end
|
343
353
|
|
344
354
|
# Builds the object from hash
|
@@ -31,6 +31,9 @@ module AsposePdfCloud
|
|
31
31
|
# Field name.
|
32
32
|
attr_accessor :partial_name
|
33
33
|
|
34
|
+
# Full Field name.
|
35
|
+
attr_accessor :full_name
|
36
|
+
|
34
37
|
# Field rectangle.
|
35
38
|
attr_accessor :rect
|
36
39
|
|
@@ -88,6 +91,7 @@ module AsposePdfCloud
|
|
88
91
|
{
|
89
92
|
:'links' => :'Links',
|
90
93
|
:'partial_name' => :'PartialName',
|
94
|
+
:'full_name' => :'FullName',
|
91
95
|
:'rect' => :'Rect',
|
92
96
|
:'value' => :'Value',
|
93
97
|
:'page_index' => :'PageIndex',
|
@@ -113,6 +117,7 @@ module AsposePdfCloud
|
|
113
117
|
{
|
114
118
|
:'links' => :'Array<Link>',
|
115
119
|
:'partial_name' => :'String',
|
120
|
+
:'full_name' => :'String',
|
116
121
|
:'rect' => :'Rectangle',
|
117
122
|
:'value' => :'String',
|
118
123
|
:'page_index' => :'Integer',
|
@@ -151,6 +156,10 @@ module AsposePdfCloud
|
|
151
156
|
self.partial_name = attributes[:'PartialName']
|
152
157
|
end
|
153
158
|
|
159
|
+
if attributes.has_key?(:'FullName')
|
160
|
+
self.full_name = attributes[:'FullName']
|
161
|
+
end
|
162
|
+
|
154
163
|
if attributes.has_key?(:'Rect')
|
155
164
|
self.rect = attributes[:'Rect']
|
156
165
|
end
|
@@ -248,6 +257,7 @@ module AsposePdfCloud
|
|
248
257
|
self.class == o.class &&
|
249
258
|
links == o.links &&
|
250
259
|
partial_name == o.partial_name &&
|
260
|
+
full_name == o.full_name &&
|
251
261
|
rect == o.rect &&
|
252
262
|
value == o.value &&
|
253
263
|
page_index == o.page_index &&
|
@@ -276,7 +286,7 @@ module AsposePdfCloud
|
|
276
286
|
# Calculates hash code according to all attributes.
|
277
287
|
# @return [Fixnum] Hash code
|
278
288
|
def hash
|
279
|
-
[links, partial_name, rect, value, page_index, height, width, z_index, is_group, parent, is_shared_field, flags, color, contents, margin, highlighting, horizontal_alignment, vertical_alignment, border].hash
|
289
|
+
[links, partial_name, full_name, rect, value, page_index, height, width, z_index, is_group, parent, is_shared_field, flags, color, contents, margin, highlighting, horizontal_alignment, vertical_alignment, border].hash
|
280
290
|
end
|
281
291
|
|
282
292
|
# Builds the object from hash
|
@@ -0,0 +1,45 @@
|
|
1
|
+
=begin
|
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
|
+
=end
|
21
|
+
|
22
|
+
require 'date'
|
23
|
+
require 'time'
|
24
|
+
|
25
|
+
module AsposePdfCloud
|
26
|
+
class ImageCompressionVersion
|
27
|
+
|
28
|
+
STANDARD = "Standard".freeze
|
29
|
+
FAST = "Fast".freeze
|
30
|
+
MIXED = "Mixed".freeze
|
31
|
+
|
32
|
+
# Builds the enum from string
|
33
|
+
# @param [String] The enum value in the form of the string
|
34
|
+
# @return [String] The enum value
|
35
|
+
def build_from_hash(value)
|
36
|
+
# resolve issue with Concstant Name modification (ex: "FooName" to :FOO_NAME)
|
37
|
+
# consantValues = ImageCompressionVersion.constants.select{|c| c.to_s == value}
|
38
|
+
constantValues = ImageCompressionVersion.constants.select{ |const_name| ImageCompressionVersion.const_get(const_name) == value}
|
39
|
+
|
40
|
+
raise "Invalid ENUM value #{value} for class #ImageCompressionVersion" if constantValues.empty?
|
41
|
+
value
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
=begin
|
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
|
+
=end
|
21
|
+
|
22
|
+
require 'date'
|
23
|
+
require 'time'
|
24
|
+
|
25
|
+
module AsposePdfCloud
|
26
|
+
class ImageEncoding
|
27
|
+
|
28
|
+
UNCHANGED = "Unchanged".freeze
|
29
|
+
JPEG = "Jpeg".freeze
|
30
|
+
FLATE = "Flate".freeze
|
31
|
+
JPEG2000 = "Jpeg2000".freeze
|
32
|
+
|
33
|
+
# Builds the enum from string
|
34
|
+
# @param [String] The enum value in the form of the string
|
35
|
+
# @return [String] The enum value
|
36
|
+
def build_from_hash(value)
|
37
|
+
# resolve issue with Concstant Name modification (ex: "FooName" to :FOO_NAME)
|
38
|
+
# consantValues = ImageEncoding.constants.select{|c| c.to_s == value}
|
39
|
+
constantValues = ImageEncoding.constants.select{ |const_name| ImageEncoding.const_get(const_name) == value}
|
40
|
+
|
41
|
+
raise "Invalid ENUM value #{value} for class #ImageEncoding" if constantValues.empty?
|
42
|
+
value
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
@@ -31,6 +31,9 @@ module AsposePdfCloud
|
|
31
31
|
# Field name.
|
32
32
|
attr_accessor :partial_name
|
33
33
|
|
34
|
+
# Full Field name.
|
35
|
+
attr_accessor :full_name
|
36
|
+
|
34
37
|
# Field rectangle.
|
35
38
|
attr_accessor :rect
|
36
39
|
|
@@ -106,6 +109,7 @@ module AsposePdfCloud
|
|
106
109
|
{
|
107
110
|
:'links' => :'Links',
|
108
111
|
:'partial_name' => :'PartialName',
|
112
|
+
:'full_name' => :'FullName',
|
109
113
|
:'rect' => :'Rect',
|
110
114
|
:'value' => :'Value',
|
111
115
|
:'page_index' => :'PageIndex',
|
@@ -137,6 +141,7 @@ module AsposePdfCloud
|
|
137
141
|
{
|
138
142
|
:'links' => :'Array<Link>',
|
139
143
|
:'partial_name' => :'String',
|
144
|
+
:'full_name' => :'String',
|
140
145
|
:'rect' => :'Rectangle',
|
141
146
|
:'value' => :'String',
|
142
147
|
:'page_index' => :'Integer',
|
@@ -181,6 +186,10 @@ module AsposePdfCloud
|
|
181
186
|
self.partial_name = attributes[:'PartialName']
|
182
187
|
end
|
183
188
|
|
189
|
+
if attributes.has_key?(:'FullName')
|
190
|
+
self.full_name = attributes[:'FullName']
|
191
|
+
end
|
192
|
+
|
184
193
|
if attributes.has_key?(:'Rect')
|
185
194
|
self.rect = attributes[:'Rect']
|
186
195
|
end
|
@@ -306,6 +315,7 @@ module AsposePdfCloud
|
|
306
315
|
self.class == o.class &&
|
307
316
|
links == o.links &&
|
308
317
|
partial_name == o.partial_name &&
|
318
|
+
full_name == o.full_name &&
|
309
319
|
rect == o.rect &&
|
310
320
|
value == o.value &&
|
311
321
|
page_index == o.page_index &&
|
@@ -340,7 +350,7 @@ module AsposePdfCloud
|
|
340
350
|
# Calculates hash code according to all attributes.
|
341
351
|
# @return [Fixnum] Hash code
|
342
352
|
def hash
|
343
|
-
[links, partial_name, rect, value, page_index, height, width, z_index, is_group, parent, is_shared_field, flags, color, contents, margin, highlighting, horizontal_alignment, vertical_alignment, border, multi_select, selected, options, active_state, top_index, selected_items].hash
|
353
|
+
[links, partial_name, full_name, rect, value, page_index, height, width, z_index, is_group, parent, is_shared_field, flags, color, contents, margin, highlighting, horizontal_alignment, vertical_alignment, border, multi_select, selected, options, active_state, top_index, selected_items].hash
|
344
354
|
end
|
345
355
|
|
346
356
|
# Builds the object from hash
|
@@ -28,13 +28,13 @@ module AsposePdfCloud
|
|
28
28
|
# If true page contents will be reused when document is optimized for equal pages.
|
29
29
|
attr_accessor :allow_reuse_page_content
|
30
30
|
|
31
|
-
# If this flag is set to true images will be compressed in the document.
|
31
|
+
# If this flag is set to true images will be compressed in the document. Compression level is specified with ImageQuality property.
|
32
32
|
attr_accessor :compress_images
|
33
33
|
|
34
|
-
#
|
34
|
+
# Specifies level of image compression when CompressImages flag is used.
|
35
35
|
attr_accessor :image_quality
|
36
36
|
|
37
|
-
# If this flag is set to true, Resource streams will be analyzed. If duplicate streams are found (i.e. if stream contents is equal), then
|
37
|
+
# If this flag is set to true, Resource streams will be analyzed. If duplicate streams are found (i.e. if stream contents is equal), then thees streams will be stored as one object. This allows to decrease document size in some cases (for example, when same document was concatenated multiple times).
|
38
38
|
attr_accessor :link_duplcate_streams
|
39
39
|
|
40
40
|
# If this flag is set to true, all document objects will be checked and unused objects (i.e. objects which does not have any reference) are removed from document.
|
@@ -46,6 +46,24 @@ module AsposePdfCloud
|
|
46
46
|
# Make fonts not embedded if set to true.
|
47
47
|
attr_accessor :unembed_fonts
|
48
48
|
|
49
|
+
# If this flag set to true and CompressImages is true images will be resized if image resolution is greater then specified MaxResolution parameter.
|
50
|
+
attr_accessor :resize_images
|
51
|
+
|
52
|
+
# Specifies maximum resolution of images. If image has higher resolution it will be scaled.
|
53
|
+
attr_accessor :max_resolution
|
54
|
+
|
55
|
+
# Fonts will be converted into subsets if set to true.
|
56
|
+
attr_accessor :subset_fonts
|
57
|
+
|
58
|
+
# Remove private information (page piece info).
|
59
|
+
attr_accessor :remove_private_info
|
60
|
+
|
61
|
+
# Image encode which will be used.
|
62
|
+
attr_accessor :image_encoding
|
63
|
+
|
64
|
+
# Version of compression algorithm. Possible values are: \"Standard\" - standard compression, \"Fast\" - fast (improved compression which is faster then standard but may be applicable not for all images), \"Mixed\" - mixed (standard compression is applied to images which can not be compressed by faster algorithm, this may give best compression but more slow then \"Fast\" algorithm. Version \"Fast\" is not applicable for resizing images (standard method will be used). Default is \"Standard\".
|
65
|
+
attr_accessor :image_compression_version
|
66
|
+
|
49
67
|
|
50
68
|
# Attribute mapping from ruby-style variable name to JSON key.
|
51
69
|
def self.attribute_map
|
@@ -56,7 +74,13 @@ module AsposePdfCloud
|
|
56
74
|
:'link_duplcate_streams' => :'LinkDuplcateStreams',
|
57
75
|
:'remove_unused_objects' => :'RemoveUnusedObjects',
|
58
76
|
:'remove_unused_streams' => :'RemoveUnusedStreams',
|
59
|
-
:'unembed_fonts' => :'UnembedFonts'
|
77
|
+
:'unembed_fonts' => :'UnembedFonts',
|
78
|
+
:'resize_images' => :'ResizeImages',
|
79
|
+
:'max_resolution' => :'MaxResolution',
|
80
|
+
:'subset_fonts' => :'SubsetFonts',
|
81
|
+
:'remove_private_info' => :'RemovePrivateInfo',
|
82
|
+
:'image_encoding' => :'ImageEncoding',
|
83
|
+
:'image_compression_version' => :'ImageCompressionVersion'
|
60
84
|
}
|
61
85
|
end
|
62
86
|
|
@@ -69,7 +93,13 @@ module AsposePdfCloud
|
|
69
93
|
:'link_duplcate_streams' => :'BOOLEAN',
|
70
94
|
:'remove_unused_objects' => :'BOOLEAN',
|
71
95
|
:'remove_unused_streams' => :'BOOLEAN',
|
72
|
-
:'unembed_fonts' => :'BOOLEAN'
|
96
|
+
:'unembed_fonts' => :'BOOLEAN',
|
97
|
+
:'resize_images' => :'BOOLEAN',
|
98
|
+
:'max_resolution' => :'Integer',
|
99
|
+
:'subset_fonts' => :'BOOLEAN',
|
100
|
+
:'remove_private_info' => :'BOOLEAN',
|
101
|
+
:'image_encoding' => :'ImageEncoding',
|
102
|
+
:'image_compression_version' => :'ImageCompressionVersion'
|
73
103
|
}
|
74
104
|
end
|
75
105
|
|
@@ -109,53 +139,42 @@ module AsposePdfCloud
|
|
109
139
|
self.unembed_fonts = attributes[:'UnembedFonts']
|
110
140
|
end
|
111
141
|
|
112
|
-
|
113
|
-
|
114
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
115
|
-
# @return Array for valid properies with the reasons
|
116
|
-
def list_invalid_properties
|
117
|
-
invalid_properties = Array.new
|
118
|
-
if @allow_reuse_page_content.nil?
|
119
|
-
invalid_properties.push("invalid value for 'allow_reuse_page_content', allow_reuse_page_content cannot be nil.")
|
142
|
+
if attributes.has_key?(:'ResizeImages')
|
143
|
+
self.resize_images = attributes[:'ResizeImages']
|
120
144
|
end
|
121
145
|
|
122
|
-
if
|
123
|
-
|
146
|
+
if attributes.has_key?(:'MaxResolution')
|
147
|
+
self.max_resolution = attributes[:'MaxResolution']
|
124
148
|
end
|
125
149
|
|
126
|
-
if
|
127
|
-
|
150
|
+
if attributes.has_key?(:'SubsetFonts')
|
151
|
+
self.subset_fonts = attributes[:'SubsetFonts']
|
128
152
|
end
|
129
153
|
|
130
|
-
if
|
131
|
-
|
154
|
+
if attributes.has_key?(:'RemovePrivateInfo')
|
155
|
+
self.remove_private_info = attributes[:'RemovePrivateInfo']
|
132
156
|
end
|
133
157
|
|
134
|
-
if
|
135
|
-
|
158
|
+
if attributes.has_key?(:'ImageEncoding')
|
159
|
+
self.image_encoding = attributes[:'ImageEncoding']
|
136
160
|
end
|
137
161
|
|
138
|
-
if
|
139
|
-
|
162
|
+
if attributes.has_key?(:'ImageCompressionVersion')
|
163
|
+
self.image_compression_version = attributes[:'ImageCompressionVersion']
|
140
164
|
end
|
141
165
|
|
142
|
-
|
143
|
-
invalid_properties.push("invalid value for 'unembed_fonts', unembed_fonts cannot be nil.")
|
144
|
-
end
|
166
|
+
end
|
145
167
|
|
168
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
169
|
+
# @return Array for valid properies with the reasons
|
170
|
+
def list_invalid_properties
|
171
|
+
invalid_properties = Array.new
|
146
172
|
return invalid_properties
|
147
173
|
end
|
148
174
|
|
149
175
|
# Check to see if the all the properties in the model are valid
|
150
176
|
# @return true if the model is valid
|
151
177
|
def valid?
|
152
|
-
return false if @allow_reuse_page_content.nil?
|
153
|
-
return false if @compress_images.nil?
|
154
|
-
return false if @image_quality.nil?
|
155
|
-
return false if @link_duplcate_streams.nil?
|
156
|
-
return false if @remove_unused_objects.nil?
|
157
|
-
return false if @remove_unused_streams.nil?
|
158
|
-
return false if @unembed_fonts.nil?
|
159
178
|
return true
|
160
179
|
end
|
161
180
|
|
@@ -170,7 +189,13 @@ module AsposePdfCloud
|
|
170
189
|
link_duplcate_streams == o.link_duplcate_streams &&
|
171
190
|
remove_unused_objects == o.remove_unused_objects &&
|
172
191
|
remove_unused_streams == o.remove_unused_streams &&
|
173
|
-
unembed_fonts == o.unembed_fonts
|
192
|
+
unembed_fonts == o.unembed_fonts &&
|
193
|
+
resize_images == o.resize_images &&
|
194
|
+
max_resolution == o.max_resolution &&
|
195
|
+
subset_fonts == o.subset_fonts &&
|
196
|
+
remove_private_info == o.remove_private_info &&
|
197
|
+
image_encoding == o.image_encoding &&
|
198
|
+
image_compression_version == o.image_compression_version
|
174
199
|
end
|
175
200
|
|
176
201
|
# @see the `==` method
|
@@ -182,7 +207,7 @@ module AsposePdfCloud
|
|
182
207
|
# Calculates hash code according to all attributes.
|
183
208
|
# @return [Fixnum] Hash code
|
184
209
|
def hash
|
185
|
-
[allow_reuse_page_content, compress_images, image_quality, link_duplcate_streams, remove_unused_objects, remove_unused_streams, unembed_fonts].hash
|
210
|
+
[allow_reuse_page_content, compress_images, image_quality, link_duplcate_streams, remove_unused_objects, remove_unused_streams, unembed_fonts, resize_images, max_resolution, subset_fonts, remove_private_info, image_encoding, image_compression_version].hash
|
186
211
|
end
|
187
212
|
|
188
213
|
# Builds the object from hash
|