Skip to content

Commit 3918c9a

Browse files
author
Kirill Novinskiy
committed
update to 25.7.0
1 parent 4e50eaf commit 3918c9a

File tree

7 files changed

+145
-14
lines changed

7 files changed

+145
-14
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,13 @@ XLS, XLSX, PPTX, DOC, DOCX, MobiXML, JPEG, EMF, PNG, BMP, GIF, TIFF, Text
2929
## Read PDF Formats
3030
MHT, PCL, PS, XSLFO, MD
3131

32-
## Enhancements in Version 25.6
33-
- Develop Rotate Document Pages method.
32+
## Enhancements in Version 25.7
33+
- Add possibility to hide subject field in signature appearance.
3434
- A new version of Aspose.PDF Cloud was prepared using the latest version of Aspose.PDF for .NET.
3535

36+
## Bugs fixed in Version 25.7
37+
- PostDeleteStamps removing stamps from PDF page is incorrect.
38+
3639
## Installation
3740

3841
### Build a gem
@@ -46,15 +49,15 @@ gem build aspose_pdf_cloud.gemspec
4649
Then either install the gem locally:
4750

4851
```shell
49-
gem install ./aspose_pdf_cloud-25.6.0.gem
52+
gem install ./aspose_pdf_cloud-25.7.0.gem
5053
```
51-
(for development, run `gem install --dev ./aspose_pdf_cloud-25.6.0.gem` to install the development dependencies)
54+
(for development, run `gem install --dev ./aspose_pdf_cloud-25.7.0.gem` to install the development dependencies)
5255

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

5558
Finally add this to the Gemfile:
5659

57-
gem 'aspose_pdf_cloud', '~> 25.6.0'
60+
gem 'aspose_pdf_cloud', '~> 25.7.0'
5861

5962
### Install from Git
6063

docs/SignatureCustomAppearance.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ An abstract class which represents signature custom appearance object.
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**font_family_name** | **String** | Gets/sets font family name. It should be existed in the document. Default value: Arial. | [optional]
8-
**font_size** | **Float** | Gets/sets font size. Default value: 10. |
8+
**font_size** | **Float** | Gets/sets font size. Default value: 10. | [optional]
9+
**rotation** | [**Rotation**](Rotation.md) | Gets or sets signature rotation. |
910
**show_contact_info** | **BOOLEAN** | Gets/sets contact info visibility. Default value: true. |
1011
**show_reason** | **BOOLEAN** | Gets/sets reason visibility. Default value: true. |
1112
**show_location** | **BOOLEAN** | Gets/sets location visibility. Default value: true. |
@@ -16,5 +17,9 @@ Name | Type | Description | Notes
1617
**date_signed_at_label** | **String** | Gets/sets date signed label. Default value: "Date". | [optional]
1718
**date_time_local_format** | **String** | Gets/sets datetime local format. Default value: "yyyy.MM.dd HH:mm:ss zzz". | [optional]
1819
**date_time_format** | **String** | Gets/sets datetime format. Default value: "yyyy.MM.dd HH:mm:ss". | [optional]
20+
**background_color** | [**Color**](Color.md) | Gets/sets background color. | [optional]
21+
**foreground_color** | [**Color**](Color.md) | Gets/sets foreground color. | [optional]
22+
**use_digital_subject_format** | **BOOLEAN** | Gets/sets subject format usage. |
23+
**digital_subject_format** | [**Array<SignatureSubjectNameElements>**](SignatureSubjectNameElements.md) | Gets/sets subject format. | [optional]
1924

2025

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# AsposePdfCloud::SignatureSubjectNameElements
2+
Represents an enumeration of available SubjectNameElements.
3+
4+
## Enum
5+
Name | Type | Value | Description
6+
------------ | ------------- | ------------- | -------------
7+
**CN** | **String** | 'CN' | Common Name.
8+
**O** | **String** | 'O' | Organization.
9+
**L** | **String** | 'L' | Locality.
10+
**OU** | **String** | 'OU' | Organizational Unit.
11+
**S** | **String** | 'S' | State or Province Name.
12+
**C** | **String** | 'C' | Common Name.
13+
**E** | **String** | 'E' | Email.
14+
15+
16+

lib/aspose_pdf_cloud.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
require_relative 'aspose_pdf_cloud/models/shape_type'
119119
require_relative 'aspose_pdf_cloud/models/signature'
120120
require_relative 'aspose_pdf_cloud/models/signature_custom_appearance'
121+
require_relative 'aspose_pdf_cloud/models/signature_subject_name_elements'
121122
require_relative 'aspose_pdf_cloud/models/signature_type'
122123
require_relative 'aspose_pdf_cloud/models/sound_encoding'
123124
require_relative 'aspose_pdf_cloud/models/sound_icon'

