Class: CloudmersiveConvertApiClient::ConvertDocumentApi

Inherits:
Object
  • Object
show all
Defined in:
lib/cloudmersive-convert-api-client/api/convert_document_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ConvertDocumentApi

Returns a new instance of ConvertDocumentApi.



19
20
21
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#convert_document_autodetect_get_info(input_file, opts = {}) ⇒ AutodetectGetInfoResult

Get document type information Auto-detects a document’s type information; does not require file extension. Analyzes file contents to confirm file type. Even if no file extension is present, the auto-detect system will reliably analyze the contents of the file and identify its file type. Supports over 100 image file formats, Office document file formats, PDF, and more.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



27
28
29
30
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 27

def convert_document_autodetect_get_info(input_file, opts = {})
  data, _status_code, _headers = convert_document_autodetect_get_info_with_http_info(input_file, opts)
  data
end

#convert_document_autodetect_get_info_with_http_info(input_file, opts = {}) ⇒ Array<(AutodetectGetInfoResult, Fixnum, Hash)>

Get document type information Auto-detects a document&#39;s type information; does not require file extension. Analyzes file contents to confirm file type. Even if no file extension is present, the auto-detect system will reliably analyze the contents of the file and identify its file type. Supports over 100 image file formats, Office document file formats, PDF, and more.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AutodetectGetInfoResult, Fixnum, Hash)>)

    AutodetectGetInfoResult data, response status code and response headers



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 37

def convert_document_autodetect_get_info_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_autodetect_get_info ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_autodetect_get_info"
  end
  # resource path
  local_var_path = '/convert/autodetect/get-info'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AutodetectGetInfoResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_autodetect_get_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_autodetect_to_jpg(input_file, opts = {}) ⇒ AutodetectToJpgResult

Convert Document to JPG/JPEG image array Automatically detect file type and convert it to an array of JPG/JPEG Images. Supports all of the major Office document file formats including Word (DOCX, DOC), Excel (XLSX, XLS), PowerPoint (PPTX, PPT), over 100 image formats, HTML files, and even multi-page TIFF files. Customize image quality using quality header.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :quality (Integer)

    Optional; Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75. Default value is 75.

Returns:



83
84
85
86
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 83

def convert_document_autodetect_to_jpg(input_file, opts = {})
  data, _status_code, _headers = convert_document_autodetect_to_jpg_with_http_info(input_file, opts)
  data
end

#convert_document_autodetect_to_jpg_with_http_info(input_file, opts = {}) ⇒ Array<(AutodetectToJpgResult, Fixnum, Hash)>

Convert Document to JPG/JPEG image array Automatically detect file type and convert it to an array of JPG/JPEG Images. Supports all of the major Office document file formats including Word (DOCX, DOC), Excel (XLSX, XLS), PowerPoint (PPTX, PPT), over 100 image formats, HTML files, and even multi-page TIFF files. Customize image quality using quality header.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :quality (Integer)

    Optional; Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75. Default value is 75.

Returns:

  • (Array<(AutodetectToJpgResult, Fixnum, Hash)>)

    AutodetectToJpgResult data, response status code and response headers



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 94

def convert_document_autodetect_to_jpg_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_autodetect_to_jpg ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_autodetect_to_jpg"
  end
  # resource path
  local_var_path = '/convert/autodetect/to/jpg'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AutodetectToJpgResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_autodetect_to_jpg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_autodetect_to_pdf(input_file, opts = {}) ⇒ String

Convert Document to PDF Automatically detect file type and convert it to PDF. Supports all of the major Office document file formats including Word (DOCX, DOC), Excel (XLSX, XLS), PowerPoint (PPTX, PPT), over 100 image formats, HTML files, and even multi-page TIFF files.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


140
141
142
143
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 140

def convert_document_autodetect_to_pdf(input_file, opts = {})
  data, _status_code, _headers = convert_document_autodetect_to_pdf_with_http_info(input_file, opts)
  data
end

#convert_document_autodetect_to_pdf_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert Document to PDF Automatically detect file type and convert it to PDF. Supports all of the major Office document file formats including Word (DOCX, DOC), Excel (XLSX, XLS), PowerPoint (PPTX, PPT), over 100 image formats, HTML files, and even multi-page TIFF files.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



150
151
152
153
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
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 150

def convert_document_autodetect_to_pdf_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_autodetect_to_pdf ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_autodetect_to_pdf"
  end
  # resource path
  local_var_path = '/convert/autodetect/to/pdf'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_autodetect_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_autodetect_to_png_array(input_file, opts = {}) ⇒ AutodetectToPngResult

Convert Document to PNG array Automatically detect file type and convert it to an array of PNG images. Supports all of the major Office document file formats, over 100 image formats, and even multi-page TIFF files.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



195
196
197
198
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 195

def convert_document_autodetect_to_png_array(input_file, opts = {})
  data, _status_code, _headers = convert_document_autodetect_to_png_array_with_http_info(input_file, opts)
  data
end

#convert_document_autodetect_to_png_array_with_http_info(input_file, opts = {}) ⇒ Array<(AutodetectToPngResult, Fixnum, Hash)>

Convert Document to PNG array Automatically detect file type and convert it to an array of PNG images. Supports all of the major Office document file formats, over 100 image formats, and even multi-page TIFF files.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(AutodetectToPngResult, Fixnum, Hash)>)

    AutodetectToPngResult data, response status code and response headers



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
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 205

def convert_document_autodetect_to_png_array_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_autodetect_to_png_array ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_autodetect_to_png_array"
  end
  # resource path
  local_var_path = '/convert/autodetect/to/png'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AutodetectToPngResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_autodetect_to_png_array\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_autodetect_to_thumbnail(input_file, opts = {}) ⇒ String

Convert File to Thumbnail Image Automatically detect file type and convert it to a PNG thumbnail. Supports all of the major Office document file formats including Word (DOCX, DOC), Excel (XLSX, XLS), PowerPoint (PPTX, PPT), over 100 image formats, HTML files, and even multi-page TIFF files. Returns a generic PNG thumbnail for unsupported formats. Maximum thumbnail size is 2048x2048.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :max_width (Integer)

    Optional; Maximum width of the output thumbnail - final image will be as large as possible while less than or equal to this width. Default is 128.

  • :max_height (Integer)

    Optional; Maximum height of the output thumbnail - final image will be as large as possible while less than or equal to this width. Default is 128.

  • :extension (String)

    Optional; Specify the file extension of the inputFile. This will improve the response time in most cases. Also allows unsupported files without extensions to still return a corresponding generic icon.

Returns:

  • (String)


253
254
255
256
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 253

def convert_document_autodetect_to_thumbnail(input_file, opts = {})
  data, _status_code, _headers = convert_document_autodetect_to_thumbnail_with_http_info(input_file, opts)
  data
end

#convert_document_autodetect_to_thumbnail_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert File to Thumbnail Image Automatically detect file type and convert it to a PNG thumbnail. Supports all of the major Office document file formats including Word (DOCX, DOC), Excel (XLSX, XLS), PowerPoint (PPTX, PPT), over 100 image formats, HTML files, and even multi-page TIFF files. Returns a generic PNG thumbnail for unsupported formats. Maximum thumbnail size is 2048x2048.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :max_width (Integer)

    Optional; Maximum width of the output thumbnail - final image will be as large as possible while less than or equal to this width. Default is 128.

  • :max_height (Integer)

    Optional; Maximum height of the output thumbnail - final image will be as large as possible while less than or equal to this width. Default is 128.

  • :extension (String)

    Optional; Specify the file extension of the inputFile. This will improve the response time in most cases. Also allows unsupported files without extensions to still return a corresponding generic icon.

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



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
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 266

