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, text 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_batch_job(input_file, opts = {}) ⇒ ConvertDocumentBatchJobCreateResult

Convert Document to PDF as Batch Job 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, text files, and even multi-page TIFF files. This API is designed for large jobs that could take a long time to create and so runs as a batch job that returns a Job ID that you can use with the GetAsyncJobStatus API to check on the status of the Job and ultimately get the output result. This API is only available for Cloudmersive Managed Instance and Private Cloud deployments.

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_pdf_batch_job(input_file, opts = {})
  data, _status_code, _headers = convert_document_autodetect_to_pdf_batch_job_with_http_info(input_file, opts)
  data
end

#convert_document_autodetect_to_pdf_batch_job_with_http_info(input_file, opts = {}) ⇒ Array<(ConvertDocumentBatchJobCreateResult, Fixnum, Hash)>

Convert Document to PDF as Batch Job 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, text files, and even multi-page TIFF files. This API is designed for large jobs that could take a long time to create and so runs as a batch job that returns a Job ID that you can use with the GetAsyncJobStatus API to check on the status of the Job and ultimately get the output result. This API is only available for Cloudmersive Managed Instance and Private Cloud deployments.

Parameters:

  • input_file

    Input file to perform the operation on.

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

    the optional parameters

Returns:



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_pdf_batch_job_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_autodetect_to_pdf_batch_job ...'
  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_batch_job"
  end
  # resource path
  local_var_path = '/convert/autodetect/to/pdf/batch-job'

  # 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 => 'ConvertDocumentBatchJobCreateResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_autodetect_to_pdf_batch_job\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
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, text 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:



250
251
252
253
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 250

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



260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 260

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)


308
309
310
311
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 308

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



321
322
323
324
325
326
327
328
329
330
331
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
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 321

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:



373
374
375
376
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 373

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:



387
388
389
390
391
392
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
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 387

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:



437
438
439
440
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 437

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



448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 448

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)


504
505
506
507
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 504

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



524
525
526
527
528
529
530
531
532
533
534
535
536
537
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 524

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)


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

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



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_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)


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

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



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_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)


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

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



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_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)


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

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



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_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)


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

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



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_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:



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

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



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_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)


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

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



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_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)


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

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



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

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:



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

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



1035
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 1035

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)


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

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



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_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:



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

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



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_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)


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

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



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

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:



1247
1248
1249
1250
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1247

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



1258
1259
1260
1261
1262
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
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1258

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:



1306
1307
1308
1309
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1306

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



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

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:



1366
1367
1368
1369
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1366

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



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

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)


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

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



1435
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 1435

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:



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

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



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

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_async_job_status(async_job_id, opts = {}) ⇒ ConvertDocumentJobStatusResult

Get the status and result of a Convert Document Batch Job Returns the result of the Async Job - possible states can be STARTED or COMPLETED. This API is only available for Cloudmersive Managed Instance and Private Cloud deployments.

Parameters:

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

    the optional parameters

Returns:



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

def convert_document_get_async_job_status(async_job_id, opts = {})
  data, _status_code, _headers = convert_document_get_async_job_status_with_http_info(async_job_id, opts)
  data
end

#convert_document_get_async_job_status_with_http_info(async_job_id, opts = {}) ⇒ Array<(ConvertDocumentJobStatusResult, Fixnum, Hash)>

Get the status and result of a Convert Document Batch Job Returns the result of the Async Job - possible states can be STARTED or COMPLETED. This API is only available for Cloudmersive Managed Instance and Private Cloud deployments.

Parameters:

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

    the optional parameters

Returns:



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

