groupdocs_viewer_cloud 24.2 → 24.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f0a5b57bfe17567af8d9d132f8cf520e720525c6f9c8dc898ed55be55324694c
4
- data.tar.gz: 117e9f43c46306689df1432be0d751f6c0f77b24440003a8228d020599f8ef3b
3
+ metadata.gz: 5bfb868f34657146ec583ec2c43c8de6fb87faa484515c470977df0ed6835a0c
4
+ data.tar.gz: 88327d5d3857dc7ea613e77ca981e8299265581bce4f1137aec580e8063f685e
5
5
  SHA512:
6
- metadata.gz: 4b1ef8da938ef3f6dc45f08ac2cddce0c0d743d475ff8827e6448704a408a0bf2efcadcfd7074dcb0ac1635e362ad3f887fd168011e94b9d89ab970de296a812
7
- data.tar.gz: aef7333159d4ed7f162d7b26c03062bd8d6b6370778e8dea5237e4e11552bc169595844730b317752b3b988c29898d2eb8ee6a4137890d93cd3605fbaf7c7bd8
6
+ metadata.gz: 26cc09a3dc97ab8b96d909c04e34b6d005bc742cbe933f0495095bd6d8c590f6fdad7ef54469059a4991436b0549c84f89ba1cefe92455a228e721e39aec07a4
7
+ data.tar.gz: 142275cbbe16d928cb3d9b9cdfe0231ecf7eed3b9905aaf6af2a0269162504b161eb9f52ecffa4abbc4cb5ff80069b07c214cf73b4f5ff2e1d00da8bddede2c5
@@ -64,6 +64,73 @@ module GroupDocsViewerCloud
64
64
  return new(config)
65
65
  end
66
66
 
67
+ # Converts input document file to format specified
68
+ #
69
+ # @param request convert_and_download_request
70
+ # @return [File]
71
+ def convert_and_download(request)
72
+ data, _status_code, _headers = convert_and_download_with_http_info(request)
73
+ data
74
+ end
75
+
76
+ # Converts input document file to format specified
77
+ #
78
+ # @param request convert_and_download_request
79
+ # @return [Array<(File, Fixnum, Hash)>]
80
+ # File data, response status code and response headers
81
+ def convert_and_download_with_http_info(request)
82
+ raise ArgumentError, 'Incorrect request type' unless request.is_a? ConvertAndDownloadRequest
83
+
84
+ @api_client.config.logger.debug 'Calling API: ViewApi.convert_and_download ...' if @api_client.config.debugging
85
+ # verify the required parameter 'format' is set
86
+ raise ArgumentError, 'Missing the required parameter format when calling ViewApi.convert_and_download' if @api_client.config.client_side_validation && request.format.nil?
87
+ # verify the required parameter 'file' is set
88
+ raise ArgumentError, 'Missing the required parameter file when calling ViewApi.convert_and_download' if @api_client.config.client_side_validation && request.file.nil?
89
+ # resource path
90
+ local_var_path = '/viewer/convertAndDownload'
91
+
92
+ # query parameters
93
+ query_params = {}
94
+ query_params[downcase_first_letter('format')] = request.format
95
+
96
+ if local_var_path.include? ('{' + downcase_first_letter('pages') + '}')
97
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('pages') + '}', request.pages.to_s)
98
+ else
99
+ query_params[downcase_first_letter('pages')] = request.pages unless request.pages.nil?
100
+ end
101
+ if local_var_path.include? ('{' + downcase_first_letter('password') + '}')
102
+ local_var_path = local_var_path.sub('{' + downcase_first_letter('password') + '}', request.password.to_s)
103
+ else
104
+ query_params[downcase_first_letter('password')] = request.password unless request.password.nil?
105
+ end
106
+
107
+ # header parameters
108
+ header_params = {}
109
+ # HTTP header 'Accept' (if needed)
110
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
111
+ # HTTP header 'Content-Type'
112
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
113
+
114
+ # form parameters
115
+ form_params = {}
116
+ form_params[downcase_first_letter('File')] = request.file
117
+
118
+ # http body (model)
119
+ post_body = nil
120
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
121
+ header_params: header_params,
122
+ query_params: query_params,
123
+ form_params: form_params,
124
+ body: post_body,
125
+ access_token: get_access_token,
126
+ return_type: 'File')
127
+ if @api_client.config.debugging
128
+ @api_client.config.logger.debug "API called:
129
+ ViewApi#convert_and_download\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
130
+ end
131
+ [data, status_code, headers]
132
+ end
133
+
67
134
  # Render document pages
