aspose_pdf_cloud 19.3.0 → 19.4.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 +35 -5
- data/docs/BorderCornerStyle.md +11 -0
- data/docs/BorderInfo.md +13 -0
- data/docs/Cell.md +21 -0
- data/docs/ColumnAdjustment.md +12 -0
- data/docs/CryptoAlgorithm.md +14 -0
- data/docs/GraphInfo.md +19 -0
- data/docs/ImageFooter.md +23 -0
- data/docs/ImageHeader.md +23 -0
- data/docs/ImageStamp.md +5 -5
- data/docs/MarginInfo.md +5 -5
- data/docs/PageNumberStamp.md +24 -0
- data/docs/PdfApi.md +451 -27
- data/docs/PdfPageStamp.md +5 -5
- data/docs/PermissionsFlags.md +17 -0
- data/docs/Row.md +19 -0
- data/docs/StampBase.md +0 -5
- data/docs/Table.md +31 -0
- data/docs/TableBroken.md +12 -0
- data/docs/TextFooter.md +23 -0
- data/docs/TextHeader.md +23 -0
- data/docs/TextStamp.md +5 -5
- data/lib/aspose_pdf_cloud.rb +15 -0
- data/lib/aspose_pdf_cloud/api/pdf_api.rb +1530 -215
- data/lib/aspose_pdf_cloud/models/border_corner_style.rb +44 -0
- data/lib/aspose_pdf_cloud/models/border_info.rb +241 -0
- data/lib/aspose_pdf_cloud/models/cell.rb +323 -0
- data/lib/aspose_pdf_cloud/models/column_adjustment.rb +45 -0
- data/lib/aspose_pdf_cloud/models/crypto_algorithm.rb +46 -0
- data/lib/aspose_pdf_cloud/models/graph_info.rb +303 -0
- data/lib/aspose_pdf_cloud/models/image_footer.rb +343 -0
- data/lib/aspose_pdf_cloud/models/image_header.rb +343 -0
- data/lib/aspose_pdf_cloud/models/image_stamp.rb +54 -54
- data/lib/aspose_pdf_cloud/models/margin_info.rb +5 -21
- data/lib/aspose_pdf_cloud/models/page_number_stamp.rb +353 -0
- data/lib/aspose_pdf_cloud/models/pdf_page_stamp.rb +54 -54
- data/lib/aspose_pdf_cloud/models/permissions_flags.rb +50 -0
- data/lib/aspose_pdf_cloud/models/row.rb +308 -0
- data/lib/aspose_pdf_cloud/models/stamp_base.rb +1 -51
- data/lib/aspose_pdf_cloud/models/table.rb +425 -0
- data/lib/aspose_pdf_cloud/models/table_broken.rb +45 -0
- data/lib/aspose_pdf_cloud/models/text_footer.rb +343 -0
- data/lib/aspose_pdf_cloud/models/text_header.rb +343 -0
- data/lib/aspose_pdf_cloud/models/text_stamp.rb +54 -54
- data/lib/aspose_pdf_cloud/version.rb +1 -1
- data/test/pdf_tests.rb +407 -5
- data/test_data/4pagesEncrypted.pdf +0 -0
- metadata +33 -2
@@ -23,14 +23,18 @@ require 'date'
|
|
23
23
|
require 'time'
|
24
24
|
|
25
25
|
module AsposePdfCloud
|
26
|
-
|
26
|
+
# This class represents a margin for different objects.
|
27
27
|
class MarginInfo
|
28
|
+
# Gets or sets a float value that indicates the left margin.
|
28
29
|
attr_accessor :left
|
29
30
|
|
31
|
+
# Gets or sets a float value that indicates the right margin.
|
30
32
|
attr_accessor :right
|
31
33
|
|
34
|
+
# Gets or sets a float value that indicates the top margin.
|
32
35
|
attr_accessor :top
|
33
36
|
|
37
|
+
# Gets or sets a float value that indicates the bottom margin.
|
34
38
|
attr_accessor :bottom
|
35
39
|
|
36
40
|
|
@@ -84,32 +88,12 @@ module AsposePdfCloud
|
|
84
88
|
# @return Array for valid properies with the reasons
|
85
89
|
def list_invalid_properties
|
86
90
|
invalid_properties = Array.new
|
87
|
-
if @left.nil?
|
88
|
-
invalid_properties.push("invalid value for 'left', left cannot be nil.")
|
89
|
-
end
|
90
|
-
|
91
|
-
if @right.nil?
|
92
|
-
invalid_properties.push("invalid value for 'right', right cannot be nil.")
|
93
|
-
end
|
94
|
-
|
95
|
-
if @top.nil?
|
96
|
-
invalid_properties.push("invalid value for 'top', top cannot be nil.")
|
97
|
-
end
|
98
|
-
|
99
|
-
if @bottom.nil?
|
100
|
-
invalid_properties.push("invalid value for 'bottom', bottom cannot be nil.")
|
101
|
-
end
|
102
|
-
|
103
91
|
return invalid_properties
|
104
92
|
end
|
105
93
|
|
106
94
|
# Check to see if the all the properties in the model are valid
|
107
95
|
# @return true if the model is valid
|
108
96
|
def valid?
|
109
|
-
return false if @left.nil?
|
110
|
-
return false if @right.nil?
|
111
|
-
return false if @top.nil?
|
112
|
-
return false if @bottom.nil?
|
113
97
|
return true
|
114
98
|
end
|
115
99
|
|
@@ -0,0 +1,353 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
Copyright (c) 2019 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
|
+
# Represents Pdf stamps.
|
27
|
+
class PageNumberStamp
|
28
|
+
# Link to the document.
|
29
|
+
attr_accessor :links
|
30
|
+
|
31
|
+
# Sets or gets a bool value that indicates the content is stamped as background. If the value is true, the stamp content is layed at the bottom. By defalt, the value is false, the stamp content is layed at the top.
|
32
|
+
attr_accessor :background
|
33
|
+
|
34
|
+
# Gets or sets Horizontal alignment of stamp on the page.
|
35
|
+
attr_accessor :horizontal_alignment
|
36
|
+
|
37
|
+
# Gets or sets a value to indicate the stamp opacity. The value is from 0.0 to 1.0. By default the value is 1.0.
|
38
|
+
attr_accessor :opacity
|
39
|
+
|
40
|
+
# Sets or gets the rotation of stamp content according values. Note. This property is for set angles which are multiples of 90 degrees (0, 90, 180, 270 degrees). To set arbitrary angle use RotateAngle property. If angle set by ArbitraryAngle is not multiple of 90 then Rotate property returns Rotation.None.
|
41
|
+
attr_accessor :rotate
|
42
|
+
|
43
|
+
# Gets or sets rotate angle of stamp in degrees. This property allows to set arbitrary rotate angle.
|
44
|
+
attr_accessor :rotate_angle
|
45
|
+
|
46
|
+
# Horizontal stamp coordinate, starting from the left.
|
47
|
+
attr_accessor :x_indent
|
48
|
+
|
49
|
+
# Vertical stamp coordinate, starting from the bottom.
|
50
|
+
attr_accessor :y_indent
|
51
|
+
|
52
|
+
# Zooming factor of the stamp. Allows to scale stamp.
|
53
|
+
attr_accessor :zoom
|
54
|
+
|
55
|
+
# Gets or sets string value which is used as stamp on the page.
|
56
|
+
attr_accessor :value
|
57
|
+
|
58
|
+
# Gets or sets value of the number of starting page. Other pages will be numbered starting from this value.
|
59
|
+
attr_accessor :starting_number
|
60
|
+
|
61
|
+
# Gets or sets vertical alignment of stamp on page.
|
62
|
+
attr_accessor :vertical_alignment
|
63
|
+
|
64
|
+
# Gets or sets bottom margin of stamp.
|
65
|
+
attr_accessor :bottom_margin
|
66
|
+
|
67
|
+
# Gets or sets left margin of stamp.
|
68
|
+
attr_accessor :left_margin
|
69
|
+
|
70
|
+
# Gets or sets top margin of stamp.
|
71
|
+
attr_accessor :top_margin
|
72
|
+
|
73
|
+
# Gets or sets right margin of stamp.
|
74
|
+
attr_accessor :right_margin
|
75
|
+
|
76
|
+
|
77
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
78
|
+
def self.attribute_map
|
79
|
+
{
|
80
|
+
:'links' => :'Links',
|
81
|
+
:'background' => :'Background',
|
82
|
+
:'horizontal_alignment' => :'HorizontalAlignment',
|
83
|
+
:'opacity' => :'Opacity',
|
84
|
+
:'rotate' => :'Rotate',
|
85
|
+
:'rotate_angle' => :'RotateAngle',
|
86
|
+
:'x_indent' => :'XIndent',
|
87
|
+
:'y_indent' => :'YIndent',
|
88
|
+
:'zoom' => :'Zoom',
|
89
|
+
:'value' => :'Value',
|
90
|
+
:'starting_number' => :'StartingNumber',
|
91
|
+
:'vertical_alignment' => :'VerticalAlignment',
|
92
|
+
:'bottom_margin' => :'BottomMargin',
|
93
|
+
:'left_margin' => :'LeftMargin',
|
94
|
+
:'top_margin' => :'TopMargin',
|
95
|
+
:'right_margin' => :'RightMargin'
|
96
|
+
}
|
97
|
+
end
|
98
|
+
|
99
|
+
# Attribute type mapping.
|
100
|
+
def self.swagger_types
|
101
|
+
{
|
102
|
+
:'links' => :'Array<Link>',
|
103
|
+
:'background' => :'BOOLEAN',
|
104
|
+
:'horizontal_alignment' => :'HorizontalAlignment',
|
105
|
+
:'opacity' => :'Float',
|
106
|
+
:'rotate' => :'Rotation',
|
107
|
+
:'rotate_angle' => :'Float',
|
108
|
+
:'x_indent' => :'Float',
|
109
|
+
:'y_indent' => :'Float',
|
110
|
+
:'zoom' => :'Float',
|
111
|
+
:'value' => :'String',
|
112
|
+
:'starting_number' => :'Integer',
|
113
|
+
:'vertical_alignment' => :'VerticalAlignment',
|
114
|
+
:'bottom_margin' => :'Float',
|
115
|
+
:'left_margin' => :'Float',
|
116
|
+
:'top_margin' => :'Float',
|
117
|
+
:'right_margin' => :'Float'
|
118
|
+
}
|
119
|
+
end
|
120
|
+
|
121
|
+
# Initializes the object
|
122
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
123
|
+
def initialize(attributes = {})
|
124
|
+
return unless attributes.is_a?(Hash)
|
125
|
+
|
126
|
+
# convert string to symbol for hash key
|
127
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
128
|
+
|
129
|
+
if attributes.has_key?(:'Links')
|
130
|
+
if (value = attributes[:'Links']).is_a?(Array)
|
131
|
+
self.links = value
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
if attributes.has_key?(:'Background')
|
136
|
+
self.background = attributes[:'Background']
|
137
|
+
end
|
138
|
+
|
139
|
+
if attributes.has_key?(:'HorizontalAlignment')
|
140
|
+
self.horizontal_alignment = attributes[:'HorizontalAlignment']
|
141
|
+
end
|
142
|
+
|
143
|
+
if attributes.has_key?(:'Opacity')
|
144
|
+
self.opacity = attributes[:'Opacity']
|
145
|
+
end
|
146
|
+
|
147
|
+
if attributes.has_key?(:'Rotate')
|
148
|
+
self.rotate = attributes[:'Rotate']
|
149
|
+
end
|
150
|
+
|
151
|
+
if attributes.has_key?(:'RotateAngle')
|
152
|
+
self.rotate_angle = attributes[:'RotateAngle']
|
153
|
+
end
|
154
|
+
|
155
|
+
if attributes.has_key?(:'XIndent')
|
156
|
+
self.x_indent = attributes[:'XIndent']
|
157
|
+
end
|
158
|
+
|
159
|
+
if attributes.has_key?(:'YIndent')
|
160
|
+
self.y_indent = attributes[:'YIndent']
|
161
|
+
end
|
162
|
+
|
163
|
+
if attributes.has_key?(:'Zoom')
|
164
|
+
self.zoom = attributes[:'Zoom']
|
165
|
+
end
|
166
|
+
|
167
|
+
if attributes.has_key?(:'Value')
|
168
|
+
self.value = attributes[:'Value']
|
169
|
+
end
|
170
|
+
|
171
|
+
if attributes.has_key?(:'StartingNumber')
|
172
|
+
self.starting_number = attributes[:'StartingNumber']
|
173
|
+
end
|
174
|
+
|
175
|
+
if attributes.has_key?(:'VerticalAlignment')
|
176
|
+
self.vertical_alignment = attributes[:'VerticalAlignment']
|
177
|
+
end
|
178
|
+
|
179
|
+
if attributes.has_key?(:'BottomMargin')
|
180
|
+
self.bottom_margin = attributes[:'BottomMargin']
|
181
|
+
end
|
182
|
+
|
183
|
+
if attributes.has_key?(:'LeftMargin')
|
184
|
+
self.left_margin = attributes[:'LeftMargin']
|
185
|
+
end
|
186
|
+
|
187
|
+
if attributes.has_key?(:'TopMargin')
|
188
|
+
self.top_margin = attributes[:'TopMargin']
|
189
|
+
end
|
190
|
+
|
191
|
+
if attributes.has_key?(:'RightMargin')
|
192
|
+
self.right_margin = attributes[:'RightMargin']
|
193
|
+
end
|
194
|
+
|
195
|
+
end
|
196
|
+
|
197
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
198
|
+
# @return Array for valid properies with the reasons
|
199
|
+
def list_invalid_properties
|
200
|
+
invalid_properties = Array.new
|
201
|
+
return invalid_properties
|
202
|
+
end
|
203
|
+
|
204
|
+
# Check to see if the all the properties in the model are valid
|
205
|
+
# @return true if the model is valid
|
206
|
+
def valid?
|
207
|
+
return true
|
208
|
+
end
|
209
|
+
|
210
|
+
# Checks equality by comparing each attribute.
|
211
|
+
# @param [Object] Object to be compared
|
212
|
+
def ==(o)
|
213
|
+
return true if self.equal?(o)
|
214
|
+
self.class == o.class &&
|
215
|
+
links == o.links &&
|
216
|
+
background == o.background &&
|
217
|
+
horizontal_alignment == o.horizontal_alignment &&
|
218
|
+
opacity == o.opacity &&
|
219
|
+
rotate == o.rotate &&
|
220
|
+
rotate_angle == o.rotate_angle &&
|
221
|
+
x_indent == o.x_indent &&
|
222
|
+
y_indent == o.y_indent &&
|
223
|
+
zoom == o.zoom &&
|
224
|
+
value == o.value &&
|
225
|
+
starting_number == o.starting_number &&
|
226
|
+
vertical_alignment == o.vertical_alignment &&
|
227
|
+
bottom_margin == o.bottom_margin &&
|
228
|
+
left_margin == o.left_margin &&
|
229
|
+
top_margin == o.top_margin &&
|
230
|
+
right_margin == o.right_margin
|
231
|
+
end
|
232
|
+
|
233
|
+
# @see the `==` method
|
234
|
+
# @param [Object] Object to be compared
|
235
|
+
def eql?(o)
|
236
|
+
self == o
|
237
|
+
end
|
238
|
+
|
239
|
+
# Calculates hash code according to all attributes.
|
240
|
+
# @return [Fixnum] Hash code
|
241
|
+
def hash
|
242
|
+
[links, background, horizontal_alignment, opacity, rotate, rotate_angle, x_indent, y_indent, zoom, value, starting_number, vertical_alignment, bottom_margin, left_margin, top_margin, right_margin].hash
|
243
|
+
end
|
244
|
+
|
245
|
+
# Builds the object from hash
|
246
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
247
|
+
# @return [Object] Returns the model itself
|
248
|
+
def build_from_hash(attributes)
|
249
|
+
return nil unless attributes.is_a?(Hash)
|
250
|
+
self.class.swagger_types.each_pair do |key, type|
|
251
|
+
if type =~ /\AArray<(.*)>/i
|
252
|
+
# check to ensure the input is an array given that the the attribute
|
253
|
+
# is documented as an array but the input is not
|
254
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
255
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
256
|
+
end
|
257
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
258
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
259
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
260
|
+
end
|
261
|
+
|
262
|
+
self
|
263
|
+
end
|
264
|
+
|
265
|
+
# Deserializes the data based on type
|
266
|
+
# @param string type Data type
|
267
|
+
# @param string value Value to be deserialized
|
268
|
+
# @return [Object] Deserialized data
|
269
|
+
def _deserialize(type, value)
|
270
|
+
case type.to_sym
|
271
|
+
when :DateTime
|
272
|
+
format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
|
273
|
+
Time.strptime(value, format).utc.to_datetime
|
274
|
+
when :Date
|
275
|
+
format = (value.include? '+') ? '/Date(%Q%z)/' : '/Date(%Q)/'
|
276
|
+
Time.strptime(value, format).utc.to_datetime.to_date
|
277
|
+
when :String
|
278
|
+
value.to_s
|
279
|
+
when :Integer
|
280
|
+
value.to_i
|
281
|
+
when :Float
|
282
|
+
value.to_f
|
283
|
+
when :BOOLEAN
|
284
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
285
|
+
true
|
286
|
+
else
|
287
|
+
false
|
288
|
+
end
|
289
|
+
when :Object
|
290
|
+
# generic object (usually a Hash), return directly
|
291
|
+
value
|
292
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
293
|
+
inner_type = Regexp.last_match[:inner_type]
|
294
|
+
value.map { |v| _deserialize(inner_type, v) }
|
295
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
296
|
+
k_type = Regexp.last_match[:k_type]
|
297
|
+
v_type = Regexp.last_match[:v_type]
|
298
|
+
{}.tap do |hash|
|
299
|
+
value.each do |k, v|
|
300
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
301
|
+
end
|
302
|
+
end
|
303
|
+
else # model
|
304
|
+
temp_model = AsposePdfCloud.const_get(type).new
|
305
|
+
temp_model.build_from_hash(value)
|
306
|
+
end
|
307
|
+
end
|
308
|
+
|
309
|
+
# Returns the string representation of the object
|
310
|
+
# @return [String] String presentation of the object
|
311
|
+
def to_s
|
312
|
+
to_hash.to_s
|
313
|
+
end
|
314
|
+
|
315
|
+
# to_body is an alias to to_hash (backward compatibility)
|
316
|
+
# @return [Hash] Returns the object in the form of hash
|
317
|
+
def to_body
|
318
|
+
to_hash
|
319
|
+
end
|
320
|
+
|
321
|
+
# Returns the object in the form of hash
|
322
|
+
# @return [Hash] Returns the object in the form of hash
|
323
|
+
def to_hash
|
324
|
+
hash = {}
|
325
|
+
self.class.attribute_map.each_pair do |attr, param|
|
326
|
+
value = self.send(attr)
|
327
|
+
next if value.nil?
|
328
|
+
hash[param] = _to_hash(value)
|
329
|
+
end
|
330
|
+
hash
|
331
|
+
end
|
332
|
+
|
333
|
+
# Outputs non-array value in the form of hash
|
334
|
+
# For object, use to_hash. Otherwise, just return the value
|
335
|
+
# @param [Object] value Any valid value
|
336
|
+
# @return [Hash] Returns the value in the form of hash
|
337
|
+
def _to_hash(value)
|
338
|
+
if value.is_a?(Array)
|
339
|
+
value.compact.map{ |v| _to_hash(v) }
|
340
|
+
elsif value.is_a?(Hash)
|
341
|
+
{}.tap do |hash|
|
342
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
343
|
+
end
|
344
|
+
elsif value.respond_to? :to_hash
|
345
|
+
value.to_hash
|
346
|
+
else
|
347
|
+
value
|
348
|
+
end
|
349
|
+
end
|
350
|
+
|
351
|
+
end
|
352
|
+
|
353
|
+
end
|
@@ -31,33 +31,18 @@ module AsposePdfCloud
|
|
31
31
|
# Sets or gets a bool value that indicates the content is stamped as background. If the value is true, the stamp content is layed at the bottom. By defalt, the value is false, the stamp content is layed at the top.
|
32
32
|
attr_accessor :background
|
33
33
|
|
34
|
-
# Gets or sets bottom margin of stamp.
|
35
|
-
attr_accessor :bottom_margin
|
36
|
-
|
37
34
|
# Gets or sets Horizontal alignment of stamp on the page.
|
38
35
|
attr_accessor :horizontal_alignment
|
39
36
|
|
40
|
-
# Gets or sets left margin of stamp.
|
41
|
-
attr_accessor :left_margin
|
42
|
-
|
43
37
|
# Gets or sets a value to indicate the stamp opacity. The value is from 0.0 to 1.0. By default the value is 1.0.
|
44
38
|
attr_accessor :opacity
|
45
39
|
|
46
|
-
# Gets or sets right margin of stamp.
|
47
|
-
attr_accessor :right_margin
|
48
|
-
|
49
40
|
# Sets or gets the rotation of stamp content according values. Note. This property is for set angles which are multiples of 90 degrees (0, 90, 180, 270 degrees). To set arbitrary angle use RotateAngle property. If angle set by ArbitraryAngle is not multiple of 90 then Rotate property returns Rotation.None.
|
50
41
|
attr_accessor :rotate
|
51
42
|
|
52
43
|
# Gets or sets rotate angle of stamp in degrees. This property allows to set arbitrary rotate angle.
|
53
44
|
attr_accessor :rotate_angle
|
54
45
|
|
55
|
-
# Gets or sets top margin of stamp.
|
56
|
-
attr_accessor :top_margin
|
57
|
-
|
58
|
-
# Gets or sets vertical alignment of stamp on page.
|
59
|
-
attr_accessor :vertical_alignment
|
60
|
-
|
61
46
|
# Horizontal stamp coordinate, starting from the left.
|
62
47
|
attr_accessor :x_indent
|
63
48
|
|
@@ -73,26 +58,41 @@ module AsposePdfCloud
|
|
73
58
|
# Gets or sets the index of the page.
|
74
59
|
attr_accessor :page_index
|
75
60
|
|
61
|
+
# Gets or sets vertical alignment of stamp on page.
|
62
|
+
attr_accessor :vertical_alignment
|
63
|
+
|
64
|
+
# Gets or sets bottom margin of stamp.
|
65
|
+
attr_accessor :bottom_margin
|
66
|
+
|
67
|
+
# Gets or sets left margin of stamp.
|
68
|
+
attr_accessor :left_margin
|
69
|
+
|
70
|
+
# Gets or sets top margin of stamp.
|
71
|
+
attr_accessor :top_margin
|
72
|
+
|
73
|
+
# Gets or sets right margin of stamp.
|
74
|
+
attr_accessor :right_margin
|
75
|
+
|
76
76
|
|
77
77
|
# Attribute mapping from ruby-style variable name to JSON key.
|
78
78
|
def self.attribute_map
|
79
79
|
{
|
80
80
|
:'links' => :'Links',
|
81
81
|
:'background' => :'Background',
|
82
|
-
:'bottom_margin' => :'BottomMargin',
|
83
82
|
:'horizontal_alignment' => :'HorizontalAlignment',
|
84
|
-
:'left_margin' => :'LeftMargin',
|
85
83
|
:'opacity' => :'Opacity',
|
86
|
-
:'right_margin' => :'RightMargin',
|
87
84
|
:'rotate' => :'Rotate',
|
88
85
|
:'rotate_angle' => :'RotateAngle',
|
89
|
-
:'top_margin' => :'TopMargin',
|
90
|
-
:'vertical_alignment' => :'VerticalAlignment',
|
91
86
|
:'x_indent' => :'XIndent',
|
92
87
|
:'y_indent' => :'YIndent',
|
93
88
|
:'zoom' => :'Zoom',
|
94
89
|
:'file_name' => :'FileName',
|
95
|
-
:'page_index' => :'PageIndex'
|
90
|
+
:'page_index' => :'PageIndex',
|
91
|
+
:'vertical_alignment' => :'VerticalAlignment',
|
92
|
+
:'bottom_margin' => :'BottomMargin',
|
93
|
+
:'left_margin' => :'LeftMargin',
|
94
|
+
:'top_margin' => :'TopMargin',
|
95
|
+
:'right_margin' => :'RightMargin'
|
96
96
|
}
|
97
97
|
end
|
98
98
|
|
@@ -101,20 +101,20 @@ module AsposePdfCloud
|
|
101
101
|
{
|
102
102
|
:'links' => :'Array<Link>',
|
103
103
|
:'background' => :'BOOLEAN',
|
104
|
-
:'bottom_margin' => :'Float',
|
105
104
|
:'horizontal_alignment' => :'HorizontalAlignment',
|
106
|
-
:'left_margin' => :'Float',
|
107
105
|
:'opacity' => :'Float',
|
108
|
-
:'right_margin' => :'Float',
|
109
106
|
:'rotate' => :'Rotation',
|
110
107
|
:'rotate_angle' => :'Float',
|
111
|
-
:'top_margin' => :'Float',
|
112
|
-
:'vertical_alignment' => :'VerticalAlignment',
|
113
108
|
:'x_indent' => :'Float',
|
114
109
|
:'y_indent' => :'Float',
|
115
110
|
:'zoom' => :'Float',
|
116
111
|
:'file_name' => :'String',
|
117
|
-
:'page_index' => :'Integer'
|
112
|
+
:'page_index' => :'Integer',
|
113
|
+
:'vertical_alignment' => :'VerticalAlignment',
|
114
|
+
:'bottom_margin' => :'Float',
|
115
|
+
:'left_margin' => :'Float',
|
116
|
+
:'top_margin' => :'Float',
|
117
|
+
:'right_margin' => :'Float'
|
118
118
|
}
|
119
119
|
end
|
120
120
|
|
@@ -136,26 +136,14 @@ module AsposePdfCloud
|
|
136
136
|
self.background = attributes[:'Background']
|
137
137
|
end
|
138
138
|
|
139
|
-
if attributes.has_key?(:'BottomMargin')
|
140
|
-
self.bottom_margin = attributes[:'BottomMargin']
|
141
|
-
end
|
142
|
-
|
143
139
|
if attributes.has_key?(:'HorizontalAlignment')
|
144
140
|
self.horizontal_alignment = attributes[:'HorizontalAlignment']
|
145
141
|
end
|
146
142
|
|
147
|
-
if attributes.has_key?(:'LeftMargin')
|
148
|
-
self.left_margin = attributes[:'LeftMargin']
|
149
|
-
end
|
150
|
-
|
151
143
|
if attributes.has_key?(:'Opacity')
|
152
144
|
self.opacity = attributes[:'Opacity']
|
153
145
|
end
|
154
146
|
|
155
|
-
if attributes.has_key?(:'RightMargin')
|
156
|
-
self.right_margin = attributes[:'RightMargin']
|
157
|
-
end
|
158
|
-
|
159
147
|
if attributes.has_key?(:'Rotate')
|
160
148
|
self.rotate = attributes[:'Rotate']
|
161
149
|
end
|
@@ -164,14 +152,6 @@ module AsposePdfCloud
|
|
164
152
|
self.rotate_angle = attributes[:'RotateAngle']
|
165
153
|
end
|
166
154
|
|
167
|
-
if attributes.has_key?(:'TopMargin')
|
168
|
-
self.top_margin = attributes[:'TopMargin']
|
169
|
-
end
|
170
|
-
|
171
|
-
if attributes.has_key?(:'VerticalAlignment')
|
172
|
-
self.vertical_alignment = attributes[:'VerticalAlignment']
|
173
|
-
end
|
174
|
-
|
175
155
|
if attributes.has_key?(:'XIndent')
|
176
156
|
self.x_indent = attributes[:'XIndent']
|
177
157
|
end
|
@@ -192,6 +172,26 @@ module AsposePdfCloud
|
|
192
172
|
self.page_index = attributes[:'PageIndex']
|
193
173
|
end
|
194
174
|
|
175
|
+
if attributes.has_key?(:'VerticalAlignment')
|
176
|
+
self.vertical_alignment = attributes[:'VerticalAlignment']
|
177
|
+
end
|
178
|
+
|
179
|
+
if attributes.has_key?(:'BottomMargin')
|
180
|
+
self.bottom_margin = attributes[:'BottomMargin']
|
181
|
+
end
|
182
|
+
|
183
|
+
if attributes.has_key?(:'LeftMargin')
|
184
|
+
self.left_margin = attributes[:'LeftMargin']
|
185
|
+
end
|
186
|
+
|
187
|
+
if attributes.has_key?(:'TopMargin')
|
188
|
+
self.top_margin = attributes[:'TopMargin']
|
189
|
+
end
|
190
|
+
|
191
|
+
if attributes.has_key?(:'RightMargin')
|
192
|
+
self.right_margin = attributes[:'RightMargin']
|
193
|
+
end
|
194
|
+
|
195
195
|
end
|
196
196
|
|
197
197
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -214,20 +214,20 @@ module AsposePdfCloud
|
|
214
214
|
self.class == o.class &&
|
215
215
|
links == o.links &&
|
216
216
|
background == o.background &&
|
217
|
-
bottom_margin == o.bottom_margin &&
|
218
217
|
horizontal_alignment == o.horizontal_alignment &&
|
219
|
-
left_margin == o.left_margin &&
|
220
218
|
opacity == o.opacity &&
|
221
|
-
right_margin == o.right_margin &&
|
222
219
|
rotate == o.rotate &&
|
223
220
|
rotate_angle == o.rotate_angle &&
|
224
|
-
top_margin == o.top_margin &&
|
225
|
-
vertical_alignment == o.vertical_alignment &&
|
226
221
|
x_indent == o.x_indent &&
|
227
222
|
y_indent == o.y_indent &&
|
228
223
|
zoom == o.zoom &&
|
229
224
|
file_name == o.file_name &&
|
230
|
-
page_index == o.page_index
|
225
|
+
page_index == o.page_index &&
|
226
|
+
vertical_alignment == o.vertical_alignment &&
|
227
|
+
bottom_margin == o.bottom_margin &&
|
228
|
+
left_margin == o.left_margin &&
|
229
|
+
top_margin == o.top_margin &&
|
230
|
+
right_margin == o.right_margin
|
231
231
|
end
|
232
232
|
|
233
233
|
# @see the `==` method
|
@@ -239,7 +239,7 @@ module AsposePdfCloud
|
|
239
239
|
# Calculates hash code according to all attributes.
|
240
240
|
# @return [Fixnum] Hash code
|
241
241
|
def hash
|
242
|
-
[links, background,
|
242
|
+
[links, background, horizontal_alignment, opacity, rotate, rotate_angle, x_indent, y_indent, zoom, file_name, page_index, vertical_alignment, bottom_margin, left_margin, top_margin, right_margin].hash
|
243
243
|
end
|
244
244
|
|
245
245
|
# Builds the object from hash
|