def convert_document_autodetect_to_thumbnail_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_autodetect_to_thumbnail ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_autodetect_to_thumbnail"
  end
  # resource path
  local_var_path = '/convert/autodetect/to/thumbnail'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'maxWidth'] = opts[:'max_width'] if !opts[:'max_width'].nil?
  header_params[:'maxHeight'] = opts[:'max_height'] if !opts[:'max_height'].nil?
  header_params[:'extension'] = opts[:'extension'] if !opts[:'extension'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_autodetect_to_thumbnail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_autodetect_to_thumbnails_advanced(input_file, opts = {}) ⇒ AutodetectToThumbnailsResult

Convert File to Thumbnail Image Object Automatically detect file type and convert it to an array of PNG thumbnails, returned as an object. May specify the number of pages for multiple thumbnails; default is one thumbnail. Supports all of the major Office document file formats including Word (DOCX, DOC), Excel (XLSX, XLS), PowerPoint (PPTX, PPT), over 100 image formats, HTML files, and even multi-page TIFF files. Returns a generic PNG thumbnail for unsupported formats. Maximum thumbnail size is 2048x2048.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :pages (Integer)

    Optional; Specify how many pages of the document will be converted to thumbnails. Default is 1 page.

  • :max_width (Integer)

    Optional; Maximum width of the output thumbnail - final image will be as large as possible while less than or equal to this width. Default is 128.

  • :max_height (Integer)

    Optional; Maximum height of the output thumbnail - final image will be as large as possible while less than or equal to this width. Default is 128.

  • :extension (String)

    Optional; Specify the file extension of the inputFile. This will improve the response time in most cases. Also allows unsupported files without extensions to still return a corresponding generic icon.

Returns:



318
319
320
321
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 318

def convert_document_autodetect_to_thumbnails_advanced(input_file, opts = {})
  data, _status_code, _headers = convert_document_autodetect_to_thumbnails_advanced_with_http_info(input_file, opts)
  data
end

#convert_document_autodetect_to_thumbnails_advanced_with_http_info(input_file, opts = {}) ⇒ Array<(AutodetectToThumbnailsResult, Fixnum, Hash)>

Convert File to Thumbnail Image Object Automatically detect file type and convert it to an array of PNG thumbnails, returned as an object. May specify the number of pages for multiple thumbnails; default is one thumbnail. Supports all of the major Office document file formats including Word (DOCX, DOC), Excel (XLSX, XLS), PowerPoint (PPTX, PPT), over 100 image formats, HTML files, and even multi-page TIFF files. Returns a generic PNG thumbnail for unsupported formats. Maximum thumbnail size is 2048x2048.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :pages (Integer)

    Optional; Specify how many pages of the document will be converted to thumbnails. Default is 1 page.

  • :max_width (Integer)

    Optional; Maximum width of the output thumbnail - final image will be as large as possible while less than or equal to this width. Default is 128.

  • :max_height (Integer)

    Optional; Maximum height of the output thumbnail - final image will be as large as possible while less than or equal to this width. Default is 128.

  • :extension (String)

    Optional; Specify the file extension of the inputFile. This will improve the response time in most cases. Also allows unsupported files without extensions to still return a corresponding generic icon.

Returns:



332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 332

def convert_document_autodetect_to_thumbnails_advanced_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_autodetect_to_thumbnails_advanced ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_autodetect_to_thumbnails_advanced"
  end
  # resource path
  local_var_path = '/convert/autodetect/to/thumbnail/advanced'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'pages'] = opts[:'pages'] if !opts[:'pages'].nil?
  header_params[:'maxWidth'] = opts[:'max_width'] if !opts[:'max_width'].nil?
  header_params[:'maxHeight'] = opts[:'max_height'] if !opts[:'max_height'].nil?
  header_params[:'extension'] = opts[:'extension'] if !opts[:'extension'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AutodetectToThumbnailsResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_autodetect_to_thumbnails_advanced\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_autodetect_to_txt(input_file, opts = {}) ⇒ TextConversionResult

Convert Document to Text (txt) Automatically detect file type and convert it to Text. Supports all of the major Office document file formats including Word (DOCX, DOC), Excel (XLSX, XLS), PowerPoint (PPTX, PPT) and PDF files. For spreadsheets, all worksheets will be included. If you wish to exclude certain pages, worksheets, slides, etc. use the Split document API first, or the delete pages/slides/worksheet APIs first to adjust the document to the target state prior to converting to text.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :text_formatting_mode (String)

    Optional; specify how whitespace should be handled when converting the document to text. Possible values are &#39;preserveWhitespace&#39; which will attempt to preserve whitespace in the document and relative positioning of text within the document, and &#39;minimizeWhitespace&#39; which will not insert additional spaces into the document in most cases. Default is &#39;preserveWhitespace&#39;.

Returns:



382
383
384
385
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 382

def convert_document_autodetect_to_txt(input_file, opts = {})
  data, _status_code, _headers = convert_document_autodetect_to_txt_with_http_info(input_file, opts)
  data
end

#convert_document_autodetect_to_txt_with_http_info(input_file, opts = {}) ⇒ Array<(TextConversionResult, Fixnum, Hash)>

Convert Document to Text (txt) Automatically detect file type and convert it to Text. Supports all of the major Office document file formats including Word (DOCX, DOC), Excel (XLSX, XLS), PowerPoint (PPTX, PPT) and PDF files. For spreadsheets, all worksheets will be included. If you wish to exclude certain pages, worksheets, slides, etc. use the Split document API first, or the delete pages/slides/worksheet APIs first to adjust the document to the target state prior to converting to text.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :text_formatting_mode (String)

    Optional; specify how whitespace should be handled when converting the document to text. Possible values are &#39;preserveWhitespace&#39; which will attempt to preserve whitespace in the document and relative positioning of text within the document, and &#39;minimizeWhitespace&#39; which will not insert additional spaces into the document in most cases. Default is &#39;preserveWhitespace&#39;.

Returns:

  • (Array<(TextConversionResult, Fixnum, Hash)>)

    TextConversionResult data, response status code and response headers



393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 393

def convert_document_autodetect_to_txt_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_autodetect_to_txt ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_autodetect_to_txt"
  end
  # resource path
  local_var_path = '/convert/autodetect/to/txt'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'textFormattingMode'] = opts[:'text_formatting_mode'] if !opts[:'text_formatting_mode'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TextConversionResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_autodetect_to_txt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_csv_multi_to_xlsx(input_file1, input_file2, opts = {}) ⇒ String

Convert Multiple CSV Files into a Single XLSX Spreadsheet Convert multiple Comma-Separated Values (CSV) files into a single Excel XLSX Spreadsheet, with one worksheet corresponding to each CSV file.

Parameters:

  • input_file1

    First input file to perform the operation on.

  • input_file2

    Second input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :input_file3 (File)

    Third input file to perform the operation on.

  • :input_file4 (File)

    Fourth input file to perform the operation on.

  • :input_file5 (File)

    Fifth input file to perform the operation on.

  • :input_file6 (File)

    Sixth input file to perform the operation on.

  • :input_file7 (File)

    Seventh input file to perform the operation on.

  • :input_file8 (File)

    Eighth input file to perform the operation on.

  • :input_file9 (File)

    Ninth input file to perform the operation on.

  • :input_file10 (File)

    Tenth input file to perform the operation on.

  • :worksheet_names (String)

    Optional; Specify the name of each CSV&#39;s worksheet in order, separated with commas (e.g. &quot;worksheet1,worksheet2,worksheet3&quot;). Defaults to the names of the input CSV files. Recommended when inputting the files directly, without file names.

Returns:

  • (String)


449
450
451
452
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 449

def convert_document_csv_multi_to_xlsx(input_file1, input_file2, opts = {})
  data, _status_code, _headers = convert_document_csv_multi_to_xlsx_with_http_info(input_file1, input_file2, opts)
  data
end

#convert_document_csv_multi_to_xlsx_with_http_info(input_file1, input_file2, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert Multiple CSV Files into a Single XLSX Spreadsheet Convert multiple Comma-Separated Values (CSV) files into a single Excel XLSX Spreadsheet, with one worksheet corresponding to each CSV file.

Parameters:

  • input_file1

    First input file to perform the operation on.

  • input_file2

    Second input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :input_file3 (File)

    Third input file to perform the operation on.

  • :input_file4 (File)

    Fourth input file to perform the operation on.

  • :input_file5 (File)

    Fifth input file to perform the operation on.

  • :input_file6 (File)

    Sixth input file to perform the operation on.

  • :input_file7 (File)

    Seventh input file to perform the operation on.

  • :input_file8 (File)

    Eighth input file to perform the operation on.

  • :input_file9 (File)

    Ninth input file to perform the operation on.

  • :input_file10 (File)

    Tenth input file to perform the operation on.

  • :worksheet_names (String)

    Optional; Specify the name of each CSV&#39;s worksheet in order, separated with commas (e.g. &quot;worksheet1,worksheet2,worksheet3&quot;). Defaults to the names of the input CSV files. Recommended when inputting the files directly, without file names.

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 469

def convert_document_csv_multi_to_xlsx_with_http_info(input_file1, input_file2, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_csv_multi_to_xlsx ...'
  end
  # verify the required parameter 'input_file1' is set
  if @api_client.config.client_side_validation && input_file1.nil?
    fail ArgumentError, "Missing the required parameter 'input_file1' when calling ConvertDocumentApi.convert_document_csv_multi_to_xlsx"
  end
  # verify the required parameter 'input_file2' is set
  if @api_client.config.client_side_validation && input_file2.nil?
    fail ArgumentError, "Missing the required parameter 'input_file2' when calling ConvertDocumentApi.convert_document_csv_multi_to_xlsx"
  end
  # resource path
  local_var_path = '/convert/csv/multi/to/xlsx'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'worksheetNames'] = opts[:'worksheet_names'] if !opts[:'worksheet_names'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile1'] = input_file1
  form_params['inputFile2'] = input_file2
  form_params['inputFile3'] = opts[:'input_file3'] if !opts[:'input_file3'].nil?
  form_params['inputFile4'] = opts[:'input_file4'] if !opts[:'input_file4'].nil?
  form_params['inputFile5'] = opts[:'input_file5'] if !opts[:'input_file5'].nil?
  form_params['inputFile6'] = opts[:'input_file6'] if !opts[:'input_file6'].nil?
  form_params['inputFile7'] = opts[:'input_file7'] if !opts[:'input_file7'].nil?
  form_params['inputFile8'] = opts[:'input_file8'] if !opts[:'input_file8'].nil?
  form_params['inputFile9'] = opts[:'input_file9'] if !opts[:'input_file9'].nil?
  form_params['inputFile10'] = opts[:'input_file10'] if !opts[:'input_file10'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_csv_multi_to_xlsx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_csv_to_html(input_file, opts = {}) ⇒ String

Convert CSV to HTML document Convert Comma-Separated Values (CSV) file to HTML document.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


528
529
530
531
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 528

def convert_document_csv_to_html(input_file, opts = {})
  data, _status_code, _headers = convert_document_csv_to_html_with_http_info(input_file, opts)
  data
end

#convert_document_csv_to_html_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert CSV to HTML document Convert Comma-Separated Values (CSV) file to HTML document.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 538

def convert_document_csv_to_html_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_csv_to_html ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_csv_to_html"
  end
  # resource path
  local_var_path = '/convert/csv/to/html'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_csv_to_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_csv_to_pdf(input_file, opts = {}) ⇒ String

Convert CSV to PDF document Convert Comma-Separated Values (CSV) file to PDF document.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


583
584
585
586
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 583

def convert_document_csv_to_pdf(input_file, opts = {})
  data, _status_code, _headers = convert_document_csv_to_pdf_with_http_info(input_file, opts)
  data
end

#convert_document_csv_to_pdf_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert CSV to PDF document Convert Comma-Separated Values (CSV) file to PDF document.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 593

def convert_document_csv_to_pdf_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_csv_to_pdf ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_csv_to_pdf"
  end
  # resource path
  local_var_path = '/convert/csv/to/pdf'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_csv_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_csv_to_xlsx(input_file, opts = {}) ⇒ String

Convert CSV to Excel XLSX Spreadsheet Convert CSV file to Office Excel XLSX Workbooks file format.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


638
639
640
641
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 638

def convert_document_csv_to_xlsx(input_file, opts = {})
  data, _status_code, _headers = convert_document_csv_to_xlsx_with_http_info(input_file, opts)
  data
end

#convert_document_csv_to_xlsx_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert CSV to Excel XLSX Spreadsheet Convert CSV file to Office Excel XLSX Workbooks file format.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 648

def convert_document_csv_to_xlsx_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_csv_to_xlsx ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_csv_to_xlsx"
  end
  # resource path
  local_var_path = '/convert/csv/to/xlsx'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_csv_to_xlsx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_doc_to_docx(input_file, opts = {}) ⇒ String

Convert Word DOC (97-03) Document to DOCX Convert/upgrade Office Word (97-2003 Format) Documents (doc) to the modern DOCX format

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


693
694
695
696
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 693

def convert_document_doc_to_docx(input_file, opts = {})
  data, _status_code, _headers = convert_document_doc_to_docx_with_http_info(input_file, opts)
  data
end

#convert_document_doc_to_docx_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert Word DOC (97-03) Document to DOCX Convert/upgrade Office Word (97-2003 Format) Documents (doc) to the modern DOCX format

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 703

def convert_document_doc_to_docx_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_doc_to_docx ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_doc_to_docx"
  end
  # resource path
  local_var_path = '/convert/doc/to/docx'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_doc_to_docx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_doc_to_pdf(input_file, opts = {}) ⇒ String

Convert Word DOC (97-03) Document to PDF Convert Office Word (97-2003 Format) Documents (doc) to standard PDF

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


748
749
750
751
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 748

def convert_document_doc_to_pdf(input_file, opts = {})
  data, _status_code, _headers = convert_document_doc_to_pdf_with_http_info(input_file, opts)
  data
end

#convert_document_doc_to_pdf_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert Word DOC (97-03) Document to PDF Convert Office Word (97-2003 Format) Documents (doc) to standard PDF

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 758

def convert_document_doc_to_pdf_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_doc_to_pdf ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_doc_to_pdf"
  end
  # resource path
  local_var_path = '/convert/doc/to/pdf'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_doc_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_doc_to_txt(input_file, opts = {}) ⇒ TextConversionResult

Convert Word DOC (97-03) Document to Text (txt) Convert Office Word DOC (97-03) Document (doc) to text

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



803
804
805
806
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 803

def convert_document_doc_to_txt(input_file, opts = {})
  data, _status_code, _headers = convert_document_doc_to_txt_with_http_info(input_file, opts)
  data
end

#convert_document_doc_to_txt_with_http_info(input_file, opts = {}) ⇒ Array<(TextConversionResult, Fixnum, Hash)>

Convert Word DOC (97-03) Document to Text (txt) Convert Office Word DOC (97-03) Document (doc) to text

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(TextConversionResult, Fixnum, Hash)>)

    TextConversionResult data, response status code and response headers



813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 813

def convert_document_doc_to_txt_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_doc_to_txt ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_doc_to_txt"
  end
  # resource path
  local_var_path = '/convert/doc/to/txt'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TextConversionResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_doc_to_txt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_docx_to_doc(input_file, opts = {}) ⇒ String

Convert Word DOCX Document to Legacy Word DOC (97-03) Convert/downgrade modern Office Word DOCX Documents (DOCX) to the legacy Word DOC (97-2003 Format) format

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


858
859
860
861
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 858

def convert_document_docx_to_doc(input_file, opts = {})
  data, _status_code, _headers = convert_document_docx_to_doc_with_http_info(input_file, opts)
  data
end

#convert_document_docx_to_doc_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert Word DOCX Document to Legacy Word DOC (97-03) Convert/downgrade modern Office Word DOCX Documents (DOCX) to the legacy Word DOC (97-2003 Format) format

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 868

def convert_document_docx_to_doc_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_docx_to_doc ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_docx_to_doc"
  end
  # resource path
  local_var_path = '/convert/docx/to/doc'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_docx_to_doc\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_docx_to_html(input_file, opts = {}) ⇒ String

Convert Word DOCX Document to HTML Document Convert Office Word Document (DOCX) to HTML Document

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


913
914
915
916
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 913

def convert_document_docx_to_html(input_file, opts = {})
  data, _status_code, _headers = convert_document_docx_to_html_with_http_info(input_file, opts)
  data
end

#convert_document_docx_to_html_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert Word DOCX Document to HTML Document Convert Office Word Document (DOCX) to HTML Document

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 923

def convert_document_docx_to_html_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_docx_to_html ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_docx_to_html"
  end
  # resource path
  local_var_path = '/convert/docx/to/html'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_docx_to_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_docx_to_jpg(input_file, opts = {}) ⇒ DocxToJpgResult

Convert Word DOCX Document to JPG/JPEG image array Converts an Office Word Document (DOCX) to an array of JPG/JPEG images, one for each page. Customize image quality using quality header.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :quality (Integer)

    Optional; Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75. Default value is 75.

Returns:



969
970
971
972
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 969

def convert_document_docx_to_jpg(input_file, opts = {})
  data, _status_code, _headers = convert_document_docx_to_jpg_with_http_info(input_file, opts)
  data
end

#convert_document_docx_to_jpg_with_http_info(input_file, opts = {}) ⇒ Array<(DocxToJpgResult, Fixnum, Hash)>

Convert Word DOCX Document to JPG/JPEG image array Converts an Office Word Document (DOCX) to an array of JPG/JPEG images, one for each page. Customize image quality using quality header.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :quality (Integer)

    Optional; Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75. Default value is 75.

Returns:

  • (Array<(DocxToJpgResult, Fixnum, Hash)>)

    DocxToJpgResult data, response status code and response headers



980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 980

def convert_document_docx_to_jpg_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_docx_to_jpg ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_docx_to_jpg"
  end
  # resource path
  local_var_path = '/convert/docx/to/jpg'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocxToJpgResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_docx_to_jpg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_docx_to_pdf(input_file, opts = {}) ⇒ String

Convert Word DOCX Document to PDF Convert Office Word Documents (docx) to standard PDF

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


1026
1027
1028
1029
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1026

def convert_document_docx_to_pdf(input_file, opts = {})
  data, _status_code, _headers = convert_document_docx_to_pdf_with_http_info(input_file, opts)
  data
end

#convert_document_docx_to_pdf_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert Word DOCX Document to PDF Convert Office Word Documents (docx) to standard PDF

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1036

def convert_document_docx_to_pdf_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_docx_to_pdf ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_docx_to_pdf"
  end
  # resource path
  local_var_path = '/convert/docx/to/pdf'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_docx_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_docx_to_png(input_file, opts = {}) ⇒ DocxToPngResult

Convert Word DOCX Document to PNG image array Converts an Office Word Document (DOCX) file to an array of PNG images, one for each page.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1081
1082
1083
1084
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1081

def convert_document_docx_to_png(input_file, opts = {})
  data, _status_code, _headers = convert_document_docx_to_png_with_http_info(input_file, opts)
  data
end

#convert_document_docx_to_png_with_http_info(input_file, opts = {}) ⇒ Array<(DocxToPngResult, Fixnum, Hash)>

Convert Word DOCX Document to PNG image array Converts an Office Word Document (DOCX) file to an array of PNG images, one for each page.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(DocxToPngResult, Fixnum, Hash)>)

    DocxToPngResult data, response status code and response headers



1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1091

def convert_document_docx_to_png_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_docx_to_png ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_docx_to_png"
  end
  # resource path
  local_var_path = '/convert/docx/to/png'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'DocxToPngResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_docx_to_png\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_docx_to_rtf(input_file, opts = {}) ⇒ String

Convert Word DOCX Document to RTF Convert an Office Word Document (DOCX) to Rich Text Format Document (RTF)

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


1136
1137
1138
1139
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1136

def convert_document_docx_to_rtf(input_file, opts = {})
  data, _status_code, _headers = convert_document_docx_to_rtf_with_http_info(input_file, opts)
  data
end

#convert_document_docx_to_rtf_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert Word DOCX Document to RTF Convert an Office Word Document (DOCX) to Rich Text Format Document (RTF)

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1146

def convert_document_docx_to_rtf_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_docx_to_rtf ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_docx_to_rtf"
  end
  # resource path
  local_var_path = '/convert/docx/to/rtf'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_docx_to_rtf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_docx_to_txt(input_file, opts = {}) ⇒ TextConversionResult

Convert Word DOCX Document to Text (txt) Convert Office Word Documents (docx) to text

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :text_formatting_mode (String)

    Optional; specify how whitespace should be handled when converting the document to text. Possible values are &#39;preserveWhitespace&#39; which will attempt to preserve whitespace in the document and relative positioning of text within the document, and &#39;minimizeWhitespace&#39; which will not insert additional spaces into the document in most cases. Default is &#39;minimizeWhitespace&#39;.

Returns:



1192
1193
1194
1195
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1192

def convert_document_docx_to_txt(input_file, opts = {})
  data, _status_code, _headers = convert_document_docx_to_txt_with_http_info(input_file, opts)
  data
end

#convert_document_docx_to_txt_with_http_info(input_file, opts = {}) ⇒ Array<(TextConversionResult, Fixnum, Hash)>

Convert Word DOCX Document to Text (txt) Convert Office Word Documents (docx) to text

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :text_formatting_mode (String)

    Optional; specify how whitespace should be handled when converting the document to text. Possible values are &#39;preserveWhitespace&#39; which will attempt to preserve whitespace in the document and relative positioning of text within the document, and &#39;minimizeWhitespace&#39; which will not insert additional spaces into the document in most cases. Default is &#39;minimizeWhitespace&#39;.

Returns:

  • (Array<(TextConversionResult, Fixnum, Hash)>)

    TextConversionResult data, response status code and response headers



1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1203

def convert_document_docx_to_txt_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_docx_to_txt ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_docx_to_txt"
  end
  # resource path
  local_var_path = '/convert/docx/to/txt'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'textFormattingMode'] = opts[:'text_formatting_mode'] if !opts[:'text_formatting_mode'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TextConversionResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_docx_to_txt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_eml_to_html(input_file, opts = {}) ⇒ EmlToHtmlResult

Convert Email EML file to HTML string Convert Outlook Email EML file to HTML string and attachments. Supports images if they are base 64 inline.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body_only (BOOLEAN)

    Optional; If true, the HTML string will only include the body of the email. Other information such as subject will still be given as properties in the response object. Default is false.

  • :include_attachments (BOOLEAN)

    Optional; If false, the response object will not include any attachment files from the input file. Default is true.

Returns:



1251
1252
1253
1254
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1251

def convert_document_eml_to_html(input_file, opts = {})
  data, _status_code, _headers = convert_document_eml_to_html_with_http_info(input_file, opts)
  data
end

#convert_document_eml_to_html_with_http_info(input_file, opts = {}) ⇒ Array<(EmlToHtmlResult, Fixnum, Hash)>

Convert Email EML file to HTML string Convert Outlook Email EML file to HTML string and attachments. Supports images if they are base 64 inline.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body_only (BOOLEAN)

    Optional; If true, the HTML string will only include the body of the email. Other information such as subject will still be given as properties in the response object. Default is false.

  • :include_attachments (BOOLEAN)

    Optional; If false, the response object will not include any attachment files from the input file. Default is true.

Returns:

  • (Array<(EmlToHtmlResult, Fixnum, Hash)>)

    EmlToHtmlResult data, response status code and response headers



1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1263

def convert_document_eml_to_html_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_eml_to_html ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_eml_to_html"
  end
  # resource path
  local_var_path = '/convert/eml/to/html'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'bodyOnly'] = opts[:'body_only'] if !opts[:'body_only'].nil?
  header_params[:'includeAttachments'] = opts[:'include_attachments'] if !opts[:'include_attachments'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'EmlToHtmlResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_eml_to_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_eml_to_jpg(input_file, opts = {}) ⇒ EmlToJpgResult

Convert Email EML file to JPG/JPEG image array Converts an Outlook Email File (EML) to an array of JPG/JPEG images, one for each page. Customize image quality using quality header.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :quality (Integer)

    Optional; Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75. Default value is 75.

Returns:



1311
1312
1313
1314
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1311

def convert_document_eml_to_jpg(input_file, opts = {})
  data, _status_code, _headers = convert_document_eml_to_jpg_with_http_info(input_file, opts)
  data
end

#convert_document_eml_to_jpg_with_http_info(input_file, opts = {}) ⇒ Array<(EmlToJpgResult, Fixnum, Hash)>

Convert Email EML file to JPG/JPEG image array Converts an Outlook Email File (EML) to an array of JPG/JPEG images, one for each page. Customize image quality using quality header.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :quality (Integer)

    Optional; Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75. Default value is 75.

Returns:

  • (Array<(EmlToJpgResult, Fixnum, Hash)>)

    EmlToJpgResult data, response status code and response headers



1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1322

def convert_document_eml_to_jpg_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_eml_to_jpg ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_eml_to_jpg"
  end
  # resource path
  local_var_path = '/convert/eml/to/jpg'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'EmlToJpgResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_eml_to_jpg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_eml_to_pdf(input_file, opts = {}) ⇒ String

Convert Email EML file to PDF document Convert Outlook Email EML file to PDF document. Supports images if they are base 64 inline.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body_only (BOOLEAN)

    Optional; If true, the HTML string will only include the body of the email. Other information such as subject will still be given as properties in the response object. Default is false.

Returns:

  • (String)


1369
1370
1371
1372
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1369

def convert_document_eml_to_pdf(input_file, opts = {})
  data, _status_code, _headers = convert_document_eml_to_pdf_with_http_info(input_file, opts)
  data
end

#convert_document_eml_to_pdf_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert Email EML file to PDF document Convert Outlook Email EML file to PDF document. Supports images if they are base 64 inline.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body_only (BOOLEAN)

    Optional; If true, the HTML string will only include the body of the email. Other information such as subject will still be given as properties in the response object. Default is false.

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1380

def convert_document_eml_to_pdf_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_eml_to_pdf ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_eml_to_pdf"
  end
  # resource path
  local_var_path = '/convert/eml/to/pdf'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'bodyOnly'] = opts[:'body_only'] if !opts[:'body_only'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_eml_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_eml_to_png(input_file, opts = {}) ⇒ EmlToPngResult

Convert Email EML file to PNG image array Converts an Outlook Email File (EML) to an array of PNG images, one for each page.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1426
1427
1428
1429
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1426

def convert_document_eml_to_png(input_file, opts = {})
  data, _status_code, _headers = convert_document_eml_to_png_with_http_info(input_file, opts)
  data
end

#convert_document_eml_to_png_with_http_info(input_file, opts = {}) ⇒ Array<(EmlToPngResult, Fixnum, Hash)>

Convert Email EML file to PNG image array Converts an Outlook Email File (EML) to an array of PNG images, one for each page.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(EmlToPngResult, Fixnum, Hash)>)

    EmlToPngResult data, response status code and response headers