68
135
  #
69
136
  # @param request create_view_request
@@ -220,6 +287,63 @@ module GroupDocsViewerCloud
220
287
  end
221
288
  end
222
289
  end
290
+ end
291
+ #
292
+ # --------------------------------------------------------------------------------------------------------------------
293
+ # <copyright company="Aspose Pty Ltd" file="convert_and_download_request.rb">
294
+ # Copyright (c) 2003-2024 Aspose Pty Ltd
295
+ # </copyright>
296
+ # <summary>
297
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
298
+ # of this software and associated documentation files (the "Software"), to deal
299
+ # in the Software without restriction, including without limitation the rights
300
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
301
+ # copies of the Software, and to permit persons to whom the Software is
302
+ # furnished to do so, subject to the following conditions:
303
+ #
304
+ # The above copyright notice and this permission notice shall be included in all
305
+ # copies or substantial portions of the Software.
306
+ #
307
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
308
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
309
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
310
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
311
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
312
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
313
+ # SOFTWARE.
314
+ # </summary>
315
+ # --------------------------------------------------------------------------------------------------------------------
316
+ #
317
+
318
+ module GroupDocsViewerCloud
319
+
320
+ #
321
+ # Request model for convert_and_download operation.
322
+ #
323
+ class ConvertAndDownloadRequest
324
+
325
+ # Requested conversion format: HTML, JPG, PNG or PDF
326
+ attr_accessor :format
327
+ # Input file to convert
328
+ attr_accessor :file
329
+ # Pages range to render, like \"1,2\" or \"3-5,10\"
330
+ attr_accessor :pages
331
+ # Input document password
332
+ attr_accessor :password
333
+
334
+ #
335
+ # Initializes a new instance.
336
+ # @param format Requested conversion format: HTML, JPG, PNG or PDF
337
+ # @param file Input file to convert
338
+ # @param pages Pages range to render, like \"1,2\" or \"3-5,10\"
339
+ # @param password Input document password
340
+ def initialize(format, file, pages = nil, password = nil)
341
+ self.format = format
342
+ self.file = file
343
+ self.pages = pages
344
+ self.password = password
345
+ end
346
+ end
223
347
  end
224
348
  #
225
349
  # --------------------------------------------------------------------------------------------------------------------
