groupdocs_viewer_cloud 21.12 → 23.3

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.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/lib/groupdocs_viewer_cloud/api/file_api.rb +6 -6
  3. data/lib/groupdocs_viewer_cloud/api/folder_api.rb +6 -6
  4. data/lib/groupdocs_viewer_cloud/api/info_api.rb +2 -2
  5. data/lib/groupdocs_viewer_cloud/api/license_api.rb +1 -1
  6. data/lib/groupdocs_viewer_cloud/api/storage_api.rb +5 -5
  7. data/lib/groupdocs_viewer_cloud/api/view_api.rb +3 -3
  8. data/lib/groupdocs_viewer_cloud/api_client.rb +1 -1
  9. data/lib/groupdocs_viewer_cloud/api_error.rb +1 -1
  10. data/lib/groupdocs_viewer_cloud/configuration.rb +1 -1
  11. data/lib/groupdocs_viewer_cloud/models/archive_options.rb +1 -1
  12. data/lib/groupdocs_viewer_cloud/models/archive_view_info.rb +1 -1
  13. data/lib/groupdocs_viewer_cloud/models/attachment_info.rb +1 -1
  14. data/lib/groupdocs_viewer_cloud/models/attachment_view.rb +1 -1
  15. data/lib/groupdocs_viewer_cloud/models/cad_options.rb +1 -1
  16. data/lib/groupdocs_viewer_cloud/models/cad_view_info.rb +1 -1
  17. data/lib/groupdocs_viewer_cloud/models/character.rb +1 -1
  18. data/lib/groupdocs_viewer_cloud/models/consumption_result.rb +1 -1
  19. data/lib/groupdocs_viewer_cloud/models/delete_view_options.rb +1 -1
  20. data/lib/groupdocs_viewer_cloud/models/disc_usage.rb +1 -1
  21. data/lib/groupdocs_viewer_cloud/models/email_options.rb +1 -1
  22. data/lib/groupdocs_viewer_cloud/models/error.rb +1 -1
  23. data/lib/groupdocs_viewer_cloud/models/error_details.rb +1 -1
  24. data/lib/groupdocs_viewer_cloud/models/field_label.rb +1 -1
  25. data/lib/groupdocs_viewer_cloud/models/file_info.rb +1 -1
  26. data/lib/groupdocs_viewer_cloud/models/file_version.rb +1 -1
  27. data/lib/groupdocs_viewer_cloud/models/file_versions.rb +1 -1
  28. data/lib/groupdocs_viewer_cloud/models/files_list.rb +1 -1
  29. data/lib/groupdocs_viewer_cloud/models/files_upload_result.rb +1 -1
  30. data/lib/groupdocs_viewer_cloud/models/format.rb +1 -1
  31. data/lib/groupdocs_viewer_cloud/models/formats_result.rb +1 -1
  32. data/lib/groupdocs_viewer_cloud/models/html_options.rb +22 -2
  33. data/lib/groupdocs_viewer_cloud/models/html_resource.rb +1 -1
  34. data/lib/groupdocs_viewer_cloud/models/image_options.rb +22 -2
  35. data/lib/groupdocs_viewer_cloud/models/info_result.rb +1 -1
  36. data/lib/groupdocs_viewer_cloud/models/layer.rb +1 -1
  37. data/lib/groupdocs_viewer_cloud/models/layout.rb +1 -1
  38. data/lib/groupdocs_viewer_cloud/models/line.rb +1 -1
  39. data/lib/groupdocs_viewer_cloud/models/mail_storage_options.rb +1 -1
  40. data/lib/groupdocs_viewer_cloud/models/object_exist.rb +1 -1
  41. data/lib/groupdocs_viewer_cloud/models/outlook_options.rb +1 -1
  42. data/lib/groupdocs_viewer_cloud/models/outlook_view_info.rb +1 -1
  43. data/lib/groupdocs_viewer_cloud/models/page_info.rb +1 -1
  44. data/lib/groupdocs_viewer_cloud/models/page_rotation.rb +1 -1
  45. data/lib/groupdocs_viewer_cloud/models/page_view.rb +1 -1
  46. data/lib/groupdocs_viewer_cloud/models/pdf_document_options.rb +1 -1
  47. data/lib/groupdocs_viewer_cloud/models/pdf_options.rb +22 -2
  48. data/lib/groupdocs_viewer_cloud/models/pdf_view_info.rb +1 -1
  49. data/lib/groupdocs_viewer_cloud/models/project_management_options.rb +1 -1
  50. data/lib/groupdocs_viewer_cloud/models/project_management_view_info.rb +1 -1
  51. data/lib/groupdocs_viewer_cloud/models/render_options.rb +25 -5
  52. data/lib/groupdocs_viewer_cloud/models/resource.rb +1 -1
  53. data/lib/groupdocs_viewer_cloud/models/spreadsheet_options.rb +1 -1
  54. data/lib/groupdocs_viewer_cloud/models/storage_exist.rb +1 -1
  55. data/lib/groupdocs_viewer_cloud/models/storage_file.rb +1 -1
  56. data/lib/groupdocs_viewer_cloud/models/text_element.rb +1 -1
  57. data/lib/groupdocs_viewer_cloud/models/text_options.rb +1 -1
  58. data/lib/groupdocs_viewer_cloud/models/tile.rb +1 -1
  59. data/lib/groupdocs_viewer_cloud/models/view_options.rb +1 -1
  60. data/lib/groupdocs_viewer_cloud/models/view_result.rb +1 -1
  61. data/lib/groupdocs_viewer_cloud/models/visio_rendering_options.rb +1 -1
  62. data/lib/groupdocs_viewer_cloud/models/watermark.rb +1 -1
  63. data/lib/groupdocs_viewer_cloud/models/web_document_options.rb +316 -0
  64. data/lib/groupdocs_viewer_cloud/models/word.rb +1 -1
  65. data/lib/groupdocs_viewer_cloud/models/word_processing_options.rb +1 -1
  66. data/lib/groupdocs_viewer_cloud/version.rb +2 -2
  67. data/lib/groupdocs_viewer_cloud.rb +2 -1
  68. metadata +7 -6