def convert_document_get_async_job_status_with_http_info(async_job_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_get_async_job_status ...'
  end
  # verify the required parameter 'async_job_id' is set
  if @api_client.config.client_side_validation && async_job_id.nil?
    fail ArgumentError, "Missing the required parameter 'async_job_id' when calling ConvertDocumentApi.convert_document_get_async_job_status"
  end
  # resource path
  local_var_path = '/convert/batch-job/status'

  # query parameters
  query_params = {}
  query_params[:'AsyncJobID'] = async_job_id

  # 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'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'ConvertDocumentJobStatusResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_get_async_job_status\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)


1590
1591
1592
1593
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1590

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:



1646
1647
1648
1649
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1646

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



1657
1658
1659
1660
1661
1662
1663
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
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1657

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



1601
1602
1603
1604
1605
1606
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
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1601

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)


1703
1704
1705
1706
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1703

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



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

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:



1762
1763
1764
1765
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1762

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



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

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:



1817
1818
1819
1820
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1817

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



1827
1828
1829
1830
1831
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
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1827

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:



1873
1874
1875
1876
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1873

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



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

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)


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

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



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

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:



1985
1986
1987
1988
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1985

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



1995
1996
1997
1998
1999
2000
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
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 1995

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)


2040
2041
2042
2043
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2040

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



2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
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
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2050

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:



2097
2098
2099
2100
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2097

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



2109
2110
2111
2112
2113
2114
2115
2116
2117
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
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2109

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:



2157
2158
2159
2160
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2157

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



2168
2169
2170
2171
2172
2173
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
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2168

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)


2215
2216
2217
2218
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2215

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



2226
2227
2228
2229
2230
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
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2226

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:



2272
2273
2274
2275
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2272

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



2282
2283
2284
2285
2286
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
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2282

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:



2328
2329
2330
2331
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2328

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



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

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)


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

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



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

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:



2440
2441
2442
2443
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2440

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



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

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)


2495
2496
2497
2498
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2495

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



2505
2506
2507
2508
2509
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
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2505

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:



2551
2552
2553
2554
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2551

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



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

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)


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

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



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

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:



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

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



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

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)


2718
2719
2720
2721
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2718

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



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

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)


2773
2774
2775
2776
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2773

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



2783
2784
2785
2786
2787
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
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2783

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:



2829
2830
2831
2832
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2829

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



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

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)


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

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



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

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:



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

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



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

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)


2996
2997
2998
2999
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 2996

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)


3051
3052
3053
3054
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3051

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



3061
3062
3063
3064
3065
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
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3061

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



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

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:



3107
3108
3109
3110
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3107

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



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

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. Returns PNG images as temporary expiring URLs.

Parameters:

  • input_file

    Input file to perform the operation on.

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

    the optional parameters

Options Hash (opts):

  • :dpi (Integer)

    Optional; configures the pixel density in Dots per Inch (DPI) (default is 300). This parameter can only be used with Cloudmersive Managed Instance and Private Cloud.

Returns:



3165
3166
3167
3168
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3165

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_direct(input_file, opts = {}) ⇒ PdfToPngDirectResult

Convert PDF to PNG Image Array (Direct) Convert PDF document to PNG array, one image per page. Returns PNG images directly in the response objects.

Parameters:

  • input_file

    Input file to perform the operation on.

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

    the optional parameters

Options Hash (opts):

  • :dpi (Integer)

    Optional; configures the pixel density in Dots per Inch (DPI) (default is 300). This parameter can only be used with Cloudmersive Managed Instance and Private Cloud.

Returns:



3223
3224
3225
3226
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3223

def convert_document_pdf_to_png_array_direct(input_file, opts = {})
  data, _status_code, _headers = convert_document_pdf_to_png_array_direct_with_http_info(input_file, opts)
  data
end

#convert_document_pdf_to_png_array_direct_with_http_info(input_file, opts = {}) ⇒ Array<(PdfToPngDirectResult, Fixnum, Hash)>

Convert PDF to PNG Image Array (Direct) Convert PDF document to PNG array, one image per page. Returns PNG images directly in the response objects.

Parameters:

  • input_file

    Input file to perform the operation on.

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

    the optional parameters

Options Hash (opts):

  • :dpi (Integer)

    Optional; configures the pixel density in Dots per Inch (DPI) (default is 300). This parameter can only be used with Cloudmersive Managed Instance and Private Cloud.