1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1436

def convert_document_eml_to_png_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_eml_to_png ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_eml_to_png"
  end
  # resource path
  local_var_path = '/convert/eml/to/png'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'EmlToPngResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_eml_to_png\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_get_file_type_icon(file_extension, opts = {}) ⇒ String

Get PNG icon file for the file extension Returns a PNG icon for the given file format extension as a file for download. User may specify the icon size. Supports over 100 file formats, with a generic icon for unsupported formats.

Parameters:

  • file_extension

    Required; The file extension to be used for the icon. Limited to 4 AlphaNumeric characters.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :icon_size (Integer)

    Optional; The desired width of the icon, preserving its aspect ratio.

Returns:

  • (String)


1482
1483
1484
1485
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1482

def convert_document_get_file_type_icon(file_extension, opts = {})
  data, _status_code, _headers = convert_document_get_file_type_icon_with_http_info(file_extension, opts)
  data
end

#convert_document_get_file_type_icon_advanced(file_extension, opts = {}) ⇒ GetFileTypeIconResult

Get PNG icon byte array for the file extension Returns a PNG icon for the given file format extension directly as a byte array. User may specify the icon size. Supports over 100 file formats, with a generic icon for unsupported formats.

Parameters:

  • file_extension

    Required; The file extension to be used for the icon. Limited to 4 AlphaNumeric characters.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :icon_size (Integer)

    Optional; The desired width of the icon, preserving its aspect ratio.

Returns:



1538
1539
1540
1541
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1538