@@ -0,0 +1,316 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="web_document_options.rb">
4
+ # Copyright (c) 2003-2023 Aspose Pty Ltd
5
+ # </copyright>
6
+ # <summary>
7
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ # of this software and associated documentation files (the "Software"), to deal
9
+ # in the Software without restriction, including without limitation the rights
10
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ # copies of the Software, and to permit persons to whom the Software is
12
+ # furnished to do so, subject to the following conditions:
13
+ #
14
+ # The above copyright notice and this permission notice shall be included in all
15
+ # copies or substantial portions of the Software.
16
+ #
17
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ # SOFTWARE.
24
+ # </summary>
25
+ # --------------------------------------------------------------------------------------------------------------------
26
+ #
27
+
28
+ require 'date'
29
+
30
+ module GroupDocsViewerCloud
31
+ # This rendering options enables you to customize the appearance of the output HTML/PDF/PNG/JPEG when rendering Web documents.
32
+ class WebDocumentOptions
33
+
34
+ # The size of the output page. The default value is GroupDocs.Viewer.Options.PageSize.Letter 792 x 612 points. When contents does not fit set a larger page size e.g. GroupDocs.Viewer.Options.PageSize.A3.
35
+ attr_accessor :page_size
36
+
37
+ # The distance (in points) between the left edge of the page and the left boundary of the body text. The default value is 5 points.
38
+ attr_accessor :left_margin
39
+
40
+ # The distance (in points) between the right edge of the page and the right boundary of the body text. The default value is 5 points.
41
+ attr_accessor :right_margin
42
+
43
+ # The distance (in points) between the top edge of the page and the top boundary of the body text. The default value is 72 points.
44
+ attr_accessor :top_margin
45
+
46
+ # The distance (in points) between the bottom edge of the page and the bottom boundary of the body text. The default value is 72 points.
47
+ attr_accessor :bottom_margin
48
+ class EnumAttributeValidator
49
+ attr_reader :datatype
50
+ attr_reader :allowable_values
51
+
52
+ def initialize(datatype, allowable_values)
53
+ @allowable_values = allowable_values.map do |value|
54
+ case datatype.to_s
55
+ when /Integer/i
56
+ value.to_i
57
+ when /Float/i
58
+ value.to_f
59
+ else
60
+ value
61
+ end
62
+ end
63
+ end
64
+
65
+ def valid?(value)
66
+ !value || allowable_values.include?(value)
67
+ end
68
+ end
69
+
70
+ # Attribute mapping from ruby-style variable name to JSON key.
71
+ def self.attribute_map
72
+ {
73
+ :'page_size' => :'PageSize',
74
+ :'left_margin' => :'LeftMargin',
75
+ :'right_margin' => :'RightMargin',
76
+ :'top_margin' => :'TopMargin',
77
+ :'bottom_margin' => :'BottomMargin'
78
+ }
79
+ end
80
+
81
+ # Attribute type mapping.
82
+ def self.swagger_types
83
+ {
84
+ :'page_size' => :'String',
85
+ :'left_margin' => :'Float',
86
+ :'right_margin' => :'Float',
87
+ :'top_margin' => :'Float',
88
+ :'bottom_margin' => :'Float'
89
+ }
90
+ end
91
+
92
+ # Initializes the object
93
+ # @param [Hash] attributes Model attributes in the form of hash
94
+ def initialize(attributes = {})
95
+ return unless attributes.is_a?(Hash)
96
+
97
+ # convert string to symbol for hash key
98
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
99
+
100
+ if attributes.key?(:'PageSize')
101
+ self.page_size = attributes[:'PageSize']
102
+ end
103
+
104
+ if attributes.key?(:'LeftMargin')
105
+ self.left_margin = attributes[:'LeftMargin']
106
+ end
107
+
108
+ if attributes.key?(:'RightMargin')
109
+ self.right_margin = attributes[:'RightMargin']
110
+ end
111
+
112
+ if attributes.key?(:'TopMargin')
113
+ self.top_margin = attributes[:'TopMargin']
114
+ end
115
+
116
+ if attributes.key?(:'BottomMargin')
117
+ self.bottom_margin = attributes[:'BottomMargin']
118
+ end
119
+
120
+ end
121
+
122
+ # Show invalid properties with the reasons. Usually used together with valid?
123
+ # @return Array for valid properies with the reasons
124
+ def list_invalid_properties
125
+ invalid_properties = []
126
+ if @page_size.nil?
127
+ invalid_properties.push("invalid value for 'page_size', page_size cannot be nil.")
128
+ end
129
+
130
+ if @left_margin.nil?
131
+ invalid_properties.push("invalid value for 'left_margin', left_margin cannot be nil.")
132
+ end
133
+
134
+ if @right_margin.nil?
135
+ invalid_properties.push("invalid value for 'right_margin', right_margin cannot be nil.")
136
+ end
137
+
138
+ if @top_margin.nil?
139
+ invalid_properties.push("invalid value for 'top_margin', top_margin cannot be nil.")
140
+ end
141
+
142
+ if @bottom_margin.nil?
143
+ invalid_properties.push("invalid value for 'bottom_margin', bottom_margin cannot be nil.")
144
+ end
145
+
146
+ return invalid_properties
147
+ end
148
+
149
+ # Check to see if the all the properties in the model are valid
150
+ # @return true if the model is valid
151
+ def valid?
152
+ return false if @page_size.nil?
153
+ page_size_validator = EnumAttributeValidator.new('String', ["Unspecified", "Letter", "Ledger", "A0", "A1", "A2", "A3", "A4"])
154
+ return false unless page_size_validator.valid?(@page_size)
155
+ return false if @left_margin.nil?
156
+ return false if @right_margin.nil?
157
+ return false if @top_margin.nil?
158
+ return false if @bottom_margin.nil?
159
+ return true
160
+ end
161
+
162
+ # Custom attribute writer method checking allowed values (enum).
163
+ # @param [Object] page_size Object to be assigned
164
+ def page_size=(page_size)
165
+ validator = EnumAttributeValidator.new('String', ["Unspecified", "Letter", "Ledger", "A0", "A1", "A2", "A3", "A4"])
166
+ if page_size.to_i == 0
167
+ unless validator.valid?(page_size)
168
+ raise ArgumentError, "invalid value for 'page_size', must be one of #{validator.allowable_values}."
169
+ end
170
+ @page_size = page_size
171
+ else
172
+ @page_size = validator.allowable_values[page_size.to_i]
173
+ end
174
+ end
175
+
176
+ # Checks equality by comparing each attribute.
177
+ # @param [Object] Object to be compared
178
+ def ==(other)
179
+ return true if self.equal?(other)
180
+ self.class == other.class &&
181
+ page_size == other.page_size &&
182
+ left_margin == other.left_margin &&
183
+ right_margin == other.right_margin &&
184
+ top_margin == other.top_margin &&
185
+ bottom_margin == other.bottom_margin
186
+ end
187
+
188
+ # @see the `==` method
189
+ # @param [Object] Object to be compared
190
+ def eql?(other)
191
+ self == other
192
+ end
193
+
194
+ # Calculates hash code according to all attributes.
195
+ # @return [Fixnum] Hash code
196
+ def hash
197
+ [page_size, left_margin, right_margin, top_margin, bottom_margin].hash
198
+ end
199
+
200
+ # Downcases first letter.
201
+ # @return downcased string
202
+ def uncap(str)
203
+ str[0, 1].downcase + str[1..-1]
204
+ end
205
+
206
+ # Builds the object from hash
207
+ # @param [Hash] attributes Model attributes in the form of hash
208
+ # @return [Object] Returns the model itself
209
+ def build_from_hash(attributes)
210
+ return nil unless attributes.is_a?(Hash)
211
+ self.class.swagger_types.each_pair do |key, type|
212
+ pname = uncap(self.class.attribute_map[key]).intern
213
+ value = attributes[pname]
214
+ if type =~ /\AArray<(.*)>/i
215
+ # check to ensure the input is an array given that the the attribute
216
+ # is documented as an array but the input is not
217
+ if value.is_a?(Array)
218
+ self.send("#{key}=", value.map { |v| _deserialize($1, v) })
219
+ end
220
+ elsif !value.nil?
221
+ self.send("#{key}=", _deserialize(type, value))
222
+ end
223
+ # or else data not found in attributes(hash), not an issue as the data can be optional
224
+ end
225
+
226
+ self
227
+ end
228
+
229
+ # Deserializes the data based on type
230
+ # @param string type Data type
231
+ # @param string value Value to be deserialized
232
+ # @return [Object] Deserialized data
233
+ def _deserialize(type, value)
234
+ case type.to_sym
235
+ when :DateTime
236
+ Date.parse value
237
+ when :Date
238
+ Date.parse value
239
+ when :String
240
+ value.to_s
241
+ when :Integer
242
+ value.to_i
243
+ when :Float
244
+ value.to_f
245
+ when :BOOLEAN
246
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
247
+ true
248
+ else
249
+ false
250
+ end
251
+ when :Object
252
+ # generic object (usually a Hash), return directly
253
+ value
254
+ when /\AArray<(?<inner_type>.+)>\z/
255
+ inner_type = Regexp.last_match[:inner_type]
256
+ value.map { |v| _deserialize(inner_type, v) }
257
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
258
+ k_type = Regexp.last_match[:k_type]
259
+ v_type = Regexp.last_match[:v_type]
260
+ {}.tap do |hash|
261
+ value.each do |k, v|
262
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
263
+ end
264
+ end
265
+ else
266
+ # model
267
+ temp_model = GroupDocsViewerCloud.const_get(type).new
268
+ temp_model.build_from_hash(value)
269
+ end
270
+ end
271
+
272
+ # Returns the string representation of the object
273
+ # @return [String] String presentation of the object
274
+ def to_s
275
+ to_hash.to_s
276
+ end
277
+
278
+ # to_body is an alias to to_hash (backward compatibility)
279
+ # @return [Hash] Returns the object in the form of hash
280
+ def to_body
281
+ to_hash
282
+ end
283
+
284
+ # Returns the object in the form of hash
285
+ # @return [Hash] Returns the object in the form of hash
286
+ def to_hash
287
+ hash = {}
288
+ self.class.attribute_map.each_pair do |attr, param|
289
+ value = self.send(attr)
290
+ next if value.nil?
291
+ hash[param] = _to_hash(value)
292
+ end
293
+ hash
294
+ end
295
+
296
+ # Outputs non-array value in the form of hash
297
+ # For object, use to_hash. Otherwise, just return the value
298
+ # @param [Object] value Any valid value
299
+ # @return [Hash] Returns the value in the form of hash
300
+ def _to_hash(value)
301
+ if value.is_a?(Array)
302
+ value.compact.map { |v| _to_hash(v) }
303
+ elsif value.is_a?(Hash)
304
+ {}.tap do |hash|
305
+ value.each { |k, v| hash[k] = _to_hash(v) }
306
+ end
307
+ elsif value.respond_to? :to_hash
308
+ value.to_hash
309
+ else
310
+ value
311
+ end
312
+ end
313
+
314
+ end
315
+
316
+ end
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="word.rb">
4
- # Copyright (c) 2003-2021 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2023 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="word_processing_options.rb">
4
- # Copyright (c) 2003-2021 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2023 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -1,7 +1,7 @@
1
1
  #
