Class: AsposeWordsCloud::SaveAsTiffOnlineRequest
- Inherits:
-
Object
- Object
- AsposeWordsCloud::SaveAsTiffOnlineRequest
- Defined in:
- lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb
Overview
Request model for save_as_tiff_online 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.
-
#document ⇒ Object
The document.
-
#encrypted_password ⇒ Object
Password of protected Word document.
-
#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.
-
#numeral_format ⇒ Object
The images numeral format.
-
#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.
-
#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(document:, save_options:, load_encoding: nil, password: nil, encrypted_password: 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) ⇒ SaveAsTiffOnlineRequest
constructor
Initializes a new instance.
-
#to_batch_part(api_client, requestId, parentRequestId = nil) ⇒ Object
Creating batch part from request.
Constructor Details
#initialize(document:, save_options:, load_encoding: nil, password: nil, encrypted_password: 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) ⇒ SaveAsTiffOnlineRequest
Initializes a new instance.
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 127 def initialize(document:, save_options:, load_encoding: nil, password: nil, encrypted_password: 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.document = document self. = self.load_encoding = load_encoding self.password = password self.encrypted_password = encrypted_password 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.
90 91 92 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 90 def dml_effects_rendering_mode @dml_effects_rendering_mode end |
#dml_rendering_mode ⇒ Object
The optional dml rendering mode. The default value is Fallback.
87 88 89 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 87 def dml_rendering_mode @dml_rendering_mode end |
#document ⇒ Object
The document.
33 34 35 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 33 def document @document 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.
45 46 47 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 45 def encrypted_password @encrypted_password end |
#fonts_location ⇒ Object
Folder in filestorage with custom fonts.
99 100 101 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 99 def fonts_location @fonts_location end |
#image_brightness ⇒ Object
The level of brightness for the generated images.
54 55 56 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 54 def image_brightness @image_brightness end |
#image_color_mode ⇒ Object
The color mode for the generated images.
57 58 59 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 57 def image_color_mode @image_color_mode end |
#image_contrast ⇒ Object
The contrast for the generated images.
60 61 62 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 60 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.
39 40 41 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 39 def load_encoding @load_encoding end |
#numeral_format ⇒ Object
The images numeral format.
63 64 65 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 63 def numeral_format @numeral_format end |
#page_count ⇒ Object
The number of pages to render.
66 67 68 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 66 def page_count @page_count end |
#page_index ⇒ Object
The index of the page to start rendering.
69 70 71 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 69 def page_index @page_index end |
#paper_color ⇒ Object
The background image color.
72 73 74 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 72 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.
42 43 44 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 42 def password @password end |
#pixel_format ⇒ Object
The pixel format of the generated images.
75 76 77 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 75 def pixel_format @pixel_format end |
#resolution ⇒ Object
The resolution of the generated images.
78 79 80 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 78 def resolution @resolution end |
#save_options ⇒ Object
Tiff save options.
36 37 38 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 36 def @save_options end |
#scale ⇒ Object
The zoom factor for the generated images.
81 82 83 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 81 def scale @scale end |
#tiff_binarization_method ⇒ Object
The optional TIFF binarization method. Possible values are: FloydSteinbergDithering, Threshold.
93 94 95 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 93 def tiff_binarization_method @tiff_binarization_method end |
#tiff_compression ⇒ Object
The compression tipe.
84 85 86 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 84 def tiff_compression @tiff_compression end |
#use_anti_aliasing ⇒ Object
The flag indicating whether to use antialiasing.
48 49 50 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 48 def use_anti_aliasing @use_anti_aliasing end |
#use_high_quality_rendering ⇒ Object
The flag indicating whether to use high quality.
51 52 53 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 51 def use_high_quality_rendering @use_high_quality_rendering end |
#zip_output ⇒ Object
The flag indicating whether to ZIP the output.
96 97 98 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 96 def zip_output @zip_output end |
Instance Method Details
#create_http_request(api_client) ⇒ Object
242 243 244 245 246 247 248 249 250 251 252 253 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 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 242 def create_http_request(api_client) # verify the required parameter 'document' is set raise ArgumentError, 'Missing the required parameter document when calling WordsApi.save_as_tiff_online' if api_client.config.client_side_validation && self.document.nil? # verify the required parameter 'save_options' is set raise ArgumentError, 'Missing the required parameter save_options when calling WordsApi.save_as_tiff_online' if api_client.config.client_side_validation && self..nil? self..validate # resource path local_var_path = '/words/online/put/saveAs/tiff'[1..-1] local_var_path = local_var_path.sub('//', '/') # query parameters query_params = {} 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('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(['multipart/form-data']) # form parameters form_params = [] files_content = [] if self.document.nil? raise "Parameter Document is required." end unless self.document.nil? form_params.push({:'Name' => 'document', :'Data' => self.document, :'MimeType' =>'application/octet-stream'}) end 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
312 313 314 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 312 def downcase_first_letter(str) str[0].downcase + str[1..-1] end |
#get_response_type ⇒ Object
Get response type
317 318 319 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 317 def get_response_type 'SaveAsTiffOnlineResponse' end |
#to_batch_part(api_client, requestId, parentRequestId = nil) ⇒ Object
Creating batch part from request
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 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 |
# File 'lib/aspose_words_cloud/models/requests/save_as_tiff_online_request.rb', line 154 def to_batch_part(api_client, requestId, parentRequestId = nil) # verify the required parameter 'document' is set raise ArgumentError, 'Missing the required parameter document when calling WordsApi.save_as_tiff_online' if api_client.config.client_side_validation && self.document.nil? # verify the required parameter 'save_options' is set raise ArgumentError, 'Missing the required parameter save_options when calling WordsApi.save_as_tiff_online' if api_client.config.client_side_validation && self..nil? self..validate # resource path local_var_path = '/words/online/put/saveAs/tiff'[7..-1] local_var_path = local_var_path.sub('//', '/') # query parameters query_params = {} 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('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(['multipart/form-data']) header_params['RequestId'] = requestId if parentRequestId != nil header_params['DependsOn'] = parentRequestId end # form parameters form_params = [] files_content = [] if self.document.nil? raise "Parameter Document is required." end unless self.document.nil? form_params.push({:'Name' => 'document', :'Data' => self.document, :'MimeType' =>'application/octet-stream'}) end 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 |