@@ -0,0 +1,244 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="api_error.rb">
4
+ # Copyright (c) 2003-2024 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
+
32
+ class ApiError
33
+ attr_accessor :code
34
+ attr_accessor :message
35
+ attr_accessor :description
36
+ attr_accessor :date_time
37
+ attr_accessor :inner_error
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ :'code' => :'Code',
43
+ :'message' => :'Message',
44
+ :'description' => :'Description',
45
+ :'date_time' => :'DateTime',
46
+ :'inner_error' => :'InnerError'
47
+ }
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.swagger_types
52
+ {
53
+ :'code' => :'String',
54
+ :'message' => :'String',
55
+ :'description' => :'String',
56
+ :'date_time' => :'DateTime',
57
+ :'inner_error' => :'ApiError'
58
+ }
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ return unless attributes.is_a?(Hash)
65
+
66
+ # convert string to symbol for hash key
67
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
68
+
69
+ if attributes.key?(:'Code')
70
+ self.code = attributes[:'Code']
71
+ end
72
+
73
+ if attributes.key?(:'Message')
74
+ self.message = attributes[:'Message']
75
+ end
76
+
77
+ if attributes.key?(:'Description')
78
+ self.description = attributes[:'Description']
79
+ end
80
+
81
+ if attributes.key?(:'DateTime')
82
+ self.date_time = attributes[:'DateTime']
83
+ end
84
+
85
+ if attributes.key?(:'InnerError')
86
+ self.inner_error = attributes[:'InnerError']
87
+ end
88
+
89
+ end
90
+
91
+ # Show invalid properties with the reasons. Usually used together with valid?
92
+ # @return Array for valid properies with the reasons
93
+ def list_invalid_properties
94
+ invalid_properties = []
95
+ return invalid_properties
96
+ end
97
+
98
+ # Check to see if the all the properties in the model are valid
99
+ # @return true if the model is valid
100
+ def valid?
101
+ return true
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(other)
107
+ return true if self.equal?(other)
108
+ self.class == other.class &&
109
+ code == other.code &&
110
+ message == other.message &&
111
+ description == other.description &&
112
+ date_time == other.date_time &&
113
+ inner_error == other.inner_error
114
+ end
115
+
116
+ # @see the `==` method
117
+ # @param [Object] Object to be compared
118
+ def eql?(other)
119
+ self == other
120
+ end
121
+
122
+ # Calculates hash code according to all attributes.
123
+ # @return [Fixnum] Hash code
124
+ def hash
125
+ [code, message, description, date_time, inner_error].hash
126
+ end
127
+
128
+ # Downcases first letter.
129
+ # @return downcased string
130
+ def uncap(str)
131
+ str[0, 1].downcase + str[1..-1]
132
+ end
133
+
134
+ # Builds the object from hash
135
+ # @param [Hash] attributes Model attributes in the form of hash
136
+ # @return [Object] Returns the model itself
137
+ def build_from_hash(attributes)
138
+ return nil unless attributes.is_a?(Hash)
139
+ self.class.swagger_types.each_pair do |key, type|
140
+ pname = uncap(self.class.attribute_map[key]).intern
141
+ value = attributes[pname]
142
+ if type =~ /\AArray<(.*)>/i
143
+ # check to ensure the input is an array given that the the attribute
144
+ # is documented as an array but the input is not
145
+ if value.is_a?(Array)
146
+ self.send("#{key}=", value.map { |v| _deserialize($1, v) })
147
+ end
148
+ elsif !value.nil?
149
+ self.send("#{key}=", _deserialize(type, value))
150
+ end
151
+ # or else data not found in attributes(hash), not an issue as the data can be optional
152
+ end
153
+
154
+ self
155
+ end
156
+
157
+ # Deserializes the data based on type
158
+ # @param string type Data type
159
+ # @param string value Value to be deserialized
160
+ # @return [Object] Deserialized data
161
+ def _deserialize(type, value)
162
+ case type.to_sym
163
+ when :DateTime
164
+ Date.parse value
165
+ when :Date
166
+ Date.parse value
167
+ when :String
168
+ value.to_s
169
+ when :Integer
170
+ value.to_i
171
+ when :Float
172
+ value.to_f
173
+ when :BOOLEAN
174
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
175
+ true
176
+ else
177
+ false
178
+ end
179
+ when :Object
180
+ # generic object (usually a Hash), return directly
181
+ value
182
+ when /\AArray<(?<inner_type>.+)>\z/
183
+ inner_type = Regexp.last_match[:inner_type]
184
+ value.map { |v| _deserialize(inner_type, v) }
185
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
186
+ k_type = Regexp.last_match[:k_type]
187
+ v_type = Regexp.last_match[:v_type]
188
+ {}.tap do |hash|
189
+ value.each do |k, v|
190
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
191
+ end
192
+ end
193
+ else
194
+ # model
195
+ temp_model = GroupDocsViewerCloud.const_get(type).new
196
+ temp_model.build_from_hash(value)
197
+ end
198
+ end
199
+
200
+ # Returns the string representation of the object
201
+ # @return [String] String presentation of the object
202
+ def to_s
203
+ to_hash.to_s
204
+ end
205
+
206
+ # to_body is an alias to to_hash (backward compatibility)
207
+ # @return [Hash] Returns the object in the form of hash
208
+ def to_body
209
+ to_hash
210
+ end
211
+
212
+ # Returns the object in the form of hash
213
+ # @return [Hash] Returns the object in the form of hash
214
+ def to_hash
215
+ hash = {}
216
+ self.class.attribute_map.each_pair do |attr, param|
217
+ value = self.send(attr)
218
+ next if value.nil?
219
+ hash[param] = _to_hash(value)
220
+ end
221
+ hash
222
+ end
223
+
224
+ # Outputs non-array value in the form of hash
225
+ # For object, use to_hash. Otherwise, just return the value
226
+ # @param [Object] value Any valid value
227
+ # @return [Hash] Returns the value in the form of hash
228
+ def _to_hash(value)
229
+ if value.is_a?(Array)
230
+ value.compact.map { |v| _to_hash(v) }
231
+ elsif value.is_a?(Hash)
232
+ {}.tap do |hash|
233
+ value.each { |k, v| hash[k] = _to_hash(v) }
234
+ end
235
+ elsif value.respond_to? :to_hash
236
+ value.to_hash
237
+ else
238
+ value
239
+ end
240
+ end
241
+
242
+ end
243
+
244
+ end
@@ -0,0 +1,220 @@
1
+ #
2
+ # --------------------------------------------------------------------------------------------------------------------
3
+ # <copyright company="Aspose Pty Ltd" file="api_error_response.rb">
4
+ # Copyright (c) 2003-2024 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
+
32
+ class ApiErrorResponse
33
+ attr_accessor :request_id
34
+ attr_accessor :error
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'request_id' => :'RequestId',
40
+ :'error' => :'Error'
41
+ }
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.swagger_types
46
+ {
47
+ :'request_id' => :'String',
48
+ :'error' => :'ApiError'
49
+ }
50
+ end
51
+
52
+ # Initializes the object
53
+ # @param [Hash] attributes Model attributes in the form of hash
54
+ def initialize(attributes = {})
55
+ return unless attributes.is_a?(Hash)
56
+
57
+ # convert string to symbol for hash key
58
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
59
+
60
+ if attributes.key?(:'RequestId')
61
+ self.request_id = attributes[:'RequestId']
62
+ end
63
+
64
+ if attributes.key?(:'Error')
65
+ self.error = attributes[:'Error']
66
+ end
67
+
68
+ end
69
+
70
+ # Show invalid properties with the reasons. Usually used together with valid?
71
+ # @return Array for valid properies with the reasons
72
+ def list_invalid_properties
73
+ invalid_properties = []
74
+ return invalid_properties
75
+ end
76
+
77
+ # Check to see if the all the properties in the model are valid
78
+ # @return true if the model is valid
79
+ def valid?
80
+ return true
81
+ end
82
+
83
+ # Checks equality by comparing each attribute.
84
+ # @param [Object] Object to be compared
85
+ def ==(other)
86
+ return true if self.equal?(other)
87
+ self.class == other.class &&
88
+ request_id == other.request_id &&
89
+ error == other.error
90
+ end
91
+
92
+ # @see the `==` method
93
+ # @param [Object] Object to be compared
94
+ def eql?(other)
95
+ self == other
96
+ end
97
+
98
+ # Calculates hash code according to all attributes.
99
+ # @return [Fixnum] Hash code
100
+ def hash
101
+ [request_id, error].hash
102
+ end
103
+
104
+ # Downcases first letter.
105
+ # @return downcased string
106
+ def uncap(str)
107
+ str[0, 1].downcase + str[1..-1]
108
+ end
109
+
110
+ # Builds the object from hash
111
+ # @param [Hash] attributes Model attributes in the form of hash
112
+ # @return [Object] Returns the model itself
113
+ def build_from_hash(attributes)
114
+ return nil unless attributes.is_a?(Hash)
115
+ self.class.swagger_types.each_pair do |key, type|
116
+ pname = uncap(self.class.attribute_map[key]).intern
117
+ value = attributes[pname]
118
+ if type =~ /\AArray<(.*)>/i
119
+ # check to ensure the input is an array given that the the attribute
120
+ # is documented as an array but the input is not
121
+ if value.is_a?(Array)
122
+ self.send("#{key}=", value.map { |v| _deserialize($1, v) })
123
+ end
124
+ elsif !value.nil?
125
+ self.send("#{key}=", _deserialize(type, value))
126
+ end
127
+ # or else data not found in attributes(hash), not an issue as the data can be optional
128
+ end
129
+
130
+ self
131
+ end
132
+
133
+ # Deserializes the data based on type
134
+ # @param string type Data type
135
+ # @param string value Value to be deserialized
136
+ # @return [Object] Deserialized data
137
+ def _deserialize(type, value)
138
+ case type.to_sym
139
+ when :DateTime
140
+ Date.parse value
141
+ when :Date
142
+ Date.parse value
143
+ when :String
144
+ value.to_s
145
+ when :Integer
146
+ value.to_i
147
+ when :Float
148
+ value.to_f
149
+ when :BOOLEAN
150
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
151
+ true
152
+ else
153
+ false
154
+ end
155
+ when :Object
156
+ # generic object (usually a Hash), return directly
157
+ value
158
+ when /\AArray<(?<inner_type>.+)>\z/
159
+ inner_type = Regexp.last_match[:inner_type]
160
+ value.map { |v| _deserialize(inner_type, v) }
161
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
162
+ k_type = Regexp.last_match[:k_type]
163
+ v_type = Regexp.last_match[:v_type]
164
+ {}.tap do |hash|
165
+ value.each do |k, v|
166
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
167
+ end
168
+ end
169
+ else
170
+ # model
171
+ temp_model = GroupDocsViewerCloud.const_get(type).new
172
+ temp_model.build_from_hash(value)
173
+ end
174
+ end
175
+
176
+ # Returns the string representation of the object
177
+ # @return [String] String presentation of the object
178
+ def to_s
179
+ to_hash.to_s
180
+ end
181
+
182
+ # to_body is an alias to to_hash (backward compatibility)
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_body
185
+ to_hash
186
+ end
187
+
188
+ # Returns the object in the form of hash
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_hash
191
+ hash = {}
192
+ self.class.attribute_map.each_pair do |attr, param|
193
+ value = self.send(attr)
194
+ next if value.nil?
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ # Outputs non-array value in the form of hash
201
+ # For object, use to_hash. Otherwise, just return the value
202
+ # @param [Object] value Any valid value
203
+ # @return [Hash] Returns the value in the form of hash
204
+ def _to_hash(value)
205
+ if value.is_a?(Array)
206
+ value.compact.map { |v| _to_hash(v) }
207
+ elsif value.is_a?(Hash)
208
+ {}.tap do |hash|
209
+ value.each { |k, v| hash[k] = _to_hash(v) }
210
+ end
211
+ elsif value.respond_to? :to_hash
212
+ value.to_hash
213
+ else
214
+ value
215
+ end
216
+ end
217
+
218
+ end
219
+
220
+ end
@@ -48,6 +48,15 @@ module GroupDocsViewerCloud
48
48
 