def convert_document_get_file_type_icon_advanced(file_extension, opts = {})
  data, _status_code, _headers = convert_document_get_file_type_icon_advanced_with_http_info(file_extension, opts)
  data
end

#convert_document_get_file_type_icon_advanced_with_http_info(file_extension, opts = {}) ⇒ Array<(GetFileTypeIconResult, Fixnum, Hash)>

Get PNG icon byte array for the file extension Returns a PNG icon for the given file format extension directly as a byte array. User may specify the icon size. Supports over 100 file formats, with a generic icon for unsupported formats.

Parameters:

  • file_extension

    Required; The file extension to be used for the icon. Limited to 4 AlphaNumeric characters.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :icon_size (Integer)

    Optional; The desired width of the icon, preserving its aspect ratio.

Returns:

  • (Array<(GetFileTypeIconResult, Fixnum, Hash)>)

    GetFileTypeIconResult data, response status code and response headers



1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1549

def convert_document_get_file_type_icon_advanced_with_http_info(file_extension, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_get_file_type_icon_advanced ...'
  end
  # verify the required parameter 'file_extension' is set
  if @api_client.config.client_side_validation && file_extension.nil?
    fail ArgumentError, "Missing the required parameter 'file_extension' when calling ConvertDocumentApi.convert_document_get_file_type_icon_advanced"
  end
  # resource path
  local_var_path = '/convert/autodetect/get-icon/advanced'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  header_params[:'fileExtension'] = file_extension
  header_params[:'iconSize'] = opts[:'icon_size'] if !opts[:'icon_size'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'GetFileTypeIconResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_get_file_type_icon_advanced\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_get_file_type_icon_with_http_info(file_extension, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Get PNG icon file for the file extension Returns a PNG icon for the given file format extension as a file for download. User may specify the icon size. Supports over 100 file formats, with a generic icon for unsupported formats.

Parameters:

  • file_extension

    Required; The file extension to be used for the icon. Limited to 4 AlphaNumeric characters.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :icon_size (Integer)

    Optional; The desired width of the icon, preserving its aspect ratio.

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1493

def convert_document_get_file_type_icon_with_http_info(file_extension, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_get_file_type_icon ...'
  end
  # verify the required parameter 'file_extension' is set
  if @api_client.config.client_side_validation && file_extension.nil?
    fail ArgumentError, "Missing the required parameter 'file_extension' when calling ConvertDocumentApi.convert_document_get_file_type_icon"
  end
  # resource path
  local_var_path = '/convert/autodetect/get-icon'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  header_params[:'fileExtension'] = file_extension
  header_params[:'iconSize'] = opts[:'icon_size'] if !opts[:'icon_size'].nil?

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_get_file_type_icon\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_html_to_pdf(input_file, opts = {}) ⇒ String

Convert HTML document file to PDF Document Convert standard HTML, with full support for CSS, JavaScript, Images, and other complex behavior to PDF. To use external files such as images, use an absolute URL to the file.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_background_graphics (BOOLEAN)

    Optional: Set to true to include background graphics in the PDF, or false to not include. Default is true.

  • :scale_factor (Integer)

    Optional: Set to 100 to scale at 100%, set to 50% to scale down to 50% scale, set to 200% to scale up to 200% scale, etc. Default is 100%. Maximum is 1000%.

Returns:

  • (String)


1595
1596
1597
1598
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1595

def convert_document_html_to_pdf(input_file, opts = {})
  data, _status_code, _headers = convert_document_html_to_pdf_with_http_info(input_file, opts)
  data
end

#convert_document_html_to_pdf_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert HTML document file to PDF Document Convert standard HTML, with full support for CSS, JavaScript, Images, and other complex behavior to PDF. To use external files such as images, use an absolute URL to the file.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :include_background_graphics (BOOLEAN)

    Optional: Set to true to include background graphics in the PDF, or false to not include. Default is true.

  • :scale_factor (Integer)

    Optional: Set to 100 to scale at 100%, set to 50% to scale down to 50% scale, set to 200% to scale up to 200% scale, etc. Default is 100%. Maximum is 1000%.

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1607

def convert_document_html_to_pdf_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_html_to_pdf ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_html_to_pdf"
  end
  # resource path
  local_var_path = '/convert/html/to/pdf'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'includeBackgroundGraphics'] = opts[:'include_background_graphics'] if !opts[:'include_background_graphics'].nil?
  header_params[:'scaleFactor'] = opts[:'scale_factor'] if !opts[:'scale_factor'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_html_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_html_to_png(input_file, opts = {}) ⇒ PdfToPngResult

Convert HTML document file to PNG image array Convert standard HTML, with full support for CSS, JavaScript, Images, and other complex behavior to an array of PNG images, one for each page. To use external files in your HTML such as images, use an absolute URL to the file.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1654
1655
1656
1657
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1654

def convert_document_html_to_png(input_file, opts = {})
  data, _status_code, _headers = convert_document_html_to_png_with_http_info(input_file, opts)
  data
end

#convert_document_html_to_png_with_http_info(input_file, opts = {}) ⇒ Array<(PdfToPngResult, Fixnum, Hash)>

Convert HTML document file to PNG image array Convert standard HTML, with full support for CSS, JavaScript, Images, and other complex behavior to an array of PNG images, one for each page. To use external files in your HTML such as images, use an absolute URL to the file.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(PdfToPngResult, Fixnum, Hash)>)

    PdfToPngResult data, response status code and response headers



1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1664

def convert_document_html_to_png_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_html_to_png ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_html_to_png"
  end
  # resource path
  local_var_path = '/convert/html/to/png'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PdfToPngResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_html_to_png\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_html_to_txt(input_file, opts = {}) ⇒ TextConversionResult

HTML Document file to Text (txt) HTML document to text

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1709
1710
1711
1712
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1709

def convert_document_html_to_txt(input_file, opts = {})
  data, _status_code, _headers = convert_document_html_to_txt_with_http_info(input_file, opts)
  data
end

#convert_document_html_to_txt_with_http_info(input_file, opts = {}) ⇒ Array<(TextConversionResult, Fixnum, Hash)>

HTML Document file to Text (txt) HTML document to text

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(TextConversionResult, Fixnum, Hash)>)

    TextConversionResult data, response status code and response headers



1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1719

def convert_document_html_to_txt_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_html_to_txt ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_html_to_txt"
  end
  # resource path
  local_var_path = '/convert/html/to/txt'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TextConversionResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_html_to_txt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_keynote_to_jpg(input_file, opts = {}) ⇒ KeynoteToJpgResult

Convert Keynote Presentation (KEY) to JPG/JPEG image array Converts a Mac Keynote Presentation (KEY) to an array of JPG/JPEG images, one for each page. Customize image quality using quality header.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :quality (Integer)

    Optional; Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75. Default value is 75.

Returns:



1765
1766
1767
1768
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1765

def convert_document_keynote_to_jpg(input_file, opts = {})
  data, _status_code, _headers = convert_document_keynote_to_jpg_with_http_info(input_file, opts)
  data
end

#convert_document_keynote_to_jpg_with_http_info(input_file, opts = {}) ⇒ Array<(KeynoteToJpgResult, Fixnum, Hash)>

Convert Keynote Presentation (KEY) to JPG/JPEG image array Converts a Mac Keynote Presentation (KEY) to an array of JPG/JPEG images, one for each page. Customize image quality using quality header.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :quality (Integer)

    Optional; Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75. Default value is 75.

Returns:

  • (Array<(KeynoteToJpgResult, Fixnum, Hash)>)

    KeynoteToJpgResult data, response status code and response headers



1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1776

def convert_document_keynote_to_jpg_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_keynote_to_jpg ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_keynote_to_jpg"
  end
  # resource path
  local_var_path = '/convert/key/to/jpg'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'KeynoteToJpgResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_keynote_to_jpg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_keynote_to_pdf(input_file, opts = {}) ⇒ String

Convert Keynote Presentation (KEY) to PDF Convert Mac Keynote Presentation (KEY) to standard PDF

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


1822
1823
1824
1825
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1822

def convert_document_keynote_to_pdf(input_file, opts = {})
  data, _status_code, _headers = convert_document_keynote_to_pdf_with_http_info(input_file, opts)
  data
end

#convert_document_keynote_to_pdf_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert Keynote Presentation (KEY) to PDF Convert Mac Keynote Presentation (KEY) to standard PDF

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1832

def convert_document_keynote_to_pdf_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_keynote_to_pdf ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_keynote_to_pdf"
  end
  # resource path
  local_var_path = '/convert/key/to/pdf'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_keynote_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_keynote_to_png(input_file, opts = {}) ⇒ KeynoteToPngResult

Convert Keynote Presentation (KEY) to PNG image array Converts a Mac Keynote Presentation (KEY) to an array of PNG images, one for each page.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1877
1878
1879
1880
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1877

def convert_document_keynote_to_png(input_file, opts = {})
  data, _status_code, _headers = convert_document_keynote_to_png_with_http_info(input_file, opts)
  data
end

#convert_document_keynote_to_png_with_http_info(input_file, opts = {}) ⇒ Array<(KeynoteToPngResult, Fixnum, Hash)>

Convert Keynote Presentation (KEY) to PNG image array Converts a Mac Keynote Presentation (KEY) to an array of PNG images, one for each page.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(KeynoteToPngResult, Fixnum, Hash)>)

    KeynoteToPngResult data, response status code and response headers



1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1887

def convert_document_keynote_to_png_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_keynote_to_png ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_keynote_to_png"
  end
  # resource path
  local_var_path = '/convert/key/to/png'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'KeynoteToPngResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_keynote_to_png\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_keynote_to_pptx(input_file, opts = {}) ⇒ String

Convert Keynote Presentation (KEY) to PPTX Convert Mac Keynote Presentation (KEY) to PowerPoint Presentation (PPTX)

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


1932
1933
1934
1935
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1932

def convert_document_keynote_to_pptx(input_file, opts = {})
  data, _status_code, _headers = convert_document_keynote_to_pptx_with_http_info(input_file, opts)
  data
end

#convert_document_keynote_to_pptx_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert Keynote Presentation (KEY) to PPTX Convert Mac Keynote Presentation (KEY) to PowerPoint Presentation (PPTX)

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1942

def convert_document_keynote_to_pptx_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_keynote_to_pptx ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_keynote_to_pptx"
  end
  # resource path
  local_var_path = '/convert/key/to/pptx'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_keynote_to_pptx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_msg_to_html(input_file, opts = {}) ⇒ MsgToHtmlResult

Convert Email MSG file to HTML string Convert Outlook Email MSG file to HTML string and attachments. Supports images if they are base 64 inline. Supports most, but not all, RTF bodied MSG files.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body_only (BOOLEAN)

    Optional; If true, the HTML string will only include the body of the MSG. Other information such as subject will still be given as properties in the response object. Default is false.

  • :include_attachments (BOOLEAN)

    Optional; If false, the response object will not include any attachment files from the input file. Default is true.

Returns:



1989
1990
1991
1992
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1989

def convert_document_msg_to_html(input_file, opts = {})
  data, _status_code, _headers = convert_document_msg_to_html_with_http_info(input_file, opts)
  data
end

#convert_document_msg_to_html_with_http_info(input_file, opts = {}) ⇒ Array<(MsgToHtmlResult, Fixnum, Hash)>

Convert Email MSG file to HTML string Convert Outlook Email MSG file to HTML string and attachments. Supports images if they are base 64 inline. Supports most, but not all, RTF bodied MSG files.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body_only (BOOLEAN)

    Optional; If true, the HTML string will only include the body of the MSG. Other information such as subject will still be given as properties in the response object. Default is false.

  • :include_attachments (BOOLEAN)

    Optional; If false, the response object will not include any attachment files from the input file. Default is true.

Returns:

  • (Array<(MsgToHtmlResult, Fixnum, Hash)>)

    MsgToHtmlResult data, response status code and response headers



2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2001