Returns:

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

    PdfToPngDirectResult data, response status code and response headers



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

def convert_document_pdf_to_png_array_direct_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_direct ...'
  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_direct"
  end
  # resource path
  local_var_path = '/convert/pdf/to/png/direct'

  # 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[:'dpi'] = opts[:'dpi'] if !opts[:'dpi'].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 => 'PdfToPngDirectResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_pdf_to_png_array_direct\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
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. Returns PNG images as temporary expiring URLs.

Parameters:

  • input_file

    Input file to perform the operation on.

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

    the optional parameters

Options Hash (opts):

  • :dpi (Integer)

    Optional; configures the pixel density in Dots per Inch (DPI) (default is 300). This parameter can only be used with Cloudmersive Managed Instance and Private Cloud.

Returns:

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

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

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'])
  header_params[:'dpi'] = opts[:'dpi'] if !opts[:'dpi'].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 => '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)


3280
3281
3282
3283
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3280

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



3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3290

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)


3335
3336
3337
3338
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3335

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



3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3345

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_tiff(input_file, opts = {}) ⇒ String

Convert PDF to TIFF image Converts a PDF Document to a TIFF image. If the PDF contains multiple pages, these pages will be represented as separate pages within the output TIFF image.

Parameters:

  • input_file

    Input file to perform the operation on.

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

    the optional parameters

Options Hash (opts):

  • :dpi (Integer)

    Optional; configures the pixel density in Dots per Inch (DPI) (default is 300). This parameter can only be used with Cloudmersive Managed Instance and Private Cloud.

  • :lzw_compression (BOOLEAN)

    Optional; Enables LZW compression to reduce the size of the output image.

Returns:

  • (String)


3392
3393
3394
3395
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3392

def convert_document_pdf_to_tiff(input_file, opts = {})
  data, _status_code, _headers = convert_document_pdf_to_tiff_with_http_info(input_file, opts)
  data
end

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

Convert PDF to TIFF image Converts a PDF Document to a TIFF image. If the PDF contains multiple pages, these pages will be represented as separate pages within the output TIFF image.

Parameters:

  • input_file

    Input file to perform the operation on.

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

    the optional parameters

Options Hash (opts):

  • :dpi (Integer)

    Optional; configures the pixel density in Dots per Inch (DPI) (default is 300). This parameter can only be used with Cloudmersive Managed Instance and Private Cloud.

  • :lzw_compression (BOOLEAN)

    Optional; Enables LZW compression to reduce the size of the output image.

Returns:

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

    String data, response status code and response headers



3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3404

def convert_document_pdf_to_tiff_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_pdf_to_tiff ...'
  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_tiff"
  end
  # resource path
  local_var_path = '/convert/pdf/to/tiff'

  # 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[:'dpi'] = opts[:'dpi'] if !opts[:'dpi'].nil?
  header_params[:'lzwCompression'] = opts[:'lzw_compression'] if !opts[:'lzw_compression'].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_pdf_to_tiff\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:



3452
3453
3454
3455
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3452

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



3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3463

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)


3518
3519
3520
3521
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3518

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_flatten_transparency(opts = {}) ⇒ Object

Convert PNG Array to PDF and remove transparency Convert an array of PNG images, remove transparency in source images, one image per page, into a newly-created PDF. Supports images of different sizes as input.

Parameters:

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

    the optional parameters

Returns:

  • (Object)


3594
3595
3596
3597
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3594

def convert_document_png_array_to_pdf_flatten_transparency(opts = {})
  data, _status_code, _headers = convert_document_png_array_to_pdf_flatten_transparency_with_http_info(opts)
  data
end

#convert_document_png_array_to_pdf_flatten_transparency_with_http_info(opts = {}) ⇒ Array<(Object, Fixnum, Hash)>

Convert PNG Array to PDF and remove transparency Convert an array of PNG images, remove transparency in source images, one image per page, into a newly-created PDF. Supports images of different sizes as input.

