Class: AsposeWordsCloud::SaveAsTiffRequest
- Inherits:
-
Object
- Object
- AsposeWordsCloud::SaveAsTiffRequest
- Defined in:
- lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb
Overview
Request model for save_as_tiff operation.
Instance Attribute Summary collapse
-
#dml_effects_rendering_mode ⇒ Object
The optional dml effects rendering mode.
-
#dml_rendering_mode ⇒ Object
The optional dml rendering mode.
-
#encrypted_password ⇒ Object
Password of protected Word document.
-
#folder ⇒ Object
Original document folder.
-
#fonts_location ⇒ Object
Folder in filestorage with custom fonts.
-
#image_brightness ⇒ Object
The level of brightness for the generated images.
-
#image_color_mode ⇒ Object
The color mode for the generated images.
-
#image_contrast ⇒ Object
The contrast for the generated images.
-
#load_encoding ⇒ Object
Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
-
#name ⇒ Object
The filename of the input document.
-
#numeral_format ⇒ Object
The images numeral format.
-
#open_type_support ⇒ Object
The value indicates whether OpenType support is on.
-
#page_count ⇒ Object
The number of pages to render.
-
#page_index ⇒ Object
The index of the page to start rendering.
-
#paper_color ⇒ Object
The background image color.
-
#password ⇒ Object
Password of protected Word document.
-
#pixel_format ⇒ Object
The pixel format of the generated images.
-
#resolution ⇒ Object
The resolution of the generated images.
-
#save_options ⇒ Object
Tiff save options.
-
#scale ⇒ Object
The zoom factor for the generated images.
-
#storage ⇒ Object
Original document storage.
-
#tiff_binarization_method ⇒ Object
The optional TIFF binarization method.
-
#tiff_compression ⇒ Object
The compression tipe.
-
#use_anti_aliasing ⇒ Object
The flag indicating whether to use antialiasing.
-
#use_high_quality_rendering ⇒ Object
The flag indicating whether to use high quality.
-
#zip_output ⇒ Object
The flag indicating whether to ZIP the output.
Instance Method Summary collapse
- #create_http_request(api_client) ⇒ Object
-
#downcase_first_letter(str) ⇒ Object
Helper method to convert first letter to downcase.
-
#get_response_type ⇒ Object
Get response type.
-
#initialize(name:, save_options:, folder: nil, storage: nil, load_encoding: nil, password: nil, encrypted_password: nil, open_type_support: nil, use_anti_aliasing: nil, use_high_quality_rendering: nil, image_brightness: nil, image_color_mode: nil, image_contrast: nil, numeral_format: nil, page_count: nil, page_index: nil, paper_color: nil, pixel_format: nil, resolution: nil, scale: nil, tiff_compression: nil, dml_rendering_mode: nil, dml_effects_rendering_mode: nil, tiff_binarization_method: nil, zip_output: nil, fonts_location: nil) ⇒ SaveAsTiffRequest
constructor
Initializes a new instance.
-
#to_batch_part(api_client, requestId, parentRequestId = nil) ⇒ Object
Creating batch part from request.
Constructor Details
#initialize(name:, save_options:, folder: nil, storage: nil, load_encoding: nil, password: nil, encrypted_password: nil, open_type_support: nil, use_anti_aliasing: nil, use_high_quality_rendering: nil, image_brightness: nil, image_color_mode: nil, image_contrast: nil, numeral_format: nil, page_count: nil, page_index: nil, paper_color: nil, pixel_format: nil, resolution: nil, scale: nil, tiff_compression: nil, dml_rendering_mode: nil, dml_effects_rendering_mode: nil, tiff_binarization_method: nil, zip_output: nil, fonts_location: nil) ⇒ SaveAsTiffRequest
Initializes a new instance.
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 139 def initialize(name:, save_options:, folder: nil, storage: nil, load_encoding: nil, password: nil, encrypted_password: nil, open_type_support: nil, use_anti_aliasing: nil, use_high_quality_rendering: nil, image_brightness: nil, image_color_mode: nil, image_contrast: nil, numeral_format: nil, page_count: nil, page_index: nil, paper_color: nil, pixel_format: nil, resolution: nil, scale: nil, tiff_compression: nil, dml_rendering_mode: nil, dml_effects_rendering_mode: nil, tiff_binarization_method: nil, zip_output: nil, fonts_location: nil) self.name = name self. = self.folder = folder self.storage = storage self.load_encoding = load_encoding self.password = password self.encrypted_password = encrypted_password self.open_type_support = open_type_support self.use_anti_aliasing = use_anti_aliasing self.use_high_quality_rendering = use_high_quality_rendering self.image_brightness = image_brightness self.image_color_mode = image_color_mode self.image_contrast = image_contrast self.numeral_format = numeral_format self.page_count = page_count self.page_index = page_index self.paper_color = paper_color self.pixel_format = pixel_format self.resolution = resolution self.scale = scale self.tiff_compression = tiff_compression self.dml_rendering_mode = dml_rendering_mode self.dml_effects_rendering_mode = dml_effects_rendering_mode self.tiff_binarization_method = tiff_binarization_method self.zip_output = zip_output self.fonts_location = fonts_location end |
Instance Attribute Details
#dml_effects_rendering_mode ⇒ Object
The optional dml effects rendering mode. The default value is Simplified.
99 100 101 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 99 def dml_effects_rendering_mode @dml_effects_rendering_mode end |
#dml_rendering_mode ⇒ Object
The optional dml rendering mode. The default value is Fallback.
96 97 98 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 96 def dml_rendering_mode @dml_rendering_mode end |
#encrypted_password ⇒ Object
Password of protected Word document. Use the parameter to pass an encrypted password for direct calls of API. See SDK code for encyption details.
51 52 53 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 51 def encrypted_password @encrypted_password end |
#folder ⇒ Object
Original document folder.
39 40 41 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 39 def folder @folder end |
#fonts_location ⇒ Object
Folder in filestorage with custom fonts.
108 109 110 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 108 def fonts_location @fonts_location end |
#image_brightness ⇒ Object
The level of brightness for the generated images.
63 64 65 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 63 def image_brightness @image_brightness end |
#image_color_mode ⇒ Object
The color mode for the generated images.
66 67 68 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 66 def image_color_mode @image_color_mode end |
#image_contrast ⇒ Object
The contrast for the generated images.
69 70 71 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 69 def image_contrast @image_contrast end |
#load_encoding ⇒ Object
Encoding that will be used to load an HTML (or TXT) document if the encoding is not specified in HTML.
45 46 47 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 45 def load_encoding @load_encoding end |
#name ⇒ Object
The filename of the input document.
33 34 35 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 33 def name @name end |
#numeral_format ⇒ Object
The images numeral format.
72 73 74 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 72 def numeral_format @numeral_format end |
#open_type_support ⇒ Object
The value indicates whether OpenType support is on.
54 55 56 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 54 def open_type_support @open_type_support end |
#page_count ⇒ Object
The number of pages to render.
75 76 77 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 75 def page_count @page_count end |
#page_index ⇒ Object
The index of the page to start rendering.
78 79 80 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 78 def page_index @page_index end |
#paper_color ⇒ Object
The background image color.
81 82 83 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 81 def paper_color @paper_color end |
#password ⇒ Object
Password of protected Word document. Use the parameter to pass a password via SDK. SDK encrypts it automatically. We don’t recommend to use the parameter to pass a plain password for direct call of API.
48 49 50 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 48 def password @password end |
#pixel_format ⇒ Object
The pixel format of the generated images.
84 85 86 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 84 def pixel_format @pixel_format end |
#resolution ⇒ Object
The resolution of the generated images.
87 88 89 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 87 def resolution @resolution end |
#save_options ⇒ Object
Tiff save options.
36 37 38 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 36 def @save_options end |
#scale ⇒ Object
The zoom factor for the generated images.
90 91 92 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 90 def scale @scale end |
#storage ⇒ Object
Original document storage.
42 43 44 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 42 def storage @storage end |
#tiff_binarization_method ⇒ Object
The optional TIFF binarization method. Possible values are: FloydSteinbergDithering, Threshold.
102 103 104 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 102 def tiff_binarization_method @tiff_binarization_method end |
#tiff_compression ⇒ Object
The compression tipe.
93 94 95 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 93 def tiff_compression @tiff_compression end |
#use_anti_aliasing ⇒ Object
The flag indicating whether to use antialiasing.
57 58 59 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 57 def use_anti_aliasing @use_anti_aliasing end |
#use_high_quality_rendering ⇒ Object
The flag indicating whether to use high quality.
60 61 62 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 60 def use_high_quality_rendering @use_high_quality_rendering end |
#zip_output ⇒ Object
The flag indicating whether to ZIP the output.
105 106 107 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 105 def zip_output @zip_output end |
Instance Method Details
#create_http_request(api_client) ⇒ Object
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 254 def create_http_request(api_client) # verify the required parameter 'name' is set raise ArgumentError, 'Missing the required parameter name when calling WordsApi.save_as_tiff' if api_client.config.client_side_validation && self.name.nil? # verify the required parameter 'save_options' is set raise ArgumentError, 'Missing the required parameter save_options when calling WordsApi.save_as_tiff' if api_client.config.client_side_validation && self..nil? self..validate # resource path local_var_path = '/words/{name}/saveAs/tiff'[1..-1] local_var_path = local_var_path.sub('{' + downcase_first_letter('Name') + '}', self.name.nil? ? '' : self.name.to_s) local_var_path = local_var_path.sub('//', '/') # query parameters query_params = {} query_params[downcase_first_letter('Folder')] = self.folder unless self.folder.nil? query_params[downcase_first_letter('Storage')] = self.storage unless self.storage.nil? query_params[downcase_first_letter('LoadEncoding')] = self.load_encoding unless self.load_encoding.nil? query_params[downcase_first_letter('Password')] = self.password unless self.password.nil? query_params[downcase_first_letter('EncryptedPassword')] = self.encrypted_password unless self.encrypted_password.nil? query_params[downcase_first_letter('OpenTypeSupport')] = self.open_type_support unless self.open_type_support.nil? query_params[downcase_first_letter('UseAntiAliasing')] = self.use_anti_aliasing unless self.use_anti_aliasing.nil? query_params[downcase_first_letter('UseHighQualityRendering')] = self.use_high_quality_rendering unless self.use_high_quality_rendering.nil? query_params[downcase_first_letter('ImageBrightness')] = self.image_brightness unless self.image_brightness.nil? query_params[downcase_first_letter('ImageColorMode')] = self.image_color_mode unless self.image_color_mode.nil? query_params[downcase_first_letter('ImageContrast')] = self.image_contrast unless self.image_contrast.nil? query_params[downcase_first_letter('NumeralFormat')] = self.numeral_format unless self.numeral_format.nil? query_params[downcase_first_letter('PageCount')] = self.page_count unless self.page_count.nil? query_params[downcase_first_letter('PageIndex')] = self.page_index unless self.page_index.nil? query_params[downcase_first_letter('PaperColor')] = self.paper_color unless self.paper_color.nil? query_params[downcase_first_letter('PixelFormat')] = self.pixel_format unless self.pixel_format.nil? query_params[downcase_first_letter('Resolution')] = self.resolution unless self.resolution.nil? query_params[downcase_first_letter('Scale')] = self.scale unless self.scale.nil? query_params[downcase_first_letter('TiffCompression')] = self.tiff_compression unless self.tiff_compression.nil? query_params[downcase_first_letter('DmlRenderingMode')] = self.dml_rendering_mode unless self.dml_rendering_mode.nil? query_params[downcase_first_letter('DmlEffectsRenderingMode')] = self.dml_effects_rendering_mode unless self.dml_effects_rendering_mode.nil? query_params[downcase_first_letter('TiffBinarizationMethod')] = self.tiff_binarization_method unless self.tiff_binarization_method.nil? query_params[downcase_first_letter('ZipOutput')] = self.zip_output unless self.zip_output.nil? query_params[downcase_first_letter('FontsLocation')] = self.fonts_location unless self.fonts_location.nil? # header parameters header_params = {} # HTTP header 'Content-Type' header_params['Content-Type'] = api_client.select_header_content_type(['application/xml', 'application/json']) # form parameters form_params = [] files_content = [] if self..nil? raise "Parameter SaveOptions is required." end unless self..nil? form_params.push({:'Name' => 'saveOptions', :'Data' => self..to_body.to_json, :'MimeType' =>'application/json'}) end body = api_client.build_request_body(header_params, form_params, files_content) { 'method': :PUT, 'path': local_var_path, 'header_params': header_params, 'query_params': query_params, 'body': body, 'auth_names': ['JWT'] } end |
#downcase_first_letter(str) ⇒ Object
Helper method to convert first letter to downcase
321 322 323 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 321 def downcase_first_letter(str) str[0].downcase + str[1..-1] end |
#get_response_type ⇒ Object
Get response type
326 327 328 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 326 def get_response_type 'SaveResponse' end |
#to_batch_part(api_client, requestId, parentRequestId = nil) ⇒ Object
Creating batch part from request
169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_request.rb', line 169 def to_batch_part(api_client, requestId, parentRequestId = nil) # verify the required parameter 'name' is set raise ArgumentError, 'Missing the required parameter name when calling WordsApi.save_as_tiff' if api_client.config.client_side_validation && self.name.nil? # verify the required parameter 'save_options' is set raise ArgumentError, 'Missing the required parameter save_options when calling WordsApi.save_as_tiff' if api_client.config.client_side_validation && self..nil? self..validate # resource path local_var_path = '/words/{name}/saveAs/tiff'[7..-1] local_var_path = local_var_path.sub('{' + downcase_first_letter('Name') + '}', self.name.nil? ? '' : self.name.to_s) local_var_path = local_var_path.sub('//', '/') # query parameters query_params = {} query_params[downcase_first_letter('Folder')] = self.folder unless self.folder.nil? query_params[downcase_first_letter('Storage')] = self.storage unless self.storage.nil? query_params[downcase_first_letter('LoadEncoding')] = self.load_encoding unless self.load_encoding.nil? query_params[downcase_first_letter('Password')] = self.password unless self.password.nil? query_params[downcase_first_letter('EncryptedPassword')] = self.encrypted_password unless self.encrypted_password.nil? query_params[downcase_first_letter('OpenTypeSupport')] = self.open_type_support unless self.open_type_support.nil? query_params[downcase_first_letter('UseAntiAliasing')] = self.use_anti_aliasing unless self.use_anti_aliasing.nil? query_params[downcase_first_letter('UseHighQualityRendering')] = self.use_high_quality_rendering unless self.use_high_quality_rendering.nil? query_params[downcase_first_letter('ImageBrightness')] = self.image_brightness unless self.image_brightness.nil? query_params[downcase_first_letter('ImageColorMode')] = self.image_color_mode unless self.image_color_mode.nil? query_params[downcase_first_letter('ImageContrast')] = self.image_contrast unless self.image_contrast.nil? query_params[downcase_first_letter('NumeralFormat')] = self.numeral_format unless self.numeral_format.nil? query_params[downcase_first_letter('PageCount')] = self.page_count unless self.page_count.nil? query_params[downcase_first_letter('PageIndex')] = self.page_index unless self.page_index.nil? query_params[downcase_first_letter('PaperColor')] = self.paper_color unless self.paper_color.nil? query_params[downcase_first_letter('PixelFormat')] = self.pixel_format unless self.pixel_format.nil? query_params[downcase_first_letter('Resolution')] = self.resolution unless self.resolution.nil? query_params[downcase_first_letter('Scale')] = self.scale unless self.scale.nil? query_params[downcase_first_letter('TiffCompression')] = self.tiff_compression unless self.tiff_compression.nil? query_params[downcase_first_letter('DmlRenderingMode')] = self.dml_rendering_mode unless self.dml_rendering_mode.nil? query_params[downcase_first_letter('DmlEffectsRenderingMode')] = self.dml_effects_rendering_mode unless self.dml_effects_rendering_mode.nil? query_params[downcase_first_letter('TiffBinarizationMethod')] = self.tiff_binarization_method unless self.tiff_binarization_method.nil? query_params[downcase_first_letter('ZipOutput')] = self.zip_output unless self.zip_output.nil? query_params[downcase_first_letter('FontsLocation')] = self.fonts_location unless self.fonts_location.nil? if query_params query_params.each { |key, value| local_var_path = api_client.add_param_to_query(local_var_path, key, value) } end header_params = {} # header parameters # HTTP header 'Content-Type' header_params['Content-Type'] = api_client.select_header_content_type(['application/xml', 'application/json']) header_params['RequestId'] = requestId if parentRequestId != nil header_params['DependsOn'] = parentRequestId end # form parameters form_params = [] files_content = [] if self..nil? raise "Parameter SaveOptions is required." end unless self..nil? form_params.push({:'Name' => 'saveOptions', :'Data' => self..to_body.to_json, :'MimeType' =>'application/json'}) end # http body (model) body = api_client.build_request_body_batch(header_params, form_params, files_content) part = "" part.concat("PUT".force_encoding('UTF-8')) part.concat(" ".force_encoding('UTF-8')) part.concat(local_var_path.force_encoding('UTF-8')) part.concat(" \r\n".force_encoding('UTF-8')) header_params.each_pair {|key, value| part.concat(key.dup.force_encoding('UTF-8') , ": ".force_encoding('UTF-8'), value.dup.force_encoding('UTF-8'), "\r\n".force_encoding('UTF-8')) } part.concat("\r\n".force_encoding('UTF-8')) if body if body.is_a?(Hash) body.each do |key, value| part.concat(value, "\r\n") end else part.concat(body) end end part end |