def convert_document_msg_to_html_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_msg_to_html ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_msg_to_html"
  end
  # resource path
  local_var_path = '/convert/msg/to/html'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'bodyOnly'] = opts[:'body_only'] if !opts[:'body_only'].nil?
  header_params[:'includeAttachments'] = opts[:'include_attachments'] if !opts[:'include_attachments'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'MsgToHtmlResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_msg_to_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_msg_to_jpg(input_file, opts = {}) ⇒ MsgToJpgResult

Convert Email MSG file to JPG/JPEG image array Converts an Outlook Message File (MSG) to an array of JPG/JPEG images, one for each page. Customize image quality using quality header.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :quality (Integer)

    Optional; Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75. Default value is 75.

Returns:



2049
2050
2051
2052
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2049

def convert_document_msg_to_jpg(input_file, opts = {})
  data, _status_code, _headers = convert_document_msg_to_jpg_with_http_info(input_file, opts)
  data
end

#convert_document_msg_to_jpg_with_http_info(input_file, opts = {}) ⇒ Array<(MsgToJpgResult, Fixnum, Hash)>

Convert Email MSG file to JPG/JPEG image array Converts an Outlook Message File (MSG) to an array of JPG/JPEG images, one for each page. Customize image quality using quality header.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :quality (Integer)

    Optional; Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75. Default value is 75.

Returns:

  • (Array<(MsgToJpgResult, Fixnum, Hash)>)

    MsgToJpgResult data, response status code and response headers



2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2060

def convert_document_msg_to_jpg_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_msg_to_jpg ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_msg_to_jpg"
  end
  # resource path
  local_var_path = '/convert/msg/to/jpg'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'MsgToJpgResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_msg_to_jpg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_msg_to_pdf(input_file, opts = {}) ⇒ String

Convert Email MSG file to PDF document Convert Outlook Email MSG file to PDF document. Supports images if they are base 64 inline. Supports most, but not all, RTF bodied MSG files.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body_only (BOOLEAN)

    Optional; If true, the HTML string will only include the body of the email. Other information such as subject will still be given as properties in the response object. Default is false.

Returns:

  • (String)


2107
2108
2109
2110
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2107

def convert_document_msg_to_pdf(input_file, opts = {})
  data, _status_code, _headers = convert_document_msg_to_pdf_with_http_info(input_file, opts)
  data
end

#convert_document_msg_to_pdf_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert Email MSG file to PDF document Convert Outlook Email MSG file to PDF document. Supports images if they are base 64 inline. Supports most, but not all, RTF bodied MSG files.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body_only (BOOLEAN)

    Optional; If true, the HTML string will only include the body of the email. Other information such as subject will still be given as properties in the response object. Default is false.

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2118

def convert_document_msg_to_pdf_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_msg_to_pdf ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_msg_to_pdf"
  end
  # resource path
  local_var_path = '/convert/msg/to/pdf'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'bodyOnly'] = opts[:'body_only'] if !opts[:'body_only'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_msg_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_msg_to_png(input_file, opts = {}) ⇒ MsgToPngResult

Convert Email MSG file to PNG image array Converts an Outlook Email Message File (MSG) to an array of PNG images, one for each page.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2164
2165
2166
2167
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2164

def convert_document_msg_to_png(input_file, opts = {})
  data, _status_code, _headers = convert_document_msg_to_png_with_http_info(input_file, opts)
  data
end

#convert_document_msg_to_png_with_http_info(input_file, opts = {}) ⇒ Array<(MsgToPngResult, Fixnum, Hash)>

Convert Email MSG file to PNG image array Converts an Outlook Email Message File (MSG) to an array of PNG images, one for each page.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(MsgToPngResult, Fixnum, Hash)>)

    MsgToPngResult data, response status code and response headers



2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2174

def convert_document_msg_to_png_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_msg_to_png ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_msg_to_png"
  end
  # resource path
  local_var_path = '/convert/msg/to/png'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'MsgToPngResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_msg_to_png\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_odp_to_jpg(input_file, opts = {}) ⇒ OdpToJpgResult

Convert ODP Presentation to JPG/JPEG image array Converts an Open Document Presentation (ODP) to an array of JPG/JPEG images, one for each page. Customize image quality using quality header.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :quality (Integer)

    Optional; Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75. Default value is 75.

Returns:



2220
2221
2222
2223
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2220

def convert_document_odp_to_jpg(input_file, opts = {})
  data, _status_code, _headers = convert_document_odp_to_jpg_with_http_info(input_file, opts)
  data
end

#convert_document_odp_to_jpg_with_http_info(input_file, opts = {}) ⇒ Array<(OdpToJpgResult, Fixnum, Hash)>

Convert ODP Presentation to JPG/JPEG image array Converts an Open Document Presentation (ODP) to an array of JPG/JPEG images, one for each page. Customize image quality using quality header.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :quality (Integer)

    Optional; Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75. Default value is 75.

Returns:

  • (Array<(OdpToJpgResult, Fixnum, Hash)>)

    OdpToJpgResult data, response status code and response headers



2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2231

def convert_document_odp_to_jpg_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_odp_to_jpg ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_odp_to_jpg"
  end
  # resource path
  local_var_path = '/convert/odp/to/jpg'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'OdpToJpgResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_odp_to_jpg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_odp_to_pdf(input_file, opts = {}) ⇒ String

Convert ODP Presentation to PDF Convert Office Open Document Presentation (ODP) to standard PDF

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


2277
2278
2279
2280
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2277

def convert_document_odp_to_pdf(input_file, opts = {})
  data, _status_code, _headers = convert_document_odp_to_pdf_with_http_info(input_file, opts)
  data
end

#convert_document_odp_to_pdf_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert ODP Presentation to PDF Convert Office Open Document Presentation (ODP) to standard PDF

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2287

def convert_document_odp_to_pdf_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_odp_to_pdf ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_odp_to_pdf"
  end
  # resource path
  local_var_path = '/convert/odp/to/pdf'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_odp_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_odp_to_png(input_file, opts = {}) ⇒ OdpToPngResult

Convert ODP Presentation to PNG image array Converts an Office Open Document Presentation (ODP) to an array of PNG images, one for each page.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2332
2333
2334
2335
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2332

def convert_document_odp_to_png(input_file, opts = {})
  data, _status_code, _headers = convert_document_odp_to_png_with_http_info(input_file, opts)
  data
end

#convert_document_odp_to_png_with_http_info(input_file, opts = {}) ⇒ Array<(OdpToPngResult, Fixnum, Hash)>

Convert ODP Presentation to PNG image array Converts an Office Open Document Presentation (ODP) to an array of PNG images, one for each page.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(OdpToPngResult, Fixnum, Hash)>)

    OdpToPngResult data, response status code and response headers



2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2342

def convert_document_odp_to_png_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_odp_to_png ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_odp_to_png"
  end
  # resource path
  local_var_path = '/convert/odp/to/png'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'OdpToPngResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_odp_to_png\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_odp_to_pptx(input_file, opts = {}) ⇒ String

Convert ODP Presentation to PPTX Convert Office Open Document Presentation (ODP) to PowerPoint Presentation (PPTX)

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


2387
2388
2389
2390
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2387

def convert_document_odp_to_pptx(input_file, opts = {})
  data, _status_code, _headers = convert_document_odp_to_pptx_with_http_info(input_file, opts)
  data
end

#convert_document_odp_to_pptx_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert ODP Presentation to PPTX Convert Office Open Document Presentation (ODP) to PowerPoint Presentation (PPTX)

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2397

def convert_document_odp_to_pptx_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_odp_to_pptx ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_odp_to_pptx"
  end
  # resource path
  local_var_path = '/convert/odp/to/pptx'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_odp_to_pptx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_ods_to_jpg(input_file, opts = {}) ⇒ OdsToJpgResult

Convert ODS Spreadsheet to JPG/JPEG image array Converts an Open Document Spreadsheet (ODS) to an array of JPG/JPEG images, one for each page. Customize image quality using quality header.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :quality (Integer)

    Optional; Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75. Default value is 75.

Returns:



2443
2444
2445
2446
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2443

def convert_document_ods_to_jpg(input_file, opts = {})
  data, _status_code, _headers = convert_document_ods_to_jpg_with_http_info(input_file, opts)
  data
end

#convert_document_ods_to_jpg_with_http_info(input_file, opts = {}) ⇒ Array<(OdsToJpgResult, Fixnum, Hash)>

Convert ODS Spreadsheet to JPG/JPEG image array Converts an Open Document Spreadsheet (ODS) to an array of JPG/JPEG images, one for each page. Customize image quality using quality header.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :quality (Integer)

    Optional; Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75. Default value is 75.

Returns:

  • (Array<(OdsToJpgResult, Fixnum, Hash)>)

    OdsToJpgResult data, response status code and response headers



2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2454

def convert_document_ods_to_jpg_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_ods_to_jpg ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_ods_to_jpg"
  end
  # resource path
  local_var_path = '/convert/ods/to/jpg'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'OdsToJpgResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_ods_to_jpg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_ods_to_pdf(input_file, opts = {}) ⇒ String

Convert ODS Spreadsheet to PDF Convert Office Open Document Spreadsheet (ODS) to standard PDF

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


2500
2501
2502
2503
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2500

def convert_document_ods_to_pdf(input_file, opts = {})
  data, _status_code, _headers = convert_document_ods_to_pdf_with_http_info(input_file, opts)
  data
end

#convert_document_ods_to_pdf_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert ODS Spreadsheet to PDF Convert Office Open Document Spreadsheet (ODS) to standard PDF

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2510

def convert_document_ods_to_pdf_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_ods_to_pdf ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_ods_to_pdf"
  end
  # resource path
  local_var_path = '/convert/ods/to/pdf'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_ods_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_ods_to_png(input_file, opts = {}) ⇒ OdsToPngResult

Convert ODS Spreadsheet to PNG image array Converts an Office Open Document Spreadsheet (ODS) to an array of PNG images, one for each page.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2555
2556
2557
2558
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2555

def convert_document_ods_to_png(input_file, opts = {})
  data, _status_code, _headers = convert_document_ods_to_png_with_http_info(input_file, opts)
  data
end

#convert_document_ods_to_png_with_http_info(input_file, opts = {}) ⇒ Array<(OdsToPngResult, Fixnum, Hash)>

Convert ODS Spreadsheet to PNG image array Converts an Office Open Document Spreadsheet (ODS) to an array of PNG images, one for each page.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(OdsToPngResult, Fixnum, Hash)>)

    OdsToPngResult data, response status code and response headers



2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2565

def convert_document_ods_to_png_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_ods_to_png ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_ods_to_png"
  end
  # resource path
  local_var_path = '/convert/ods/to/png'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'OdsToPngResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_ods_to_png\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_ods_to_xlsx(input_file, opts = {}) ⇒ String

Convert ODS Spreadsheet to XLSX Convert Office Open Document Spreadsheet (ODS) to Excel Spreadsheet (XLSX)

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


2610
2611
2612
2613
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2610

def convert_document_ods_to_xlsx(input_file, opts = {})
  data, _status_code, _headers = convert_document_ods_to_xlsx_with_http_info(input_file, opts)
  data
end

#convert_document_ods_to_xlsx_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert ODS Spreadsheet to XLSX Convert Office Open Document Spreadsheet (ODS) to Excel Spreadsheet (XLSX)

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2620

def convert_document_ods_to_xlsx_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_ods_to_xlsx ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_ods_to_xlsx"
  end
  # resource path
  local_var_path = '/convert/ods/to/xlsx'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_ods_to_xlsx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_odt_to_docx(input_file, opts = {}) ⇒ String

Convert ODT Text File to Word DOCX Convert Office Open Document Text File (ODT) to Word DOCX Document

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


2665
2666
2667
2668
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2665

def convert_document_odt_to_docx(input_file, opts = {})
  data, _status_code, _headers = convert_document_odt_to_docx_with_http_info(input_file, opts)
  data
end

#convert_document_odt_to_docx_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert ODT Text File to Word DOCX Convert Office Open Document Text File (ODT) to Word DOCX Document

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2675

def convert_document_odt_to_docx_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_odt_to_docx ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_odt_to_docx"
  end
  # resource path
  local_var_path = '/convert/odt/to/docx'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_odt_to_docx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_odt_to_jpg(input_file, opts = {}) ⇒ OdtToJpgResult