2
2
  # --------------------------------------------------------------------------------------------------------------------
3
3
  # <copyright company="Aspose Pty Ltd" file="version.rb">
4
- # Copyright (c) 2003-2021 Aspose Pty Ltd
4
+ # Copyright (c) 2003-2023 Aspose Pty Ltd
5
5
  # </copyright>
6
6
  # <summary>
7
7
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -25,5 +25,5 @@
25
25
  # --------------------------------------------------------------------------------------------------------------------
26
26
  #
27
27
  module GroupDocsViewerCloud
28
- VERSION = "21.12".freeze
28
+ VERSION = "23.3".freeze
29
29
  end
@@ -1,6 +1,6 @@
1
1
  # ------------------------------------------------------------------------------------
2
2
  # <copyright company="Aspose Pty Ltd" file="groupdocs_viewer_cloud.rb">
3
- # Copyright (c) 2003-2021 Aspose Pty Ltd
3
+ # Copyright (c) 2003-2023 Aspose Pty Ltd
4
4
  # </copyright>
5
5
  # <summary>
6
6
  # Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -73,6 +73,7 @@ require_relative 'groupdocs_viewer_cloud/models/view_options'
73
73
  require_relative 'groupdocs_viewer_cloud/models/view_result'
74
74
  require_relative 'groupdocs_viewer_cloud/models/visio_rendering_options'