49
49
  # When this option is set to true, the text is rendered as an image in the output HTML. Enable this option to make text unselectable or to fix characters rendering and make HTML look like PDF. The default value is false. This option is supported when rendering into HTML.
50
50
  attr_accessor :render_text_as_image
51
+
52
+ # Enables rendering the PDF and EPUB documents to HTML with a fixed layout.
53
+ attr_accessor :fixed_layout
54
+
55
+ # Enables wrapping each image in the output HTML document in SVG tag to improve the output quality.
56
+ attr_accessor :wrap_images_in_svg
57
+
58
+ # Disables any license restrictions for all fonts in the current XPS/OXPS document.
59
+ attr_accessor :disable_font_license_verifications
51
60
  class EnumAttributeValidator
52
61
  attr_reader :datatype
53
62
  attr_reader :allowable_values
@@ -78,7 +87,10 @@ module GroupDocsViewerCloud
78
87
  :'enable_font_hinting' => :'EnableFontHinting',
79
88
  :'render_original_page_size' => :'RenderOriginalPageSize',
80
89
  :'image_quality' => :'ImageQuality',
81
- :'render_text_as_image' => :'RenderTextAsImage'
90
+ :'render_text_as_image' => :'RenderTextAsImage',
91
+ :'fixed_layout' => :'FixedLayout',
92
+ :'wrap_images_in_svg' => :'WrapImagesInSvg',
93
+ :'disable_font_license_verifications' => :'DisableFontLicenseVerifications'
82
94
  }