Convert ODT Text File to JPG/JPEG image array Converts an Open Document Text File (ODT) to an array of JPG/JPEG images, one for each page. Customize image quality using quality header.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :quality (Integer)

    Optional; Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75. Default value is 75.

Returns:



2721
2722
2723
2724
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2721

def convert_document_odt_to_jpg(input_file, opts = {})
  data, _status_code, _headers = convert_document_odt_to_jpg_with_http_info(input_file, opts)
  data
end

#convert_document_odt_to_jpg_with_http_info(input_file, opts = {}) ⇒ Array<(OdtToJpgResult, Fixnum, Hash)>

Convert ODT Text File to JPG/JPEG image array Converts an Open Document Text File (ODT) to an array of JPG/JPEG images, one for each page. Customize image quality using quality header.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :quality (Integer)

    Optional; Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75. Default value is 75.

Returns:

  • (Array<(OdtToJpgResult, Fixnum, Hash)>)

    OdtToJpgResult data, response status code and response headers



2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2732

def convert_document_odt_to_jpg_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_odt_to_jpg ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_odt_to_jpg"
  end
  # resource path
  local_var_path = '/convert/odt/to/jpg'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'OdtToJpgResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_odt_to_jpg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_odt_to_pdf(input_file, opts = {}) ⇒ String

Convert ODT Text File to PDF Convert Office Open Document Text File (ODT) to standard PDF

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


2778
2779
2780
2781
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2778

def convert_document_odt_to_pdf(input_file, opts = {})
  data, _status_code, _headers = convert_document_odt_to_pdf_with_http_info(input_file, opts)
  data
end

#convert_document_odt_to_pdf_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert ODT Text File to PDF Convert Office Open Document Text File (ODT) to standard PDF

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2788

def convert_document_odt_to_pdf_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_odt_to_pdf ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_odt_to_pdf"
  end
  # resource path
  local_var_path = '/convert/odt/to/pdf'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_odt_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_odt_to_png(input_file, opts = {}) ⇒ OdtToPngResult

Convert ODT Text File to PNG image array Converts an Office Open Document Text File (ODT) to an array of PNG images, one for each page.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



2833
2834
2835
2836
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2833

def convert_document_odt_to_png(input_file, opts = {})
  data, _status_code, _headers = convert_document_odt_to_png_with_http_info(input_file, opts)
  data
end

#convert_document_odt_to_png_with_http_info(input_file, opts = {}) ⇒ Array<(OdtToPngResult, Fixnum, Hash)>

Convert ODT Text File to PNG image array Converts an Office Open Document Text File (ODT) to an array of PNG images, one for each page.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(OdtToPngResult, Fixnum, Hash)>)

    OdtToPngResult data, response status code and response headers



2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2843

def convert_document_odt_to_png_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_odt_to_png ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_odt_to_png"
  end
  # resource path
  local_var_path = '/convert/odt/to/png'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'OdtToPngResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_odt_to_png\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_pdf_to_docx(input_file, opts = {}) ⇒ String

Convert PDF to Word DOCX Document Convert standard PDF to Office Word Documents (docx). Converts a PDF at high fidelity into Word format, where it can be easily edited and processed.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


2888
2889
2890
2891
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2888

def convert_document_pdf_to_docx(input_file, opts = {})
  data, _status_code, _headers = convert_document_pdf_to_docx_with_http_info(input_file, opts)
  data
end

#convert_document_pdf_to_docx_rasterize(input_file, opts = {}) ⇒ String

Convert PDF to Word DOCX Document based on rasterized version of the PDF Convert standard PDF to Office Word Documents (docx), but first rasterize the PDF. Converts a PDF at high fidelity into Word format.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


2943
2944
2945
2946
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2943

def convert_document_pdf_to_docx_rasterize(input_file, opts = {})
  data, _status_code, _headers = convert_document_pdf_to_docx_rasterize_with_http_info(input_file, opts)
  data
end

#convert_document_pdf_to_docx_rasterize_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert PDF to Word DOCX Document based on rasterized version of the PDF Convert standard PDF to Office Word Documents (docx), but first rasterize the PDF. Converts a PDF at high fidelity into Word format.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2953

def convert_document_pdf_to_docx_rasterize_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_pdf_to_docx_rasterize ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_pdf_to_docx_rasterize"
  end
  # resource path
  local_var_path = '/convert/pdf/to/docx/rasterize'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_pdf_to_docx_rasterize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_pdf_to_docx_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert PDF to Word DOCX Document Convert standard PDF to Office Word Documents (docx). Converts a PDF at high fidelity into Word format, where it can be easily edited and processed.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2898

def convert_document_pdf_to_docx_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_pdf_to_docx ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_pdf_to_docx"
  end
  # resource path
  local_var_path = '/convert/pdf/to/docx'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_pdf_to_docx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_pdf_to_jpg(input_file, opts = {}) ⇒ PdfToJpgResult

Convert PDF to JPG/JPEG image array Converts a PDF Document to an array of JPG/JPEG images, one for each page. Customize image quality using quality header.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :quality (Integer)

    Optional; Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75. Default value is 75.

Returns:



2999
3000
3001
3002
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2999

def convert_document_pdf_to_jpg(input_file, opts = {})
  data, _status_code, _headers = convert_document_pdf_to_jpg_with_http_info(input_file, opts)
  data
end

#convert_document_pdf_to_jpg_with_http_info(input_file, opts = {}) ⇒ Array<(PdfToJpgResult, Fixnum, Hash)>

Convert PDF to JPG/JPEG image array Converts a PDF Document to an array of JPG/JPEG images, one for each page. Customize image quality using quality header.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :quality (Integer)

    Optional; Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75. Default value is 75.

Returns:

  • (Array<(PdfToJpgResult, Fixnum, Hash)>)

    PdfToJpgResult data, response status code and response headers



3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3010

def convert_document_pdf_to_jpg_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_pdf_to_jpg ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_pdf_to_jpg"
  end
  # resource path
  local_var_path = '/convert/pdf/to/jpg'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PdfToJpgResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_pdf_to_jpg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_pdf_to_png_array(input_file, opts = {}) ⇒ PdfToPngResult

Convert PDF to PNG Image Array Convert PDF document to PNG array, one image per page.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3056
3057
3058
3059
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3056

def convert_document_pdf_to_png_array(input_file, opts = {})
  data, _status_code, _headers = convert_document_pdf_to_png_array_with_http_info(input_file, opts)
  data
end

#convert_document_pdf_to_png_array_with_http_info(input_file, opts = {}) ⇒ Array<(PdfToPngResult, Fixnum, Hash)>

Convert PDF to PNG Image Array Convert PDF document to PNG array, one image per page.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(PdfToPngResult, Fixnum, Hash)>)

    PdfToPngResult data, response status code and response headers



3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3066

def convert_document_pdf_to_png_array_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_pdf_to_png_array ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_pdf_to_png_array"
  end
  # resource path
  local_var_path = '/convert/pdf/to/png'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PdfToPngResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_pdf_to_png_array\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_pdf_to_png_single(input_file, opts = {}) ⇒ String

Convert PDF to Single PNG image Convert PDF document to a single tall PNG image, by stacking/concatenating the images vertically into a single "tall" image

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


3111
3112
3113
3114
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3111

def convert_document_pdf_to_png_single(input_file, opts = {})
  data, _status_code, _headers = convert_document_pdf_to_png_single_with_http_info(input_file, opts)
  data
end

#convert_document_pdf_to_png_single_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert PDF to Single PNG image Convert PDF document to a single tall PNG image, by stacking/concatenating the images vertically into a single &quot;tall&quot; image

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3121

def convert_document_pdf_to_png_single_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_pdf_to_png_single ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_pdf_to_png_single"
  end
  # resource path
  local_var_path = '/convert/pdf/to/png/merge-single'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_pdf_to_png_single\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_pdf_to_pptx(input_file, opts = {}) ⇒ String

Convert PDF to PowerPoint PPTX Presentation Convert standard PDF to Office PowerPoint Presentation (pptx). Converts a PDF file at high fidelity into PowerPoint format, where it can be easily edited and processed.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


3166
3167
3168
3169
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3166

def convert_document_pdf_to_pptx(input_file, opts = {})
  data, _status_code, _headers = convert_document_pdf_to_pptx_with_http_info(input_file, opts)
  data
end

#convert_document_pdf_to_pptx_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert PDF to PowerPoint PPTX Presentation Convert standard PDF to Office PowerPoint Presentation (pptx). Converts a PDF file at high fidelity into PowerPoint format, where it can be easily edited and processed.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3176

def convert_document_pdf_to_pptx_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_pdf_to_pptx ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_pdf_to_pptx"
  end
  # resource path
  local_var_path = '/convert/pdf/to/pptx'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_pdf_to_pptx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_pdf_to_txt(input_file, opts = {}) ⇒ TextConversionResult

Convert PDF Document to Text (txt) PDF document to text

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :text_formatting_mode (String)

    Optional; specify how whitespace should be handled when converting PDF to text. Possible values are &#39;preserveWhitespace&#39; which will attempt to preserve whitespace in the document and relative positioning of text within the document, and &#39;minimizeWhitespace&#39; which will not insert additional spaces into the document in most cases. Default is &#39;preserveWhitespace&#39;.

Returns:



3222
3223
3224
3225
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3222

def convert_document_pdf_to_txt(input_file, opts = {})
  data, _status_code, _headers = convert_document_pdf_to_txt_with_http_info(input_file, opts)
  data
end

#convert_document_pdf_to_txt_with_http_info(input_file, opts = {}) ⇒ Array<(TextConversionResult, Fixnum, Hash)>

Convert PDF Document to Text (txt) PDF document to text

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :text_formatting_mode (String)

    Optional; specify how whitespace should be handled when converting PDF to text. Possible values are &#39;preserveWhitespace&#39; which will attempt to preserve whitespace in the document and relative positioning of text within the document, and &#39;minimizeWhitespace&#39; which will not insert additional spaces into the document in most cases. Default is &#39;preserveWhitespace&#39;.

Returns:

  • (Array<(TextConversionResult, Fixnum, Hash)>)

    TextConversionResult data, response status code and response headers



3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3233