Parameters:

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

    the optional parameters

Returns:

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

    Object data, response status code and response headers



3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3603

def convert_document_png_array_to_pdf_flatten_transparency_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_png_array_to_pdf_flatten_transparency ...'
  end
  # resource path
  local_var_path = '/convert/png/to/pdf/remove-transparency'

  # 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_png_array_to_pdf_flatten_transparency\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
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



3537
3538
3539
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
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3537

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)


3641
3642
3643
3644
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3641

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



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
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3651

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)


3696
3697
3698
3699
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3696

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



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
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3706

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)


3751
3752
3753
3754
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3751

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



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
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3761

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:



3806
3807
3808
3809
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3806

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



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
3849
3850
3851
3852
3853
3854
3855
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3816

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(input_file, opts = {}) ⇒ String

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:

  • input_file

    Input file to perform the operation on.

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

    the optional parameters

Returns:

  • (String)


3861
3862
3863
3864
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3861

def convert_document_pptx_to_ppt(input_file, opts = {})
  data, _status_code, _headers = convert_document_pptx_to_ppt_with_http_info(input_file, opts)
  data
end

#convert_document_pptx_to_ppt_with_http_info(input_file, opts = {}) ⇒ Array<(String, 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:

  • 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



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
3904
3905
3906
3907
3908
3909
3910
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3871

def convert_document_pptx_to_ppt_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_pptx_to_ppt ...'
  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_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'])
  # 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_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:



3916
3917
3918
3919
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3916

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



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
3959
3960
3961
3962
3963
3964
3965
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3926

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)


3971
3972
3973
3974
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3971

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



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
4014
4015
4016
4017
4018
4019
4020
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 3981

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)


4026
4027
4028
4029
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4026

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



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
4069
4070
4071
4072
4073
4074
4075
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4036

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:



4082
4083
4084
4085
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4082

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



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
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4093

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)


4139
4140
4141
4142
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4139

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



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
4182
4183
4184
4185
4186
4187
4188
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4149

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:



4194
4195
4196
4197
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4194

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



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
4240
4241
4242
4243
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4204

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_txt_to_pdf(input_file, opts = {}) ⇒ String

Convert TXT text file to PDF Document Convert simple text files to PDF.

Parameters:

  • input_file

    Input file to perform the operation on.

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

    the optional parameters

Options Hash (opts):

  • :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)


4250
4251
4252
4253
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4250

def convert_document_txt_to_pdf(input_file, opts = {})
  data, _status_code, _headers = convert_document_txt_to_pdf_with_http_info(input_file, opts)
  data
end

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

Convert TXT text file to PDF Document Convert simple text files to PDF.

Parameters:

  • input_file

    Input file to perform the operation on.

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

    the optional parameters

Options Hash (opts):

  • :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



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
4295
4296
4297
4298
4299
4300
4301
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4261

def convert_document_txt_to_pdf_with_http_info(input_file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_txt_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_txt_to_pdf"
  end
  # resource path
  local_var_path = '/convert/txt/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[:'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_txt_to_pdf\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)


4307
4308
4309
4310
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4307

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



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
4350
4351
4352
4353
4354
4355
4356
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4317

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)


4362
4363
4364
4365
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4362

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



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
4405
4406
4407
4408
4409
4410
4411
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4372

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)


4417
4418
4419
4420
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4417

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



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
4460
4461
4462
4463
4464
4465
4466
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4427

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)


4473
4474
4475
4476
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4473

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:



4531
4532
4533
4534
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4531

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



4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4542

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



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
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4484

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/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[:'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)


4588
4589
4590
4591
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4588

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



4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4598

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)


4643
4644
4645
4646
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4643

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



4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4653

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:



4698
4699
4700
4701
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4698

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



4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4708

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:



4753
4754
4755
4756
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4753

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



4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4763

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)


4808
4809
4810
4811
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4808

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



4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
# File 'lib/cloudmersive-convert-api-client/api/convert_document_api.rb', line 4818

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