83
95
  end
84
96
 
@@ -90,7 +102,10 @@ module GroupDocsViewerCloud
90
102
  :'enable_font_hinting' => :'BOOLEAN',
91
103
  :'render_original_page_size' => :'BOOLEAN',
92
104
  :'image_quality' => :'String',
93
- :'render_text_as_image' => :'BOOLEAN'
105
+ :'render_text_as_image' => :'BOOLEAN',
106
+ :'fixed_layout' => :'BOOLEAN',
107
+ :'wrap_images_in_svg' => :'BOOLEAN',
108
+ :'disable_font_license_verifications' => :'BOOLEAN'
94
109
  }
95
110
  end
96
111
 
@@ -126,6 +141,18 @@ module GroupDocsViewerCloud
126
141
  self.render_text_as_image = attributes[:'RenderTextAsImage']
127
142
  end
128
143
 
144
+ if attributes.key?(:'FixedLayout')
145
+ self.fixed_layout = attributes[:'FixedLayout']
146
+ end
147
+
148
+ if attributes.key?(:'WrapImagesInSvg')
149
+ self.wrap_images_in_svg = attributes[:'WrapImagesInSvg']
150
+ end
151
+
152
+ if attributes.key?(:'DisableFontLicenseVerifications')
153
+ self.disable_font_license_verifications = attributes[:'DisableFontLicenseVerifications']
154
+ end
155
+
129
156
  end