def convert_document_pdf_to_txt_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_pdf_to_txt ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_pdf_to_txt"
  end
  # resource path
  local_var_path = '/convert/pdf/to/txt'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'textFormattingMode'] = opts[:'text_formatting_mode'] if !opts[:'text_formatting_mode'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TextConversionResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_pdf_to_txt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_png_array_to_pdf(input_file1, input_file2, opts = {}) ⇒ String

Convert PNG Array to PDF Convert an array of PNG images, one image per page, into a newly-created PDF. Supports images of different sizes as input.

Parameters:

  • input_file1

    First input file to perform the operation on.

  • input_file2

    Second input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :input_file3 (File)

    Third input file to perform the operation on.

  • :input_file4 (File)

    Fourth input file to perform the operation on.

  • :input_file5 (File)

    Fifth input file to perform the operation on.

  • :input_file6 (File)

    Sixth input file to perform the operation on.

  • :input_file7 (File)

    Seventh input file to perform the operation on.

  • :input_file8 (File)

    Eighth input file to perform the operation on.

  • :input_file9 (File)

    Ninth input file to perform the operation on.

  • :input_file10 (File)

    Tenth input file to perform the operation on.

Returns:

  • (String)


3288
3289
3290
3291
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3288

def convert_document_png_array_to_pdf(input_file1, input_file2, opts = {})
  data, _status_code, _headers = convert_document_png_array_to_pdf_with_http_info(input_file1, input_file2, opts)
  data
end

#convert_document_png_array_to_pdf_with_http_info(input_file1, input_file2, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert PNG Array to PDF Convert an array of PNG images, one image per page, into a newly-created PDF. Supports images of different sizes as input.

Parameters:

  • input_file1

    First input file to perform the operation on.

  • input_file2

    Second input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :input_file3 (File)

    Third input file to perform the operation on.

  • :input_file4 (File)

    Fourth input file to perform the operation on.

  • :input_file5 (File)

    Fifth input file to perform the operation on.

  • :input_file6 (File)

    Sixth input file to perform the operation on.

  • :input_file7 (File)

    Seventh input file to perform the operation on.

  • :input_file8 (File)

    Eighth input file to perform the operation on.

  • :input_file9 (File)

    Ninth input file to perform the operation on.

  • :input_file10 (File)

    Tenth input file to perform the operation on.

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3307

def convert_document_png_array_to_pdf_with_http_info(input_file1, input_file2, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_png_array_to_pdf ...'
  end
  # verify the required parameter 'input_file1' is set
  if @api_client.config.client_side_validation && input_file1.nil?
    fail ArgumentError, "Missing the required parameter 'input_file1' when calling ConvertDocumentApi.convert_document_png_array_to_pdf"
  end
  # verify the required parameter 'input_file2' is set
  if @api_client.config.client_side_validation && input_file2.nil?
    fail ArgumentError, "Missing the required parameter 'input_file2' when calling ConvertDocumentApi.convert_document_png_array_to_pdf"
  end
  # resource path
  local_var_path = '/convert/png/to/pdf'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile1'] = input_file1
  form_params['inputFile2'] = input_file2
  form_params['inputFile3'] = opts[:'input_file3'] if !opts[:'input_file3'].nil?
  form_params['inputFile4'] = opts[:'input_file4'] if !opts[:'input_file4'].nil?
  form_params['inputFile5'] = opts[:'input_file5'] if !opts[:'input_file5'].nil?
  form_params['inputFile6'] = opts[:'input_file6'] if !opts[:'input_file6'].nil?
  form_params['inputFile7'] = opts[:'input_file7'] if !opts[:'input_file7'].nil?
  form_params['inputFile8'] = opts[:'input_file8'] if !opts[:'input_file8'].nil?
  form_params['inputFile9'] = opts[:'input_file9'] if !opts[:'input_file9'].nil?
  form_params['inputFile10'] = opts[:'input_file10'] if !opts[:'input_file10'].nil?

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_png_array_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_ppt_to_pdf(input_file, opts = {}) ⇒ String

Convert PowerPoint PPT (97-03) Presentation to PDF Convert Office PowerPoint (97-2003) Documents (ppt) to standard PDF

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


3365
3366
3367
3368
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3365

def convert_document_ppt_to_pdf(input_file, opts = {})
  data, _status_code, _headers = convert_document_ppt_to_pdf_with_http_info(input_file, opts)
  data
end

#convert_document_ppt_to_pdf_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert PowerPoint PPT (97-03) Presentation to PDF Convert Office PowerPoint (97-2003) Documents (ppt) to standard PDF

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3375

def convert_document_ppt_to_pdf_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_ppt_to_pdf ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_ppt_to_pdf"
  end
  # resource path
  local_var_path = '/convert/ppt/to/pdf'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_ppt_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_ppt_to_pptx(input_file, opts = {}) ⇒ String

Convert PowerPoint PPT (97-03) Presentation to PPTX Convert/upgrade Office PowerPoint (97-2003) Documents (ppt) to modern PPTX

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


3420
3421
3422
3423
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3420

def convert_document_ppt_to_pptx(input_file, opts = {})
  data, _status_code, _headers = convert_document_ppt_to_pptx_with_http_info(input_file, opts)
  data
end

#convert_document_ppt_to_pptx_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert PowerPoint PPT (97-03) Presentation to PPTX Convert/upgrade Office PowerPoint (97-2003) Documents (ppt) to modern PPTX

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3430

def convert_document_ppt_to_pptx_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_ppt_to_pptx ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_ppt_to_pptx"
  end
  # resource path
  local_var_path = '/convert/ppt/to/pptx'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_ppt_to_pptx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_pptx_to_pdf(input_file, opts = {}) ⇒ String

Convert PowerPoint PPTX Presentation to PDF Convert Office PowerPoint Documents (pptx) to standard PDF

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


3475
3476
3477
3478
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3475

def convert_document_pptx_to_pdf(input_file, opts = {})
  data, _status_code, _headers = convert_document_pptx_to_pdf_with_http_info(input_file, opts)
  data
end

#convert_document_pptx_to_pdf_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert PowerPoint PPTX Presentation to PDF Convert Office PowerPoint Documents (pptx) to standard PDF

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3485

def convert_document_pptx_to_pdf_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_pptx_to_pdf ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_pptx_to_pdf"
  end
  # resource path
  local_var_path = '/convert/pptx/to/pdf'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_pptx_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_pptx_to_png(input_file, opts = {}) ⇒ PptxToPngResult

Convert PowerPoint PPTX to PNG image array Converts a PowerPoint Presentation (PPTX) file to an array of PNG images, one for each page.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3530
3531
3532
3533
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3530

def convert_document_pptx_to_png(input_file, opts = {})
  data, _status_code, _headers = convert_document_pptx_to_png_with_http_info(input_file, opts)
  data
end

#convert_document_pptx_to_png_with_http_info(input_file, opts = {}) ⇒ Array<(PptxToPngResult, Fixnum, Hash)>

Convert PowerPoint PPTX to PNG image array Converts a PowerPoint Presentation (PPTX) file to an array of PNG images, one for each page.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(PptxToPngResult, Fixnum, Hash)>)

    PptxToPngResult data, response status code and response headers



3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3540

def convert_document_pptx_to_png_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_pptx_to_png ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_pptx_to_png"
  end
  # resource path
  local_var_path = '/convert/pptx/to/png'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'PptxToPngResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_pptx_to_png\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_pptx_to_ppt(opts = {}) ⇒ Object

Convert PowerPoint PPTX presentation to Legacy PowerPoint PPT (97-03) Convert/downgrade modern Office PowerPoint PPTX Presentation to the legacy PowerPoint PPT (97-2003 Format) format

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Object)


3584
3585
3586
3587
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3584

def convert_document_pptx_to_ppt(opts = {})
  data, _status_code, _headers = convert_document_pptx_to_ppt_with_http_info(opts)
  data
end

#convert_document_pptx_to_ppt_with_http_info(opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Convert PowerPoint PPTX presentation to Legacy PowerPoint PPT (97-03) Convert/downgrade modern Office PowerPoint PPTX Presentation to the legacy PowerPoint PPT (97-2003 Format) format

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Object, Fixnum, Hash)>)

    Object data, response status code and response headers



3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3593

def convert_document_pptx_to_ppt_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_pptx_to_ppt ...'
  end
  # resource path
  local_var_path = '/convert/pptx/to/ppt'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'Object')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_pptx_to_ppt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_pptx_to_txt(input_file, opts = {}) ⇒ TextConversionResult

Convert PowerPoint PPTX Presentation to Text (txt) Convert Office PowerPoint Documents (pptx) to standard Text

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3631
3632
3633
3634
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3631

def convert_document_pptx_to_txt(input_file, opts = {})
  data, _status_code, _headers = convert_document_pptx_to_txt_with_http_info(input_file, opts)
  data
end

#convert_document_pptx_to_txt_with_http_info(input_file, opts = {}) ⇒ Array<(TextConversionResult, Fixnum, Hash)>

Convert PowerPoint PPTX Presentation to Text (txt) Convert Office PowerPoint Documents (pptx) to standard Text

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(TextConversionResult, Fixnum, Hash)>)

    TextConversionResult data, response status code and response headers



3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3641

def convert_document_pptx_to_txt_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_pptx_to_txt ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_pptx_to_txt"
  end
  # resource path
  local_var_path = '/convert/pptx/to/txt'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TextConversionResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_pptx_to_txt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_rtf_to_docx(input_file, opts = {}) ⇒ String

Convert Rich Text Format RTF to DOCX Document Convert Rich Text Format Document (RTF) to Word DOCX Document

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


3686
3687
3688
3689
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3686

def convert_document_rtf_to_docx(input_file, opts = {})
  data, _status_code, _headers = convert_document_rtf_to_docx_with_http_info(input_file, opts)
  data
end

#convert_document_rtf_to_docx_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert Rich Text Format RTF to DOCX Document Convert Rich Text Format Document (RTF) to Word DOCX Document

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3696

def convert_document_rtf_to_docx_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_rtf_to_docx ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_rtf_to_docx"
  end
  # resource path
  local_var_path = '/convert/rtf/to/docx'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_rtf_to_docx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_rtf_to_html(input_file, opts = {}) ⇒ String

Convert Rich Text Format RTF to HTML Document Convert Rich Text Format Document (RTF) to HTML Document

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


3741
3742
3743
3744
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3741

def convert_document_rtf_to_html(input_file, opts = {})
  data, _status_code, _headers = convert_document_rtf_to_html_with_http_info(input_file, opts)
  data
end

#convert_document_rtf_to_html_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert Rich Text Format RTF to HTML Document Convert Rich Text Format Document (RTF) to HTML Document

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3751

def convert_document_rtf_to_html_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_rtf_to_html ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_rtf_to_html"
  end
  # resource path
  local_var_path = '/convert/rtf/to/html'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_rtf_to_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_rtf_to_jpg(input_file, opts = {}) ⇒ RtfToJpgResult

Convert Rich Text Format RTF to JPG/JPEG image array Converts a Rich Text Format Document (RTF) to an array of JPG/JPEG images, one for each page. Customize image quality using quality header.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :quality (Integer)

    Optional; Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75. Default value is 75.

Returns:



3797
3798
3799
3800
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3797

def convert_document_rtf_to_jpg(input_file, opts = {})
  data, _status_code, _headers = convert_document_rtf_to_jpg_with_http_info(input_file, opts)
  data
end

#convert_document_rtf_to_jpg_with_http_info(input_file, opts = {}) ⇒ Array<(RtfToJpgResult, Fixnum, Hash)>

Convert Rich Text Format RTF to JPG/JPEG image array Converts a Rich Text Format Document (RTF) to an array of JPG/JPEG images, one for each page. Customize image quality using quality header.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :quality (Integer)

    Optional; Set the JPEG quality level; lowest quality is 1 (highest compression), highest quality (lowest compression) is 100; recommended value is 75. Default value is 75.

Returns:

  • (Array<(RtfToJpgResult, Fixnum, Hash)>)

    RtfToJpgResult data, response status code and response headers



3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3808

def convert_document_rtf_to_jpg_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_rtf_to_jpg ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_rtf_to_jpg"
  end
  # resource path
  local_var_path = '/convert/rtf/to/jpg'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RtfToJpgResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_rtf_to_jpg\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_rtf_to_pdf(input_file, opts = {}) ⇒ String

Convert Rich Text Format RTF to PDF Convert Rich Text Format Document (RTF) to standard PDF

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


3854
3855
3856
3857
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3854

def convert_document_rtf_to_pdf(input_file, opts = {})
  data, _status_code, _headers = convert_document_rtf_to_pdf_with_http_info(input_file, opts)
  data
end

#convert_document_rtf_to_pdf_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert Rich Text Format RTF to PDF Convert Rich Text Format Document (RTF) to standard PDF

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3864

def convert_document_rtf_to_pdf_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_rtf_to_pdf ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_rtf_to_pdf"
  end
  # resource path
  local_var_path = '/convert/rtf/to/pdf'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_rtf_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_rtf_to_png(input_file, opts = {}) ⇒ RtfToPngResult

Convert Rich Text Format RTF to PNG image array Converts a Rich Text Format Document (RTF) to an array of PNG images, one for each page.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



3909
3910
3911
3912
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3909

def convert_document_rtf_to_png(input_file, opts = {})
  data, _status_code, _headers = convert_document_rtf_to_png_with_http_info(input_file, opts)
  data
end

#convert_document_rtf_to_png_with_http_info(input_file, opts = {}) ⇒ Array<(RtfToPngResult, Fixnum, Hash)>

Convert Rich Text Format RTF to PNG image array Converts a Rich Text Format Document (RTF) to an array of PNG images, one for each page.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(RtfToPngResult, Fixnum, Hash)>)

    RtfToPngResult data, response status code and response headers



3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3919

def convert_document_rtf_to_png_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_rtf_to_png ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_rtf_to_png"
  end
  # resource path
  local_var_path = '/convert/rtf/to/png'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RtfToPngResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_rtf_to_png\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_xls_to_csv(input_file, opts = {}) ⇒ String

