aspose_pdf_cloud 25.5.0 → 25.7.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/lib/aspose_pdf_cloud/api/pdf_api.rb +93 -0
- data/lib/aspose_pdf_cloud/models/signature_custom_appearance.rb +64 -7
- data/lib/aspose_pdf_cloud/models/signature_subject_name_elements.rb +49 -0
- data/lib/aspose_pdf_cloud/version.rb +1 -1
- data/lib/aspose_pdf_cloud.rb +1 -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: 3e0ef4ade1f8dea3694ac7a6765c8df53dd2ac7c5653a19836c25362a5c376f5
|
4
|
+
data.tar.gz: c61386d7257f60efcb589b1d775ae9032a30b6cccc771eb7ce4c470bed816ad6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0abe7ce9e7d910f1e9cf97f9f0da60795d4ac4aaec4138d13721c2ef6985c66ea6e096d3aed4d9ffd353ae488fb694c6f3b2cf85db5baed32941c700323bc44a
|
7
|
+
data.tar.gz: 1aae1871946a08c8826e1fc30ae3159e0e42efff0b331cc07faefd3e9ef96edd3d48a289347d6164c33153c5731eb41856d3f8b8466ec3151aa635259662b8d8
|
@@ -16351,6 +16351,99 @@ module AsposePdfCloud
|
|
16351
16351
|
return data, status_code, headers
|
16352
16352
|
end
|
16353
16353
|
|
16354
|
+
# Rotate PDF document.
|
16355
|
+
#
|
16356
|
+
# @param name The document name.
|
16357
|
+
# @param rotation_angle Rotation Angle (CKW). Can be 90, 180, 270.
|
16358
|
+
# @param pages Comma separated list of pages and page ranges. (Example: 1,3-5,8)
|
16359
|
+
# @param [Hash] opts the optional parameters
|
16360
|
+
# @option opts [String] :storage The document storage.
|
16361
|
+
# @option opts [String] :folder The document folder.
|
16362
|
+
# @option opts [String] :password Base64 encoded password.
|
16363
|
+
# @return [AsposeResponse]
|
16364
|
+
def post_document_pages_rotate(name, rotation_angle, pages, opts = {})
|
16365
|
+
@api_client.request_token_if_needed
|
16366
|
+
data, _status_code, _headers = post_document_pages_rotate_with_http_info(name, rotation_angle, pages, opts)
|
16367
|
+
rescue ApiError => error
|
16368
|
+
if error.code == 401
|
16369
|
+
@api_client.request_token_if_needed
|
16370
|
+
data, _status_code, _headers = post_document_pages_rotate_with_http_info(name, rotation_angle, pages, opts)
|
16371
|
+
else
|
16372
|
+
raise
|
16373
|
+
end
|
16374
|
+
return data
|
16375
|
+
end
|
16376
|
+
|
16377
|
+
# Rotate PDF document.
|
16378
|
+
#
|
16379
|
+
# @param name The document name.
|
16380
|
+
# @param rotation_angle Rotation Angle (CKW). Can be 90, 180, 270.
|
16381
|
+
# @param pages Comma separated list of pages and page ranges. (Example: 1,3-5,8)
|
16382
|
+
# @param [Hash] opts the optional parameters
|
16383
|
+
# @option opts [String] :storage The document storage.
|
16384
|
+
# @option opts [String] :folder The document folder.
|
16385
|
+
# @option opts [String] :password Base64 encoded password.
|
16386
|
+
# @return [Array<(AsposeResponse, Fixnum, Hash)>] AsposeResponse data, response status code and response headers
|
16387
|
+
def post_document_pages_rotate_with_http_info(name, rotation_angle, pages, opts = {})
|
16388
|
+
if @api_client.config.debugging
|
16389
|
+
@api_client.config.logger.debug "Calling API: PdfApi.post_document_pages_rotate ..."
|
16390
|
+
end
|
16391
|
+
# verify the required parameter 'name' is set
|
16392
|
+
if @api_client.config.client_side_validation && name.nil?
|
16393
|
+
fail ArgumentError, "Missing the required parameter 'name' when calling PdfApi.post_document_pages_rotate"
|
16394
|
+
end
|
16395
|
+
# verify the required parameter 'rotation_angle' is set
|
16396
|
+
if @api_client.config.client_side_validation && rotation_angle.nil?
|
16397
|
+
fail ArgumentError, "Missing the required parameter 'rotation_angle' when calling PdfApi.post_document_pages_rotate"
|
16398
|
+
end
|
16399
|
+
# verify enum value
|
16400
|
+
if @api_client.config.client_side_validation && !['None', 'on90', 'on180', 'on270'].include?(rotation_angle)
|
16401
|
+
fail ArgumentError, "invalid value for 'rotation_angle', must be one of None, on90, on180, on270"
|
16402
|
+
end
|
16403
|
+
# verify the required parameter 'pages' is set
|
16404
|
+
if @api_client.config.client_side_validation && pages.nil?
|
16405
|
+
fail ArgumentError, "Missing the required parameter 'pages' when calling PdfApi.post_document_pages_rotate"
|
16406
|
+
end
|
16407
|
+
# resource path
|
16408
|
+
local_var_path = "/pdf/{name}/rotate".sub('{' + 'name' + '}', name.to_s)
|
16409
|
+
|
16410
|
+
# query parameters
|
16411
|
+
query_params = {}
|
16412
|
+
query_params[:'rotationAngle'] = rotation_angle
|
16413
|
+
query_params[:'pages'] = pages
|
16414
|
+
query_params[:'storage'] = opts[:'storage'] if !opts[:'storage'].nil?
|
16415
|
+
query_params[:'folder'] = opts[:'folder'] if !opts[:'folder'].nil?
|
16416
|
+
query_params[:'password'] = opts[:'password'] if !opts[:'password'].nil?
|
16417
|
+
|
16418
|
+
# header parameters
|
16419
|
+
header_params = {}
|
16420
|
+
# HTTP header 'Accept' (if needed)
|
16421
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
16422
|
+
# HTTP header 'Content-Type'
|
16423
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
16424
|
+
|
16425
|
+
# form parameters
|
16426
|
+
form_params = {}
|
16427
|
+
# Fix header in file
|
16428
|
+
post_body = nil
|
16429
|
+
|
16430
|
+
# http body (model)
|
16431
|
+
# Fix header in file
|
16432
|
+
# post_body = nil
|
16433
|
+
auth_names = ['JWT']
|
16434
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
16435
|
+
:header_params => header_params,
|
16436
|
+
:query_params => query_params,
|
16437
|
+
:form_params => form_params,
|
16438
|
+
:body => post_body,
|
16439
|
+
:auth_names => auth_names,
|
16440
|
+
:return_type => 'AsposeResponse')
|
16441
|
+
if @api_client.config.debugging
|
16442
|
+
@api_client.config.logger.debug "API called: PdfApi#post_document_pages_rotate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
16443
|
+
end
|
16444
|
+
return data, status_code, headers
|
16445
|
+
end
|
16446
|
+
|
16354
16447
|
# Add document text footer.
|
16355
16448
|
#
|
16356
16449
|
# @param name The document name.
|
@@ -31,6 +31,9 @@ module AsposePdfCloud
|
|
31
31
|
# Gets/sets font size. Default value: 10.
|
32
32
|
attr_accessor :font_size
|
33
33
|
|
34
|
+
# Gets or sets signature rotation.
|
35
|
+
attr_accessor :rotation
|
36
|
+
|
34
37
|
# Gets/sets contact info visibility. Default value: true.
|
35
38
|
attr_accessor :show_contact_info
|
36
39
|
|
@@ -61,12 +64,25 @@ module AsposePdfCloud
|
|
61
64
|
# Gets/sets datetime format. Default value: \"yyyy.MM.dd HH:mm:ss\".
|
62
65
|
attr_accessor :date_time_format
|
63
66
|
|
67
|
+
# Gets/sets background color.
|
68
|
+
attr_accessor :background_color
|
69
|
+
|
70
|
+
# Gets/sets foreground color.
|
71
|
+
attr_accessor :foreground_color
|
72
|
+
|
73
|
+
# Gets/sets subject format usage.
|
74
|
+
attr_accessor :use_digital_subject_format
|
75
|
+
|
76
|
+
# Gets/sets subject format.
|
77
|
+
attr_accessor :digital_subject_format
|
78
|
+
|
64
79
|
|
65
80
|
# Attribute mapping from ruby-style variable name to JSON key.
|
66
81
|
def self.attribute_map
|
67
82
|
{
|
68
83
|
:'font_family_name' => :'FontFamilyName',
|
69
84
|
:'font_size' => :'FontSize',
|
85
|
+
:'rotation' => :'Rotation',
|
70
86
|
:'show_contact_info' => :'ShowContactInfo',
|
71
87
|
:'show_reason' => :'ShowReason',
|
72
88
|
:'show_location' => :'ShowLocation',
|
@@ -76,7 +92,11 @@ module AsposePdfCloud
|
|
76
92
|
:'digital_signed_label' => :'DigitalSignedLabel',
|
77
93
|
:'date_signed_at_label' => :'DateSignedAtLabel',
|
78
94
|
:'date_time_local_format' => :'DateTimeLocalFormat',
|
79
|
-
:'date_time_format' => :'DateTimeFormat'
|
95
|
+
:'date_time_format' => :'DateTimeFormat',
|
96
|
+
:'background_color' => :'BackgroundColor',
|
97
|
+
:'foreground_color' => :'ForegroundColor',
|
98
|
+
:'use_digital_subject_format' => :'UseDigitalSubjectFormat',
|
99
|
+
:'digital_subject_format' => :'DigitalSubjectFormat'
|
80
100
|
}
|
81
101
|
end
|
82
102
|
|
@@ -85,6 +105,7 @@ module AsposePdfCloud
|
|
85
105
|
{
|
86
106
|
:'font_family_name' => :'String',
|
87
107
|
:'font_size' => :'Float',
|
108
|
+
:'rotation' => :'Rotation',
|
88
109
|
:'show_contact_info' => :'BOOLEAN',
|
89
110
|
:'show_reason' => :'BOOLEAN',
|
90
111
|
:'show_location' => :'BOOLEAN',
|
@@ -94,7 +115,11 @@ module AsposePdfCloud
|
|
94
115
|
:'digital_signed_label' => :'String',
|
95
116
|
:'date_signed_at_label' => :'String',
|
96
117
|
:'date_time_local_format' => :'String',
|
97
|
-
:'date_time_format' => :'String'
|
118
|
+
:'date_time_format' => :'String',
|
119
|
+
:'background_color' => :'Color',
|
120
|
+
:'foreground_color' => :'Color',
|
121
|
+
:'use_digital_subject_format' => :'BOOLEAN',
|
122
|
+
:'digital_subject_format' => :'Array<SignatureSubjectNameElements>'
|
98
123
|
}
|
99
124
|
end
|
100
125
|
|
@@ -114,6 +139,10 @@ module AsposePdfCloud
|
|
114
139
|
self.font_size = attributes[:'FontSize']
|
115
140
|
end
|
116
141
|
|
142
|
+
if attributes.has_key?(:'Rotation')
|
143
|
+
self.rotation = attributes[:'Rotation']
|
144
|
+
end
|
145
|
+
|
117
146
|
if attributes.has_key?(:'ShowContactInfo')
|
118
147
|
self.show_contact_info = attributes[:'ShowContactInfo']
|
119
148
|
end
|
@@ -154,14 +183,32 @@ module AsposePdfCloud
|
|
154
183
|
self.date_time_format = attributes[:'DateTimeFormat']
|
155
184
|
end
|
156
185
|
|
186
|
+
if attributes.has_key?(:'BackgroundColor')
|
187
|
+
self.background_color = attributes[:'BackgroundColor']
|
188
|
+
end
|
189
|
+
|
190
|
+
if attributes.has_key?(:'ForegroundColor')
|
191
|
+
self.foreground_color = attributes[:'ForegroundColor']
|
192
|
+
end
|
193
|
+
|
194
|
+
if attributes.has_key?(:'UseDigitalSubjectFormat')
|
195
|
+
self.use_digital_subject_format = attributes[:'UseDigitalSubjectFormat']
|
196
|
+
end
|
197
|
+
|
198
|
+
if attributes.has_key?(:'DigitalSubjectFormat')
|
199
|
+
if (value = attributes[:'DigitalSubjectFormat']).is_a?(Array)
|
200
|
+
self.digital_subject_format = value
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
157
204
|
end
|
158
205
|
|
159
206
|
# Show invalid properties with the reasons. Usually used together with valid?
|
160
207
|
# @return Array for valid properies with the reasons
|
161
208
|
def list_invalid_properties
|
162
209
|
invalid_properties = Array.new
|
163
|
-
if @
|
164
|
-
invalid_properties.push("invalid value for '
|
210
|
+
if @rotation.nil?
|
211
|
+
invalid_properties.push("invalid value for 'rotation', rotation cannot be nil.")
|
165
212
|
end
|
166
213
|
|
167
214
|
if @show_contact_info.nil?
|
@@ -176,16 +223,21 @@ module AsposePdfCloud
|
|
176
223
|
invalid_properties.push("invalid value for 'show_location', show_location cannot be nil.")
|
177
224
|
end
|
178
225
|
|
226
|
+
if @use_digital_subject_format.nil?
|
227
|
+
invalid_properties.push("invalid value for 'use_digital_subject_format', use_digital_subject_format cannot be nil.")
|
228
|
+
end
|
229
|
+
|
179
230
|
return invalid_properties
|
180
231
|
end
|
181
232
|
|
182
233
|
# Check to see if the all the properties in the model are valid
|
183
234
|
# @return true if the model is valid
|
184
235
|
def valid?
|
185
|
-
return false if @
|
236
|
+
return false if @rotation.nil?
|
186
237
|
return false if @show_contact_info.nil?
|
187
238
|
return false if @show_reason.nil?
|
188
239
|
return false if @show_location.nil?
|
240
|
+
return false if @use_digital_subject_format.nil?
|
189
241
|
return true
|
190
242
|
end
|
191
243
|
|
@@ -196,6 +248,7 @@ module AsposePdfCloud
|
|
196
248
|
self.class == o.class &&
|
197
249
|
font_family_name == o.font_family_name &&
|
198
250
|
font_size == o.font_size &&
|
251
|
+
rotation == o.rotation &&
|
199
252
|
show_contact_info == o.show_contact_info &&
|
200
253
|
show_reason == o.show_reason &&
|
201
254
|
show_location == o.show_location &&
|
@@ -205,7 +258,11 @@ module AsposePdfCloud
|
|
205
258
|
digital_signed_label == o.digital_signed_label &&
|
206
259
|
date_signed_at_label == o.date_signed_at_label &&
|
207
260
|
date_time_local_format == o.date_time_local_format &&
|
208
|
-
date_time_format == o.date_time_format
|
261
|
+
date_time_format == o.date_time_format &&
|
262
|
+
background_color == o.background_color &&
|
263
|
+
foreground_color == o.foreground_color &&
|
264
|
+
use_digital_subject_format == o.use_digital_subject_format &&
|
265
|
+
digital_subject_format == o.digital_subject_format
|
209
266
|
end
|
210
267
|
|
211
268
|
# @see the `==` method
|
@@ -217,7 +274,7 @@ module AsposePdfCloud
|
|
217
274
|
# Calculates hash code according to all attributes.
|
218
275
|
# @return [Fixnum] Hash code
|
219
276
|
def hash
|
220
|
-
[font_family_name, font_size, show_contact_info, show_reason, show_location, contact_info_label, reason_label, location_label, digital_signed_label, date_signed_at_label, date_time_local_format, date_time_format].hash
|
277
|
+
[font_family_name, font_size, rotation, show_contact_info, show_reason, show_location, contact_info_label, reason_label, location_label, digital_signed_label, date_signed_at_label, date_time_local_format, date_time_format, background_color, foreground_color, use_digital_subject_format, digital_subject_format].hash
|
221
278
|
end
|
222
279
|
|
223
280
|
# Builds the object from hash
|
@@ -0,0 +1,49 @@
|
|
1
|
+
=begin
|
2
|
+
--------------------------------------------------------------------------------------------------------------------
|
3
|
+
Copyright (c) 2025 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 SignatureSubjectNameElements
|
27
|
+
|
28
|
+
CN = "CN".freeze
|
29
|
+
O = "O".freeze
|
30
|
+
L = "L".freeze
|
31
|
+
OU = "OU".freeze
|
32
|
+
S = "S".freeze
|
33
|
+
C = "C".freeze
|
34
|
+
E = "E".freeze
|
35
|
+
|
36
|
+
# Builds the enum from string
|
37
|
+
# @param [String] The enum value in the form of the string
|
38
|
+
# @return [String] The enum value
|
39
|
+
def build_from_hash(value)
|
40
|
+
# resolve issue with Concstant Name modification (ex: "FooName" to :FOO_NAME)
|
41
|
+
# consantValues = SignatureSubjectNameElements.constants.select{|c| c.to_s == value}
|
42
|
+
constantValues = SignatureSubjectNameElements.constants.select{ |const_name| SignatureSubjectNameElements.const_get(const_name) == value}
|
43
|
+
|
44
|
+
raise "Invalid ENUM value #{value} for class #SignatureSubjectNameElements" if constantValues.empty?
|
45
|
+
value
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
data/lib/aspose_pdf_cloud.rb
CHANGED
@@ -118,6 +118,7 @@ require_relative 'aspose_pdf_cloud/models/segment'
|
|
118
118
|
require_relative 'aspose_pdf_cloud/models/shape_type'
|
119
119
|
require_relative 'aspose_pdf_cloud/models/signature'
|
120
120
|
require_relative 'aspose_pdf_cloud/models/signature_custom_appearance'
|
121
|
+
require_relative 'aspose_pdf_cloud/models/signature_subject_name_elements'
|
121
122
|
require_relative 'aspose_pdf_cloud/models/signature_type'
|
122
123
|
require_relative 'aspose_pdf_cloud/models/sound_encoding'
|
123
124
|
require_relative 'aspose_pdf_cloud/models/sound_icon'
|
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: 25.
|
4
|
+
version: 25.7.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: 2025-
|
11
|
+
date: 2025-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -273,6 +273,7 @@ files:
|
|
273
273
|
- lib/aspose_pdf_cloud/models/signature_field_response.rb
|
274
274
|
- lib/aspose_pdf_cloud/models/signature_fields.rb
|
275
275
|
- lib/aspose_pdf_cloud/models/signature_fields_response.rb
|
276
|
+
- lib/aspose_pdf_cloud/models/signature_subject_name_elements.rb
|
276
277
|
- lib/aspose_pdf_cloud/models/signature_type.rb
|
277
278
|
- lib/aspose_pdf_cloud/models/signature_verify_response.rb
|
278
279
|
- lib/aspose_pdf_cloud/models/sound_annotation.rb
|