75
75
  require_relative 'groupdocs_viewer_cloud/models/watermark'
76
+ require_relative 'groupdocs_viewer_cloud/models/web_document_options'
76
77
  require_relative 'groupdocs_viewer_cloud/models/word_processing_options'
77
78
  require_relative 'groupdocs_viewer_cloud/models/attachment_view'
78
79
  require_relative 'groupdocs_viewer_cloud/models/character'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: groupdocs_viewer_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: '21.12'
4
+ version: '23.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - GroupDocs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-30 00:00:00.000000000 Z
11
+ date: 2023-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -30,20 +30,20 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 2.5.0
33
+ version: 2.8.0
34
34
  - - ">="
35
35
  - !ruby/object:Gem::Version
36
- version: 2.5.0
36
+ version: 2.8.0
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
41
  - - "~>"
42
42
  - !ruby/object:Gem::Version
43
- version: 2.5.0
43
+ version: 2.8.0
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: 2.5.0
46
+ version: 2.8.0
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: minitest
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -132,6 +132,7 @@ files:
132
132
  - lib/groupdocs_viewer_cloud/models/view_result.rb
133
133
  - lib/groupdocs_viewer_cloud/models/visio_rendering_options.rb
134
134
  - lib/groupdocs_viewer_cloud/models/watermark.rb
135
+ - lib/groupdocs_viewer_cloud/models/web_document_options.rb
135
136
  - lib/groupdocs_viewer_cloud/models/word.rb
136
137
  - lib/groupdocs_viewer_cloud/models/word_processing_options.rb
137
138
  - lib/groupdocs_viewer_cloud/version.rb