130
157
 
131
158
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -156,6 +183,18 @@ module GroupDocsViewerCloud
156
183
  invalid_properties.push("invalid value for 'render_text_as_image', render_text_as_image cannot be nil.")
157
184
  end
158
185
 
186
+ if @fixed_layout.nil?
187
+ invalid_properties.push("invalid value for 'fixed_layout', fixed_layout cannot be nil.")
188
+ end
189
+
190
+ if @wrap_images_in_svg.nil?
191
+ invalid_properties.push("invalid value for 'wrap_images_in_svg', wrap_images_in_svg cannot be nil.")
192
+ end
193
+
194
+ if @disable_font_license_verifications.nil?
195
+ invalid_properties.push("invalid value for 'disable_font_license_verifications', disable_font_license_verifications cannot be nil.")
196
+ end
197
+
159
198
  return invalid_properties
160
199
  end
161
200
 
@@ -170,6 +209,9 @@ module GroupDocsViewerCloud
170
209
  image_quality_validator = EnumAttributeValidator.new('String', ["Low", "Medium", "High"])
171
210
  return false unless image_quality_validator.valid?(@image_quality)
172
211
  return false if @render_text_as_image.nil?
212
+ return false if @fixed_layout.nil?
213
+ return false if @wrap_images_in_svg.nil?
214
+ return false if @disable_font_license_verifications.nil?
173
215
  return true
174
216
  end
175
217
 
@@ -197,7 +239,10 @@ module GroupDocsViewerCloud
197
239
  enable_font_hinting == other.enable_font_hinting &&