lib/aspose_pdf_cloud/models/signature_custom_appearance.rb

Lines changed: 64 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ class SignatureCustomAppearance
3131
# Gets/sets font size. Default value: 10.
3232
attr_accessor :font_size
3333

34+
# Gets or sets signature rotation.
35+
attr_accessor :rotation
36+
3437
# Gets/sets contact info visibility. Default value: true.
3538
attr_accessor :show_contact_info
3639

@@ -61,12 +64,25 @@ class SignatureCustomAppearance
6164
# Gets/sets datetime format. Default value: \"yyyy.MM.dd HH:mm:ss\".
6265
attr_accessor :date_time_format
6366

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+
6479

6580
# Attribute mapping from ruby-style variable name to JSON key.
6681
def self.attribute_map
6782
{
6883
:'font_family_name' => :'FontFamilyName',
6984
:'font_size' => :'FontSize',
85+
:'rotation' => :'Rotation',
7086
:'show_contact_info' => :'ShowContactInfo',
7187
:'show_reason' => :'ShowReason',
7288
:'show_location' => :'ShowLocation',
@@ -76,7 +92,11 @@ def self.attribute_map
7692
:'digital_signed_label' => :'DigitalSignedLabel',
7793
:'date_signed_at_label' => :'DateSignedAtLabel',
7894
:'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'
80100
}
81101
end
82102

@@ -85,6 +105,7 @@ def self.swagger_types
85105
{
86106
:'font_family_name' => :'String',
87107
:'font_size' => :'Float',
108+
:'rotation' => :'Rotation',
88109
:'show_contact_info' => :'BOOLEAN',
89110
:'show_reason' => :'BOOLEAN',
90111
:'show_location' => :'BOOLEAN',
@@ -94,7 +115,11 @@ def self.swagger_types
94115
:'digital_signed_label' => :'String',
95116
:'date_signed_at_label' => :'String',
96117
:'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>'
98123
}
99124
end
100125

@@ -114,6 +139,10 @@ def initialize(attributes = {})
114139
self.font_size = attributes[:'FontSize']
115140
end
116141

142+
if attributes.has_key?(:'Rotation')
143+
self.rotation = attributes[:'Rotation']
144+
end
145+
117146
if attributes.has_key?(:'ShowContactInfo')
118147
self.show_contact_info = attributes[:'ShowContactInfo']
119148
end
@@ -154,14 +183,32 @@ def initialize(attributes = {})
154183
self.date_time_format = attributes[:'DateTimeFormat']
155184
end
156185

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+
157204
end
158205

159206
# Show invalid properties with the reasons. Usually used together with valid?
160207
# @return Array for valid properies with the reasons
161208
def list_invalid_properties
162209
invalid_properties = Array.new
163-
if @font_size.nil?
164-
invalid_properties.push("invalid value for 'font_size', font_size cannot be nil.")
210+
if @rotation.nil?
211+
invalid_properties.push("invalid value for 'rotation', rotation cannot be nil.")
165212
end
166213

167214
if @show_contact_info.nil?
@@ -176,16 +223,21 @@ def list_invalid_properties
176223
invalid_properties.push("invalid value for 'show_location', show_location cannot be nil.")
177224
end
178225

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+
179230
return invalid_properties
180231
end
181232

182233
# Check to see if the all the properties in the model are valid
183234
# @return true if the model is valid
184235
def valid?
185-
return false if @font_size.nil?
236+
return false if @rotation.nil?
186237
return false if @show_contact_info.nil?
187238
return false if @show_reason.nil?
188239
return false if @show_location.nil?
240+
return false if @use_digital_subject_format.nil?
189241
return true
190242
end
191243

@@ -196,6 +248,7 @@ def ==(o)
196248
self.class == o.class &&
197249
font_family_name == o.font_family_name &&
198250
font_size == o.font_size &&
251+
rotation == o.rotation &&
199252
show_contact_info == o.show_contact_info &&
200253
show_reason == o.show_reason &&
201254
show_location == o.show_location &&
@@ -205,7 +258,11 @@ def ==(o)
205258
digital_signed_label == o.digital_signed_label &&
206259
date_signed_at_label == o.date_signed_at_label &&
207260
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
209266
end
210267

211268
# @see the `==` method
@@ -217,7 +274,7 @@ def eql?(o)
217274
# Calculates hash code according to all attributes.
218275
# @return [Fixnum] Hash code
219276
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
221278
end
222279

223280
# Builds the object from hash
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

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 = "25.6.0"
23+
VERSION = "25.7.0"
2424
end

0 commit comments

Comments
 (0)