groupdocs_viewer_cloud 23.10 → 24.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/groupdocs_viewer_cloud/api/file_api.rb +6 -6
- data/lib/groupdocs_viewer_cloud/api/folder_api.rb +6 -6
- data/lib/groupdocs_viewer_cloud/api/info_api.rb +2 -2
- data/lib/groupdocs_viewer_cloud/api/license_api.rb +1 -1
- data/lib/groupdocs_viewer_cloud/api/storage_api.rb +5 -5
- data/lib/groupdocs_viewer_cloud/api/view_api.rb +3 -3
- data/lib/groupdocs_viewer_cloud/api_client.rb +4 -5
- data/lib/groupdocs_viewer_cloud/{api_error.rb → api_client_error.rb} +5 -5
- data/lib/groupdocs_viewer_cloud/configuration.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/archive_options.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/archive_view_info.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/attachment_info.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/attachment_view.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/cad_options.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/cad_view_info.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/character.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/consumption_result.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/delete_view_options.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/disc_usage.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/email_options.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/error.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/error_details.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/field_label.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/file_info.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/file_version.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/file_versions.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/files_list.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/files_upload_result.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/format.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/formats_result.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/html_options.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/html_resource.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/image_options.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/info_result.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/layer.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/layout.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/line.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/mail_storage_options.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/object_exist.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/outlook_options.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/outlook_view_info.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/page_info.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/page_rotation.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/page_view.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/pdf_document_options.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/pdf_optimization_options.rb +354 -0
- data/lib/groupdocs_viewer_cloud/models/pdf_options.rb +12 -17
- data/lib/groupdocs_viewer_cloud/models/pdf_view_info.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/project_management_options.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/project_management_view_info.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/render_options.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/resource.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/spreadsheet_options.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/storage_exist.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/storage_file.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/text_element.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/text_options.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/tile.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/view_options.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/view_result.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/visio_rendering_options.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/watermark.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/web_document_options.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/word.rb +1 -1
- data/lib/groupdocs_viewer_cloud/models/word_processing_options.rb +1 -1
- data/lib/groupdocs_viewer_cloud/version.rb +2 -2
- data/lib/groupdocs_viewer_cloud.rb +3 -2
- metadata +8 -8
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="page_rotation.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2024 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="page_view.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2024 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="pdf_document_options.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2024 Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -0,0 +1,354 @@
|
|
1
|
+
#
|
2
|
+
# --------------------------------------------------------------------------------------------------------------------
|
3
|
+
# <copyright company="Aspose Pty Ltd" file="pdf_optimization_options.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
|
+
# Contains the PDF optimization options to apply to the output PDF file.
|
32
|
+
class PdfOptimizationOptions
|
33
|
+
|
34
|
+
# Enables optimization the output PDF file for viewing online with a web browser. This optimization allows a browser to display the first pages of a PDF file when you open the document, instead of waiting for the entire file to download.
|
35
|
+
attr_accessor :lineriaze
|
36
|
+
|
37
|
+
# Enables removing annotation from the output PDF file.
|
38
|
+
attr_accessor :remove_annotations
|
39
|
+
|
40
|
+
# Enables removing form fields from a PDF file.
|
41
|
+
attr_accessor :remove_form_fields
|
42
|
+
|
43
|
+
# Enables converting the output PDF file to a grayscale.
|
44
|
+
attr_accessor :convert_to_gray_scale
|
45
|
+
|
46
|
+
# Subsets fonts in the output PDF file. If the file uses embedded fonts, it contains all font data. GroupDocs.Viewer can subset embedded fonts to reduce the file size.
|
47
|
+
attr_accessor :subset_fonts
|
48
|
+
|
49
|
+
# Enables compressing images in the output PDF file. Use this option to allow other compressing options: PdfOptimizationOptions.ImageQuality and PdfOptimizationOptions.MaxResolution.
|
50
|
+
attr_accessor :compress_images
|
51
|
+
|
52
|
+
# Sets the image quality in the output PDF file (in percent). To change the image quality, first set the PdfOptimizationOptions.CompressImages property to true.
|
53
|
+
attr_accessor :image_quality
|
54
|
+
|
55
|
+
# Enables setting the maximum resolution in the output PDF file. To allow this option, set the GroupDocs.Viewer.Options.PdfOptimizationOptions.CompressImages property to true. This option allows setting the GroupDocs.Viewer.Options.PdfOptimizationOptions.MaxResolution property.
|
56
|
+
attr_accessor :resize_images
|
57
|
+
|
58
|
+
# Sets the maximum resolution in the output PDF file. To allow this option, set the GroupDocs.Viewer.Options.PdfOptimizationOptions.CompressImages and GroupDocs.Viewer.Options.PdfOptimizationOptions.MaxResolution properties to true. The default value is 300.
|
59
|
+
attr_accessor :max_resolution
|
60
|
+
|
61
|
+
# Enables optimization of spreadsheets in the PDF files. This optimization allows to reduce the output file size by setting up border lines. Besides that, it removes the Arial and Times New Roman characters of 32-127 codes.
|
62
|
+
attr_accessor :optimize_spreadsheets
|
63
|
+
|
64
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
65
|
+
def self.attribute_map
|
66
|
+
{
|
67
|
+
:'lineriaze' => :'Lineriaze',
|
68
|
+
:'remove_annotations' => :'RemoveAnnotations',
|
69
|
+
:'remove_form_fields' => :'RemoveFormFields',
|
70
|
+
:'convert_to_gray_scale' => :'ConvertToGrayScale',
|
71
|
+
:'subset_fonts' => :'SubsetFonts',
|
72
|
+
:'compress_images' => :'CompressImages',
|
73
|
+
:'image_quality' => :'ImageQuality',
|
74
|
+
:'resize_images' => :'ResizeImages',
|
75
|
+
:'max_resolution' => :'MaxResolution',
|
76
|
+
:'optimize_spreadsheets' => :'OptimizeSpreadsheets'
|
77
|
+
}
|
78
|
+
end
|
79
|
+
|
80
|
+
# Attribute type mapping.
|
81
|
+
def self.swagger_types
|
82
|
+
{
|
83
|
+
:'lineriaze' => :'BOOLEAN',
|
84
|
+
:'remove_annotations' => :'BOOLEAN',
|
85
|
+
:'remove_form_fields' => :'BOOLEAN',
|
86
|
+
:'convert_to_gray_scale' => :'BOOLEAN',
|
87
|
+
:'subset_fonts' => :'BOOLEAN',
|
88
|
+
:'compress_images' => :'BOOLEAN',
|
89
|
+
:'image_quality' => :'Integer',
|
90
|
+
:'resize_images' => :'BOOLEAN',
|
91
|
+
:'max_resolution' => :'Integer',
|
92
|
+
:'optimize_spreadsheets' => :'BOOLEAN'
|
93
|
+
}
|
94
|
+
end
|
95
|
+
|
96
|
+
# Initializes the object
|
97
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
98
|
+
def initialize(attributes = {})
|
99
|
+
return unless attributes.is_a?(Hash)
|
100
|
+
|
101
|
+
# convert string to symbol for hash key
|
102
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
103
|
+
|
104
|
+
if attributes.key?(:'Lineriaze')
|
105
|
+
self.lineriaze = attributes[:'Lineriaze']
|
106
|
+
end
|
107
|
+
|
108
|
+
if attributes.key?(:'RemoveAnnotations')
|
109
|
+
self.remove_annotations = attributes[:'RemoveAnnotations']
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes.key?(:'RemoveFormFields')
|
113
|
+
self.remove_form_fields = attributes[:'RemoveFormFields']
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.key?(:'ConvertToGrayScale')
|
117
|
+
self.convert_to_gray_scale = attributes[:'ConvertToGrayScale']
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.key?(:'SubsetFonts')
|
121
|
+
self.subset_fonts = attributes[:'SubsetFonts']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.key?(:'CompressImages')
|
125
|
+
self.compress_images = attributes[:'CompressImages']
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes.key?(:'ImageQuality')
|
129
|
+
self.image_quality = attributes[:'ImageQuality']
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.key?(:'ResizeImages')
|
133
|
+
self.resize_images = attributes[:'ResizeImages']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.key?(:'MaxResolution')
|
137
|
+
self.max_resolution = attributes[:'MaxResolution']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.key?(:'OptimizeSpreadsheets')
|
141
|
+
self.optimize_spreadsheets = attributes[:'OptimizeSpreadsheets']
|
142
|
+
end
|
143
|
+
|
144
|
+
end
|
145
|
+
|
146
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
147
|
+
# @return Array for valid properies with the reasons
|
148
|
+
def list_invalid_properties
|
149
|
+
invalid_properties = []
|
150
|
+
if @lineriaze.nil?
|
151
|
+
invalid_properties.push("invalid value for 'lineriaze', lineriaze cannot be nil.")
|
152
|
+
end
|
153
|
+
|
154
|
+
if @remove_annotations.nil?
|
155
|
+
invalid_properties.push("invalid value for 'remove_annotations', remove_annotations cannot be nil.")
|
156
|
+
end
|
157
|
+
|
158
|
+
if @remove_form_fields.nil?
|
159
|
+
invalid_properties.push("invalid value for 'remove_form_fields', remove_form_fields cannot be nil.")
|
160
|
+
end
|
161
|
+
|
162
|
+
if @convert_to_gray_scale.nil?
|
163
|
+
invalid_properties.push("invalid value for 'convert_to_gray_scale', convert_to_gray_scale cannot be nil.")
|
164
|
+
end
|
165
|
+
|
166
|
+
if @subset_fonts.nil?
|
167
|
+
invalid_properties.push("invalid value for 'subset_fonts', subset_fonts cannot be nil.")
|
168
|
+
end
|
169
|
+
|
170
|
+
if @compress_images.nil?
|
171
|
+
invalid_properties.push("invalid value for 'compress_images', compress_images cannot be nil.")
|
172
|
+
end
|
173
|
+
|
174
|
+
if @image_quality.nil?
|
175
|
+
invalid_properties.push("invalid value for 'image_quality', image_quality cannot be nil.")
|
176
|
+
end
|
177
|
+
|
178
|
+
if @resize_images.nil?
|
179
|
+
invalid_properties.push("invalid value for 'resize_images', resize_images cannot be nil.")
|
180
|
+
end
|
181
|
+
|
182
|
+
if @max_resolution.nil?
|
183
|
+
invalid_properties.push("invalid value for 'max_resolution', max_resolution cannot be nil.")
|
184
|
+
end
|
185
|
+
|
186
|
+
if @optimize_spreadsheets.nil?
|
187
|
+
invalid_properties.push("invalid value for 'optimize_spreadsheets', optimize_spreadsheets cannot be nil.")
|
188
|
+
end
|
189
|
+
|
190
|
+
return invalid_properties
|
191
|
+
end
|
192
|
+
|
193
|
+
# Check to see if the all the properties in the model are valid
|
194
|
+
# @return true if the model is valid
|
195
|
+
def valid?
|
196
|
+
return false if @lineriaze.nil?
|
197
|
+
return false if @remove_annotations.nil?
|
198
|
+
return false if @remove_form_fields.nil?
|
199
|
+
return false if @convert_to_gray_scale.nil?
|
200
|
+
return false if @subset_fonts.nil?
|
201
|
+
return false if @compress_images.nil?
|
202
|
+
return false if @image_quality.nil?
|
203
|
+
return false if @resize_images.nil?
|
204
|
+
return false if @max_resolution.nil?
|
205
|
+
return false if @optimize_spreadsheets.nil?
|
206
|
+
return true
|
207
|
+
end
|
208
|
+
|
209
|
+
# Checks equality by comparing each attribute.
|
210
|
+
# @param [Object] Object to be compared
|
211
|
+
def ==(other)
|
212
|
+
return true if self.equal?(other)
|
213
|
+
self.class == other.class &&
|
214
|
+
lineriaze == other.lineriaze &&
|
215
|
+
remove_annotations == other.remove_annotations &&
|
216
|
+
remove_form_fields == other.remove_form_fields &&
|
217
|
+
convert_to_gray_scale == other.convert_to_gray_scale &&
|
218
|
+
subset_fonts == other.subset_fonts &&
|
219
|
+
compress_images == other.compress_images &&
|
220
|
+
image_quality == other.image_quality &&
|
221
|
+
resize_images == other.resize_images &&
|
222
|
+
max_resolution == other.max_resolution &&
|
223
|
+
optimize_spreadsheets == other.optimize_spreadsheets
|
224
|
+
end
|
225
|
+
|
226
|
+
# @see the `==` method
|
227
|
+
# @param [Object] Object to be compared
|
228
|
+
def eql?(other)
|
229
|
+
self == other
|
230
|
+
end
|
231
|
+
|
232
|
+
# Calculates hash code according to all attributes.
|
233
|
+
# @return [Fixnum] Hash code
|
234
|
+
def hash
|
235
|
+
[lineriaze, remove_annotations, remove_form_fields, convert_to_gray_scale, subset_fonts, compress_images, image_quality, resize_images, max_resolution, optimize_spreadsheets].hash
|
236
|
+
end
|
237
|
+
|
238
|
+
# Downcases first letter.
|
239
|
+
# @return downcased string
|
240
|
+
def uncap(str)
|
241
|
+
str[0, 1].downcase + str[1..-1]
|
242
|
+
end
|
243
|
+
|
244
|
+
# Builds the object from hash
|
245
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
246
|
+
# @return [Object] Returns the model itself
|
247
|
+
def build_from_hash(attributes)
|
248
|
+
return nil unless attributes.is_a?(Hash)
|
249
|
+
self.class.swagger_types.each_pair do |key, type|
|
250
|
+
pname = uncap(self.class.attribute_map[key]).intern
|
251
|
+
value = attributes[pname]
|
252
|
+
if type =~ /\AArray<(.*)>/i
|
253
|
+
# check to ensure the input is an array given that the the attribute
|
254
|
+
# is documented as an array but the input is not
|
255
|
+
if value.is_a?(Array)
|
256
|
+
self.send("#{key}=", value.map { |v| _deserialize($1, v) })
|
257
|
+
end
|
258
|
+
elsif !value.nil?
|
259
|
+
self.send("#{key}=", _deserialize(type, value))
|
260
|
+
end
|
261
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
262
|
+
end
|
263
|
+
|
264
|
+
self
|
265
|
+
end
|
266
|
+
|
267
|
+
# Deserializes the data based on type
|
268
|
+
# @param string type Data type
|
269
|
+
# @param string value Value to be deserialized
|
270
|
+
# @return [Object] Deserialized data
|
271
|
+
def _deserialize(type, value)
|
272
|
+
case type.to_sym
|
273
|
+
when :DateTime
|
274
|
+
Date.parse value
|
275
|
+
when :Date
|
276
|
+
Date.parse value
|
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
|
304
|
+
# model
|
305
|
+
temp_model = GroupDocsViewerCloud.const_get(type).new
|
306
|
+
temp_model.build_from_hash(value)
|
307
|
+
end
|
308
|
+
end
|
309
|
+
|
310
|
+
# Returns the string representation of the object
|
311
|
+
# @return [String] String presentation of the object
|
312
|
+
def to_s
|
313
|
+
to_hash.to_s
|
314
|
+
end
|
315
|
+
|
316
|
+
# to_body is an alias to to_hash (backward compatibility)
|
317
|
+
# @return [Hash] Returns the object in the form of hash
|
318
|
+
def to_body
|
319
|
+
to_hash
|
320
|
+
end
|
321
|
+
|
322
|
+
# Returns the object in the form of hash
|
323
|
+
# @return [Hash] Returns the object in the form of hash
|
324
|
+
def to_hash
|
325
|
+
hash = {}
|
326
|
+
self.class.attribute_map.each_pair do |attr, param|
|
327
|
+
value = self.send(attr)
|
328
|
+
next if value.nil?
|
329
|
+
hash[param] = _to_hash(value)
|
330
|
+
end
|
331
|
+
hash
|
332
|
+
end
|
333
|
+
|
334
|
+
# Outputs non-array value in the form of hash
|
335
|
+
# For object, use to_hash. Otherwise, just return the value
|
336
|
+
# @param [Object] value Any valid value
|
337
|
+
# @return [Hash] Returns the value in the form of hash
|
338
|
+
def _to_hash(value)
|
339
|
+
if value.is_a?(Array)
|
340
|
+
value.compact.map { |v| _to_hash(v) }
|
341
|
+
elsif value.is_a?(Hash)
|
342
|
+
{}.tap do |hash|
|
343
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
344
|
+
end
|
345
|
+
elsif value.respond_to? :to_hash
|
346
|
+
value.to_hash
|
347
|
+
else
|
348
|
+
value
|
349
|
+
end
|
350
|
+
end
|
351
|
+
|
352
|
+
end
|
353
|
+
|
354
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="pdf_options.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2024 Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
@@ -97,9 +97,6 @@ module GroupDocsViewerCloud
|
|
97
97
|
# This rendering options enables you to customize the appearance of the output HTML/PDF/PNG/JPEG when rendering Web documents.
|
98
98
|
attr_accessor :web_document_options
|
99
99
|
|
100
|
-
# The quality of the JPG images contained by output PDF document; Valid values are between 1 and 100; Default value is 90
|
101
|
-
attr_accessor :jpg_quality
|
102
|
-
|
103
100
|
# The password required to open the PDF document
|
104
101
|
attr_accessor :document_open_password
|
105
102
|
|
@@ -109,6 +106,9 @@ module GroupDocsViewerCloud
|
|
109
106
|
# The array of PDF document permissions. Allowed values are: AllowAll, DenyPrinting, DenyModification, DenyDataExtraction, DenyAll Default value is AllowAll, if now permissions are set.
|
110
107
|
attr_accessor :permissions
|
111
108
|
|
109
|
+
# Contains options for rendering documents into PDF format.
|
110
|
+
attr_accessor :pdf_optimization_options
|
111
|
+
|
112
112
|
# Max width of an output image in pixels. (When converting single image to HTML only)
|
113
113
|
attr_accessor :image_max_width
|
114
114
|
|
@@ -146,10 +146,10 @@ module GroupDocsViewerCloud
|
|
146
146
|
:'mail_storage_options' => :'MailStorageOptions',
|
147
147
|
:'visio_rendering_options' => :'VisioRenderingOptions',
|
148
148
|
:'web_document_options' => :'WebDocumentOptions',
|
149
|
-
:'jpg_quality' => :'JpgQuality',
|
150
149
|
:'document_open_password' => :'DocumentOpenPassword',
|
151
150
|
:'permissions_password' => :'PermissionsPassword',
|
152
151
|
:'permissions' => :'Permissions',
|
152
|
+
:'pdf_optimization_options' => :'PdfOptimizationOptions',
|
153
153
|
:'image_max_width' => :'ImageMaxWidth',
|
154
154
|
:'image_max_height' => :'ImageMaxHeight',
|
155
155
|
:'image_width' => :'ImageWidth',
|
@@ -182,10 +182,10 @@ module GroupDocsViewerCloud
|
|
182
182
|
:'mail_storage_options' => :'MailStorageOptions',
|
183
183
|
:'visio_rendering_options' => :'VisioRenderingOptions',
|
184
184
|
:'web_document_options' => :'WebDocumentOptions',
|
185
|
-
:'jpg_quality' => :'Integer',
|
186
185
|
:'document_open_password' => :'String',
|
187
186
|
:'permissions_password' => :'String',
|
188
187
|
:'permissions' => :'Array<String>',
|
188
|
+
:'pdf_optimization_options' => :'PdfOptimizationOptions',
|
189
189
|
:'image_max_width' => :'Integer',
|
190
190
|
:'image_max_height' => :'Integer',
|
191
191
|
:'image_width' => :'Integer',
|
@@ -293,10 +293,6 @@ module GroupDocsViewerCloud
|
|
293
293
|
self.web_document_options = attributes[:'WebDocumentOptions']
|
294
294
|
end
|
295
295
|
|
296
|
-
if attributes.key?(:'JpgQuality')
|
297
|
-
self.jpg_quality = attributes[:'JpgQuality']
|
298
|
-
end
|
299
|
-
|
300
296
|
if attributes.key?(:'DocumentOpenPassword')
|
301
297
|
self.document_open_password = attributes[:'DocumentOpenPassword']
|
302
298
|
end
|
@@ -311,6 +307,10 @@ module GroupDocsViewerCloud
|
|
311
307
|
end
|
312
308
|
end
|
313
309
|
|
310
|
+
if attributes.key?(:'PdfOptimizationOptions')
|
311
|
+
self.pdf_optimization_options = attributes[:'PdfOptimizationOptions']
|
312
|
+
end
|
313
|
+
|
314
314
|
if attributes.key?(:'ImageMaxWidth')
|
315
315
|
self.image_max_width = attributes[:'ImageMaxWidth']
|
316
316
|
end
|
@@ -353,10 +353,6 @@ module GroupDocsViewerCloud
|
|
353
353
|
invalid_properties.push("invalid value for 'render_hidden_pages', render_hidden_pages cannot be nil.")
|
354
354
|
end
|
355
355
|
|
356
|
-
if @jpg_quality.nil?
|
357
|
-
invalid_properties.push("invalid value for 'jpg_quality', jpg_quality cannot be nil.")
|
358
|
-
end
|
359
|
-
|
360
356
|
if @image_max_width.nil?
|
361
357
|
invalid_properties.push("invalid value for 'image_max_width', image_max_width cannot be nil.")
|
362
358
|
end
|
@@ -384,7 +380,6 @@ module GroupDocsViewerCloud
|
|
384
380
|
return false if @render_comments.nil?
|
385
381
|
return false if @render_notes.nil?
|
386
382
|
return false if @render_hidden_pages.nil?
|
387
|
-
return false if @jpg_quality.nil?
|
388
383
|
return false if @image_max_width.nil?
|
389
384
|
return false if @image_max_height.nil?
|
390
385
|
return false if @image_width.nil?
|
@@ -419,10 +414,10 @@ module GroupDocsViewerCloud
|
|
419
414
|
mail_storage_options == other.mail_storage_options &&
|
420
415
|
visio_rendering_options == other.visio_rendering_options &&
|
421
416
|
web_document_options == other.web_document_options &&
|
422
|
-
jpg_quality == other.jpg_quality &&
|
423
417
|
document_open_password == other.document_open_password &&
|
424
418
|
permissions_password == other.permissions_password &&
|
425
419
|
permissions == other.permissions &&
|
420
|
+
pdf_optimization_options == other.pdf_optimization_options &&
|
426
421
|
image_max_width == other.image_max_width &&
|
427
422
|
image_max_height == other.image_max_height &&
|
428
423
|
image_width == other.image_width &&
|
@@ -438,7 +433,7 @@ module GroupDocsViewerCloud
|
|
438
433
|
# Calculates hash code according to all attributes.
|
439
434
|
# @return [Fixnum] Hash code
|
440
435
|
def hash
|
441
|
-
[start_page_number, count_pages_to_render, pages_to_render, page_rotations, default_font_name, default_encoding, detect_encoding, render_comments, render_notes, render_hidden_pages, spreadsheet_options, cad_options, email_options, project_management_options, pdf_document_options, word_processing_options, outlook_options, archive_options, text_options, mail_storage_options, visio_rendering_options, web_document_options,
|
436
|
+
[start_page_number, count_pages_to_render, pages_to_render, page_rotations, default_font_name, default_encoding, detect_encoding, render_comments, render_notes, render_hidden_pages, spreadsheet_options, cad_options, email_options, project_management_options, pdf_document_options, word_processing_options, outlook_options, archive_options, text_options, mail_storage_options, visio_rendering_options, web_document_options, document_open_password, permissions_password, permissions, pdf_optimization_options, image_max_width, image_max_height, image_width, image_height].hash
|
442
437
|
end
|
443
438
|
|
444
439
|
# Downcases first letter.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# --------------------------------------------------------------------------------------------------------------------
|
3
3
|
# <copyright company="Aspose Pty Ltd" file="pdf_view_info.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2024 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="project_management_options.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2024 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="project_management_view_info.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2024 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="render_options.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2024 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="resource.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2024 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="spreadsheet_options.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2024 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="storage_exist.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2024 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="storage_file.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2024 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="text_element.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2024 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="text_options.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2024 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="tile.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2024 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="view_options.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2024 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="view_result.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2024 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="visio_rendering_options.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2024 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="watermark.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2024 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="web_document_options.rb">
|
4
|
-
# Copyright (c) 2003-
|
4
|
+
# Copyright (c) 2003-2024 Aspose Pty Ltd
|
5
5
|
# </copyright>
|
6
6
|
# <summary>
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|