198
240
  render_original_page_size == other.render_original_page_size &&
199
241
  image_quality == other.image_quality &&
200
- render_text_as_image == other.render_text_as_image
242
+ render_text_as_image == other.render_text_as_image &&
243
+ fixed_layout == other.fixed_layout &&
244
+ wrap_images_in_svg == other.wrap_images_in_svg &&
245
+ disable_font_license_verifications == other.disable_font_license_verifications
201
246
  end
202
247
 
203
248
  # @see the `==` method
@@ -209,7 +254,7 @@ module GroupDocsViewerCloud
209
254
  # Calculates hash code according to all attributes.
210
255
  # @return [Fixnum] Hash code
211
256
  def hash
212
- [disable_chars_grouping, enable_layered_rendering, enable_font_hinting, render_original_page_size, image_quality, render_text_as_image].hash
257
+ [disable_chars_grouping, enable_layered_rendering, enable_font_hinting, render_original_page_size, image_quality, render_text_as_image, fixed_layout, wrap_images_in_svg, disable_font_license_verifications].hash
213
258
  end
214
259
 
215
260
  # Downcases first letter.
@@ -109,16 +109,16 @@ module GroupDocsViewerCloud
109
109
  # Contains options for rendering documents into PDF format.
110
110
  attr_accessor :pdf_optimization_options
111
111
 
112
- # Max width of an output image in pixels. (When converting single image to HTML only)
112
+ # Max width of an output image in pixels. (When converting single image to PDF only)
113
113
  attr_accessor :image_max_width
114
114
 
115
- # Max height of an output image in pixels. (When converting single image to HTML only)
115
+ # Max height of an output image in pixels. (When converting single image to PDF only)
116
116
  attr_accessor :image_max_height
117
117
 
118
- # The width of the output image in pixels. (When converting single image to HTML only)
118
+ # The width of the output image in pixels. (When converting single image to PDF only)
119
119
  attr_accessor :image_width
120
120
 
121
- # The height of an output image in pixels. (When converting single image to HTML only)
121
+ # The height of an output image in pixels. (When converting single image to PDF only)
122
122
  attr_accessor :image_height
123
123
 
124
124
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -25,5 +25,5 @@
25
25
  # --------------------------------------------------------------------------------------------------------------------
26
26
  #
27
27
  module GroupDocsViewerCloud
28
- VERSION = "24.2".freeze
28
+ VERSION = "24.3".freeze
29
29
  end
@@ -30,6 +30,8 @@ require_relative 'groupdocs_viewer_cloud/version'
30
30
  require_relative 'groupdocs_viewer_cloud/configuration'
31
31
 
32
32
  # Models
33
+ require_relative 'groupdocs_viewer_cloud/models/api_error'
34
+ require_relative 'groupdocs_viewer_cloud/models/api_error_response'
33
35
  require_relative 'groupdocs_viewer_cloud/models/archive_options'
34
36
  require_relative 'groupdocs_viewer_cloud/models/archive_view_info'
35
37
  require_relative 'groupdocs_viewer_cloud/models/attachment_info'
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: '24.2'
4
+ version: '24.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - GroupDocs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-01 00:00:00.000000000 Z
11
+ date: 2024-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -80,6 +80,8 @@ files:
80
80
  - lib/groupdocs_viewer_cloud/api_client.rb
81
81
  - lib/groupdocs_viewer_cloud/api_client_error.rb
82
82
  - lib/groupdocs_viewer_cloud/configuration.rb
83
+ - lib/groupdocs_viewer_cloud/models/api_error.rb
84
+ - lib/groupdocs_viewer_cloud/models/api_error_response.rb
83
85
  - lib/groupdocs_viewer_cloud/models/archive_options.rb
84
86
  - lib/groupdocs_viewer_cloud/models/archive_view_info.rb
85
87
  - lib/groupdocs_viewer_cloud/models/attachment_info.rb