Convert Excel XLS (97-03) Spreadsheet to CSV Convert/upgrade Office Excel (97-2003) Workbooks (xls) to standard CSV format.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


3964
3965
3966
3967
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3964

def convert_document_xls_to_csv(input_file, opts = {})
  data, _status_code, _headers = convert_document_xls_to_csv_with_http_info(input_file, opts)
  data
end

#convert_document_xls_to_csv_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert Excel XLS (97-03) Spreadsheet to CSV Convert/upgrade Office Excel (97-2003) Workbooks (xls) to standard CSV format.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3974

def convert_document_xls_to_csv_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_xls_to_csv ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_xls_to_csv"
  end
  # resource path
  local_var_path = '/convert/xls/to/csv'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_xls_to_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_xls_to_pdf(input_file, opts = {}) ⇒ String

Convert Excel XLS (97-03) Spreadsheet to PDF Convert Office Excel (97-2003) Workbooks (xls) to standard PDF. Converts all worksheets in the workbook to PDF.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


4019
4020
4021
4022
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4019

def convert_document_xls_to_pdf(input_file, opts = {})
  data, _status_code, _headers = convert_document_xls_to_pdf_with_http_info(input_file, opts)
  data
end

#convert_document_xls_to_pdf_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert Excel XLS (97-03) Spreadsheet to PDF Convert Office Excel (97-2003) Workbooks (xls) to standard PDF. Converts all worksheets in the workbook to PDF.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4029

def convert_document_xls_to_pdf_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_xls_to_pdf ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_xls_to_pdf"
  end
  # resource path
  local_var_path = '/convert/xls/to/pdf'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_xls_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_xls_to_xlsx(input_file, opts = {}) ⇒ String

Convert Excel XLS (97-03) Spreadsheet to XLSX Convert/upgrade Office Excel (97-2003) Workbooks (xls) to modern XLSX format.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


4074
4075
4076
4077
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4074

def convert_document_xls_to_xlsx(input_file, opts = {})
  data, _status_code, _headers = convert_document_xls_to_xlsx_with_http_info(input_file, opts)
  data
end

#convert_document_xls_to_xlsx_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert Excel XLS (97-03) Spreadsheet to XLSX Convert/upgrade Office Excel (97-2003) Workbooks (xls) to modern XLSX format.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4084

def convert_document_xls_to_xlsx_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_xls_to_xlsx ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_xls_to_xlsx"
  end
  # resource path
  local_var_path = '/convert/xls/to/xlsx'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_xls_to_xlsx\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_xlsx_to_csv(input_file, opts = {}) ⇒ String

Convert Excel XLSX Spreadsheet to CSV, Single Worksheet Convert Office Excel Workbooks (XLSX) to standard Comma-Separated Values (CSV) format. Supports both XLSX and XLSB file Excel formats. If the input file contains multiple worksheets, the first one is used. If you wish to convert all of the worksheets (not just the first one), be sure to use the xlsx/to/csv/multi API.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :output_encoding (String)

    Optional, set the output text encoding for the result; possible values are UTF-8, ASCII and UTF-32. Default is UTF-8.

Returns:

  • (String)


4130
4131
4132
4133
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4130

def convert_document_xlsx_to_csv(input_file, opts = {})
  data, _status_code, _headers = convert_document_xlsx_to_csv_with_http_info(input_file, opts)
  data
end

#convert_document_xlsx_to_csv_multi(input_file, opts = {}) ⇒ CsvCollection

Convert Excel XLSX Spreadsheet to CSV, Multiple Worksheets Convert Office Excel Workbooks (XLSX) to standard Comma-Separated Values (CSV) format, with support for multiple worksheets. Supports both XLSX and XLSB file Excel formats. Returns multiple CSV files, one for each worksheet (tab) in the spreadsheet.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :output_encoding (String)

    Optional, set the output text encoding for the result; possible values are UTF-8, ASCII and UTF-32. Default is UTF-8.

Returns:



4188
4189
4190
4191
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4188

def convert_document_xlsx_to_csv_multi(input_file, opts = {})
  data, _status_code, _headers = convert_document_xlsx_to_csv_multi_with_http_info(input_file, opts)
  data
end

#convert_document_xlsx_to_csv_multi_with_http_info(input_file, opts = {}) ⇒ Array<(CsvCollection, Fixnum, Hash)>

Convert Excel XLSX Spreadsheet to CSV, Multiple Worksheets Convert Office Excel Workbooks (XLSX) to standard Comma-Separated Values (CSV) format, with support for multiple worksheets. Supports both XLSX and XLSB file Excel formats. Returns multiple CSV files, one for each worksheet (tab) in the spreadsheet.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :output_encoding (String)

    Optional, set the output text encoding for the result; possible values are UTF-8, ASCII and UTF-32. Default is UTF-8.

Returns:

  • (Array<(CsvCollection, Fixnum, Hash)>)

    CsvCollection data, response status code and response headers



4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4199

def convert_document_xlsx_to_csv_multi_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_xlsx_to_csv_multi ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_xlsx_to_csv_multi"
  end
  # resource path
  local_var_path = '/convert/xlsx/to/csv/multi'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'outputEncoding'] = opts[:'output_encoding'] if !opts[:'output_encoding'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CsvCollection')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_xlsx_to_csv_multi\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_xlsx_to_csv_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert Excel XLSX Spreadsheet to CSV, Single Worksheet Convert Office Excel Workbooks (XLSX) to standard Comma-Separated Values (CSV) format. Supports both XLSX and XLSB file Excel formats. If the input file contains multiple worksheets, the first one is used. If you wish to convert all of the worksheets (not just the first one), be sure to use the xlsx/to/csv/multi API.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :output_encoding (String)

    Optional, set the output text encoding for the result; possible values are UTF-8, ASCII and UTF-32. Default is UTF-8.

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4141

def convert_document_xlsx_to_csv_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_xlsx_to_csv ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_xlsx_to_csv"
  end
  # resource path
  local_var_path = '/convert/xlsx/to/csv'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
  header_params[:'outputEncoding'] = opts[:'output_encoding'] if !opts[:'output_encoding'].nil?

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_xlsx_to_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_xlsx_to_html(input_file, opts = {}) ⇒ String

Convert Excel XLSX Spreadsheet to HTML Document Convert Office Excel Spreadsheet (XLSX) to HTML Document. Converts all worksheets to HTML. Supports both XLSX and XLSB Excel file formats.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


4245
4246
4247
4248
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4245

def convert_document_xlsx_to_html(input_file, opts = {})
  data, _status_code, _headers = convert_document_xlsx_to_html_with_http_info(input_file, opts)
  data
end

#convert_document_xlsx_to_html_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert Excel XLSX Spreadsheet to HTML Document Convert Office Excel Spreadsheet (XLSX) to HTML Document. Converts all worksheets to HTML. Supports both XLSX and XLSB Excel file formats.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4255

def convert_document_xlsx_to_html_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_xlsx_to_html ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_xlsx_to_html"
  end
  # resource path
  local_var_path = '/convert/xlsx/to/html'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_xlsx_to_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_xlsx_to_pdf(input_file, opts = {}) ⇒ String

Convert Excel XLSX Spreadsheet to PDF Convert Office Excel Workbooks (XLSX) to standard PDF. Converts all worksheets in the workbook to PDF. Supports both XLSX and XLSB Excel file formats.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


4300
4301
4302
4303
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4300

def convert_document_xlsx_to_pdf(input_file, opts = {})
  data, _status_code, _headers = convert_document_xlsx_to_pdf_with_http_info(input_file, opts)
  data
end

#convert_document_xlsx_to_pdf_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert Excel XLSX Spreadsheet to PDF Convert Office Excel Workbooks (XLSX) to standard PDF. Converts all worksheets in the workbook to PDF. Supports both XLSX and XLSB Excel file formats.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4310

def convert_document_xlsx_to_pdf_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_xlsx_to_pdf ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_xlsx_to_pdf"
  end
  # resource path
  local_var_path = '/convert/xlsx/to/pdf'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_xlsx_to_pdf\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_xlsx_to_png(input_file, opts = {}) ⇒ XlsxToPngResult

Convert Excel XLSX spreadsheet to PNG image array Converts an Excel Spreadsheet (XLSX) file to an array of PNG images, one for each page.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



4355
4356
4357
4358
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4355

def convert_document_xlsx_to_png(input_file, opts = {})
  data, _status_code, _headers = convert_document_xlsx_to_png_with_http_info(input_file, opts)
  data
end

#convert_document_xlsx_to_png_with_http_info(input_file, opts = {}) ⇒ Array<(XlsxToPngResult, Fixnum, Hash)>

Convert Excel XLSX spreadsheet to PNG image array Converts an Excel Spreadsheet (XLSX) file to an array of PNG images, one for each page.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(XlsxToPngResult, Fixnum, Hash)>)

    XlsxToPngResult data, response status code and response headers



4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4365

def convert_document_xlsx_to_png_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_xlsx_to_png ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_xlsx_to_png"
  end
  # resource path
  local_var_path = '/convert/xlsx/to/png'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'XlsxToPngResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_xlsx_to_png\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_xlsx_to_txt(input_file, opts = {}) ⇒ TextConversionResult

Convert Excel XLSX Spreadsheet to Text (txt) Convert Office Excel Workbooks (XLSX) to standard Text. Converts all worksheets in the workbook to Text. Supports both XLSX and XLSB file formats. When a spreadsheet contains multiple worksheets, will export all of the text from all of the worksheets. If you wish to export the text from only one worksheet, try using the Split XLSX API to split the spreadsheet into multiple worksheet files, and then run XLSX to Text on the individual worksheet file that you need to extract the text from.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



4410
4411
4412
4413
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4410

def convert_document_xlsx_to_txt(input_file, opts = {})
  data, _status_code, _headers = convert_document_xlsx_to_txt_with_http_info(input_file, opts)
  data
end

#convert_document_xlsx_to_txt_with_http_info(input_file, opts = {}) ⇒ Array<(TextConversionResult, Fixnum, Hash)>

Convert Excel XLSX Spreadsheet to Text (txt) Convert Office Excel Workbooks (XLSX) to standard Text. Converts all worksheets in the workbook to Text. Supports both XLSX and XLSB file formats. When a spreadsheet contains multiple worksheets, will export all of the text from all of the worksheets. If you wish to export the text from only one worksheet, try using the Split XLSX API to split the spreadsheet into multiple worksheet files, and then run XLSX to Text on the individual worksheet file that you need to extract the text from.

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(TextConversionResult, Fixnum, Hash)>)

    TextConversionResult data, response status code and response headers



4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4420

def convert_document_xlsx_to_txt_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_xlsx_to_txt ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_xlsx_to_txt"
  end
  # resource path
  local_var_path = '/convert/xlsx/to/txt'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TextConversionResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_xlsx_to_txt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#convert_document_xlsx_to_xls(input_file, opts = {}) ⇒ String

Convert Excel XLSX Spreadsheet to Legacy Excel XLS (97-03) Convert/downgrade modern Office Excel XLSX Spreadsheet to the legacy Excel XLS (97-2003 Format) format

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


4465
4466
4467
4468
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4465

def convert_document_xlsx_to_xls(input_file, opts = {})
  data, _status_code, _headers = convert_document_xlsx_to_xls_with_http_info(input_file, opts)
  data
end

#convert_document_xlsx_to_xls_with_http_info(input_file, opts = {}) ⇒ Array<(String, Fixnum, Hash)>

Convert Excel XLSX Spreadsheet to Legacy Excel XLS (97-03) Convert/downgrade modern Office Excel XLSX Spreadsheet to the legacy Excel XLS (97-2003 Format) format

Parameters:

  • input_file

    Input file to perform the operation on.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Fixnum, Hash)>)

    String data, response status code and response headers



4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4475

def convert_document_xlsx_to_xls_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_xlsx_to_xls ...'
  end
  # verify the required parameter 'input_file' is set
  if @api_client.config.client_side_validation && input_file.nil?
    fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_xlsx_to_xls"
  end
  # resource path
  local_var_path = '/convert/xlsx/to/xls'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])

  # form parameters
  form_params = {}
  form_params['inputFile'] = input_file

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_xlsx_to_xls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end