cloudmersive-convert-api-client 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -77,6 +77,64 @@ module CloudmersiveConvertApiClient
77
77
  end
78
78
  return data, status_code, headers
79
79
  end
80
+ # Convert CSV to XML conversion
81
+ # Convert a CSV file to a XML file
82
+ # @param input_file Input file to perform the operation on.
83
+ # @param [Hash] opts the optional parameters
84
+ # @option opts [BOOLEAN] :column_names_from_first_row Optional; If true, the first row will be used as the labels for the columns; if false, columns will be named Column0, Column1, etc. Default is true. Set to false if you are not using column headings, or have an irregular column structure.
85
+ # @return [String]
86
+ def convert_data_csv_to_xml(input_file, opts = {})
87
+ data, _status_code, _headers = convert_data_csv_to_xml_with_http_info(input_file, opts)
88
+ data
89
+ end
90
+
91
+ # Convert CSV to XML conversion
92
+ # Convert a CSV file to a XML file
93
+ # @param input_file Input file to perform the operation on.
94
+ # @param [Hash] opts the optional parameters
95
+ # @option opts [BOOLEAN] :column_names_from_first_row Optional; If true, the first row will be used as the labels for the columns; if false, columns will be named Column0, Column1, etc. Default is true. Set to false if you are not using column headings, or have an irregular column structure.
96
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
97
+ def convert_data_csv_to_xml_with_http_info(input_file, opts = {})
98
+ if @api_client.config.debugging
99
+ @api_client.config.logger.debug 'Calling API: ConvertDataApi.convert_data_csv_to_xml ...'
100
+ end
101
+ # verify the required parameter 'input_file' is set
102
+ if @api_client.config.client_side_validation && input_file.nil?
103
+ fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_csv_to_xml"
104
+ end
105
+ # resource path
106
+ local_var_path = '/convert/csv/to/xml'
107
+
108
+ # query parameters
109
+ query_params = {}
110
+
111
+ # header parameters
112
+ header_params = {}
113
+ # HTTP header 'Accept' (if needed)
114
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
115
+ # HTTP header 'Content-Type'
116
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
117
+ header_params[:'columnNamesFromFirstRow'] = opts[:'column_names_from_first_row'] if !opts[:'column_names_from_first_row'].nil?
118
+
119
+ # form parameters
120
+ form_params = {}
121
+ form_params['inputFile'] = input_file
122
+
123
+ # http body (model)
124
+ post_body = nil
125
+ auth_names = ['Apikey']
126
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
127
+ :header_params => header_params,
128
+ :query_params => query_params,
129
+ :form_params => form_params,
130
+ :body => post_body,
131
+ :auth_names => auth_names,
132
+ :return_type => 'String')
133
+ if @api_client.config.debugging
134
+ @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_csv_to_xml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
135
+ end
136
+ return data, status_code, headers
137
+ end
80
138
  # Convert JSON to XML conversion
81
139
  # Convert a JSON object into XML
82
140
  # @param json_object Input JSON to convert to XML
@@ -190,7 +248,7 @@ module CloudmersiveConvertApiClient
190
248
  # Convert an Excel XLSX file to a JSON object array
191
249
  # @param input_file Input file to perform the operation on.
192
250
  # @param [Hash] opts the optional parameters
193
- # @return [Object]
251
+ # @return [String]
194
252
  def convert_data_xlsx_to_json(input_file, opts = {})
195
253
  data, _status_code, _headers = convert_data_xlsx_to_json_with_http_info(input_file, opts)
196
254
  data
@@ -200,7 +258,7 @@ module CloudmersiveConvertApiClient
200
258
  # Convert an Excel XLSX file to a JSON object array
201
259
  # @param input_file Input file to perform the operation on.
202
260
  # @param [Hash] opts the optional parameters
203
- # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
261
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
204
262
  def convert_data_xlsx_to_json_with_http_info(input_file, opts = {})
205
263
  if @api_client.config.debugging
206
264
  @api_client.config.logger.debug 'Calling API: ConvertDataApi.convert_data_xlsx_to_json ...'
@@ -218,7 +276,7 @@ module CloudmersiveConvertApiClient
218
276
  # header parameters
219
277
  header_params = {}
220
278
  # HTTP header 'Accept' (if needed)
221
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
279
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
222
280
  # HTTP header 'Content-Type'
223
281
  header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
224
282
 
@@ -235,12 +293,67 @@ module CloudmersiveConvertApiClient
235
293
  :form_params => form_params,
236
294
  :body => post_body,
237
295
  :auth_names => auth_names,
238
- :return_type => 'Object')
296
+ :return_type => 'String')
239
297
  if @api_client.config.debugging
240
298
  @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xlsx_to_json\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
241
299
  end
242
300
  return data, status_code, headers
243
301
  end
302
+ # Convert Excel XLSX to XML conversion
303
+ # Convert an Excel XLSX file to a XML file
304
+ # @param input_file Input file to perform the operation on.
305
+ # @param [Hash] opts the optional parameters
306
+ # @return [String]
307
+ def convert_data_xlsx_to_xml(input_file, opts = {})
308
+ data, _status_code, _headers = convert_data_xlsx_to_xml_with_http_info(input_file, opts)
309
+ data
310
+ end
311
+
312
+ # Convert Excel XLSX to XML conversion
313
+ # Convert an Excel XLSX file to a XML file
314
+ # @param input_file Input file to perform the operation on.
315
+ # @param [Hash] opts the optional parameters
316
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
317
+ def convert_data_xlsx_to_xml_with_http_info(input_file, opts = {})
318
+ if @api_client.config.debugging
319
+ @api_client.config.logger.debug 'Calling API: ConvertDataApi.convert_data_xlsx_to_xml ...'
320
+ end
321
+ # verify the required parameter 'input_file' is set
322
+ if @api_client.config.client_side_validation && input_file.nil?
323
+ fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDataApi.convert_data_xlsx_to_xml"
324
+ end
325
+ # resource path
326
+ local_var_path = '/convert/xlsx/to/xml'
327
+
328
+ # query parameters
329
+ query_params = {}
330
+
331
+ # header parameters
332
+ header_params = {}
333
+ # HTTP header 'Accept' (if needed)
334
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
335
+ # HTTP header 'Content-Type'
336
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
337
+
338
+ # form parameters
339
+ form_params = {}
340
+ form_params['inputFile'] = input_file
341
+
342
+ # http body (model)
343
+ post_body = nil
344
+ auth_names = ['Apikey']
345
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
346
+ :header_params => header_params,
347
+ :query_params => query_params,
348
+ :form_params => form_params,
349
+ :body => post_body,
350
+ :auth_names => auth_names,
351
+ :return_type => 'String')
352
+ if @api_client.config.debugging
353
+ @api_client.config.logger.debug "API called: ConvertDataApi#convert_data_xlsx_to_xml\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
354
+ end
355
+ return data, status_code, headers
356
+ end
244
357
  # Adds an attribute to all XML nodes matching XPath expression
245
358
  # Return the reuslts of editing an XML document by adding an attribute to all of the nodes that match an input XPath expression.
246
359
  # @param input_file Input XML file to perform the operation on.
@@ -850,6 +850,61 @@ module CloudmersiveConvertApiClient
850
850
  end
851
851
  return data, status_code, headers
852
852
  end
853
+ # Convert Word DOCX Document to Legacy Word DOC (97-03)
854
+ # Convert/downgrade modern Office Word DOCX Documents (DOCX) to the legacy Word DOC (97-2003 Format) format
855
+ # @param input_file Input file to perform the operation on.
856
+ # @param [Hash] opts the optional parameters
857
+ # @return [String]
858
+ def convert_document_docx_to_doc(input_file, opts = {})
859
+ data, _status_code, _headers = convert_document_docx_to_doc_with_http_info(input_file, opts)
860
+ data
861
+ end
862
+
863
+ # Convert Word DOCX Document to Legacy Word DOC (97-03)
864
+ # Convert/downgrade modern Office Word DOCX Documents (DOCX) to the legacy Word DOC (97-2003 Format) format
865
+ # @param input_file Input file to perform the operation on.
866
+ # @param [Hash] opts the optional parameters
867
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
868
+ def convert_document_docx_to_doc_with_http_info(input_file, opts = {})
869
+ if @api_client.config.debugging
870
+ @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_docx_to_doc ...'
871
+ end
872
+ # verify the required parameter 'input_file' is set
873
+ if @api_client.config.client_side_validation && input_file.nil?
874
+ fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_docx_to_doc"
875
+ end
876
+ # resource path
877
+ local_var_path = '/convert/docx/to/doc'
878
+
879
+ # query parameters
880
+ query_params = {}
881
+
882
+ # header parameters
883
+ header_params = {}
884
+ # HTTP header 'Accept' (if needed)
885
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
886
+ # HTTP header 'Content-Type'
887
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
888
+
889
+ # form parameters
890
+ form_params = {}
891
+ form_params['inputFile'] = input_file
892
+
893
+ # http body (model)
894
+ post_body = nil
895
+ auth_names = ['Apikey']
896
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
897
+ :header_params => header_params,
898
+ :query_params => query_params,
899
+ :form_params => form_params,
900
+ :body => post_body,
901
+ :auth_names => auth_names,
902
+ :return_type => 'String')
903
+ if @api_client.config.debugging
904
+ @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_docx_to_doc\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
905
+ end
906
+ return data, status_code, headers
907
+ end
853
908
  # Convert Word DOCX Document to HTML Document
854
909
  # Convert Office Word Document (DOCX) to HTML Document
855
910
  # @param input_file Input file to perform the operation on.
@@ -3522,6 +3577,52 @@ module CloudmersiveConvertApiClient
3522
3577
  end
3523
3578
  return data, status_code, headers
3524
3579
  end
3580
+ # Convert PowerPoint PPTX presentation to Legacy PowerPoint PPT (97-03)
3581
+ # Convert/downgrade modern Office PowerPoint PPTX Presentation to the legacy PowerPoint PPT (97-2003 Format) format
3582
+ # @param [Hash] opts the optional parameters
3583
+ # @return [Object]
3584
+ def convert_document_pptx_to_ppt(opts = {})
3585
+ data, _status_code, _headers = convert_document_pptx_to_ppt_with_http_info(opts)
3586
+ data
3587
+ end
3588
+
3589
+ # Convert PowerPoint PPTX presentation to Legacy PowerPoint PPT (97-03)
3590
+ # Convert/downgrade modern Office PowerPoint PPTX Presentation to the legacy PowerPoint PPT (97-2003 Format) format
3591
+ # @param [Hash] opts the optional parameters
3592
+ # @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
3593
+ def convert_document_pptx_to_ppt_with_http_info(opts = {})
3594
+ if @api_client.config.debugging
3595
+ @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_pptx_to_ppt ...'
3596
+ end
3597
+ # resource path
3598
+ local_var_path = '/convert/pptx/to/ppt'
3599
+
3600
+ # query parameters
3601
+ query_params = {}
3602
+
3603
+ # header parameters
3604
+ header_params = {}
3605
+ # HTTP header 'Accept' (if needed)
3606
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
3607
+
3608
+ # form parameters
3609
+ form_params = {}
3610
+
3611
+ # http body (model)
3612
+ post_body = nil
3613
+ auth_names = ['Apikey']
3614
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
3615
+ :header_params => header_params,
3616
+ :query_params => query_params,
3617
+ :form_params => form_params,
3618
+ :body => post_body,
3619
+ :auth_names => auth_names,
3620
+ :return_type => 'Object')
3621
+ if @api_client.config.debugging
3622
+ @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_pptx_to_ppt\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3623
+ end
3624
+ return data, status_code, headers
3625
+ end
3525
3626
  # Convert PowerPoint PPTX Presentation to Text (txt)
3526
3627
  # Convert Office PowerPoint Documents (pptx) to standard Text
3527
3628
  # @param input_file Input file to perform the operation on.
@@ -4356,5 +4457,60 @@ module CloudmersiveConvertApiClient
4356
4457
  end
4357
4458
  return data, status_code, headers
4358
4459
  end
4460
+ # Convert Excel XLSX Spreadsheet to Legacy Excel XLS (97-03)
4461
+ # Convert/downgrade modern Office Excel XLSX Spreadsheet to the legacy Excel XLS (97-2003 Format) format
4462
+ # @param input_file Input file to perform the operation on.
4463
+ # @param [Hash] opts the optional parameters
4464
+ # @return [String]
4465
+ def convert_document_xlsx_to_xls(input_file, opts = {})
4466
+ data, _status_code, _headers = convert_document_xlsx_to_xls_with_http_info(input_file, opts)
4467
+ data
4468
+ end
4469
+
4470
+ # Convert Excel XLSX Spreadsheet to Legacy Excel XLS (97-03)
4471
+ # Convert/downgrade modern Office Excel XLSX Spreadsheet to the legacy Excel XLS (97-2003 Format) format
4472
+ # @param input_file Input file to perform the operation on.
4473
+ # @param [Hash] opts the optional parameters
4474
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
4475
+ def convert_document_xlsx_to_xls_with_http_info(input_file, opts = {})
4476
+ if @api_client.config.debugging
4477
+ @api_client.config.logger.debug 'Calling API: ConvertDocumentApi.convert_document_xlsx_to_xls ...'
4478
+ end
4479
+ # verify the required parameter 'input_file' is set
4480
+ if @api_client.config.client_side_validation && input_file.nil?
4481
+ fail ArgumentError, "Missing the required parameter 'input_file' when calling ConvertDocumentApi.convert_document_xlsx_to_xls"
4482
+ end
4483
+ # resource path
4484
+ local_var_path = '/convert/xlsx/to/xls'
4485
+
4486
+ # query parameters
4487
+ query_params = {}
4488
+
4489
+ # header parameters
4490
+ header_params = {}
4491
+ # HTTP header 'Accept' (if needed)
4492
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
4493
+ # HTTP header 'Content-Type'
4494
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
4495
+
4496
+ # form parameters
4497
+ form_params = {}
4498
+ form_params['inputFile'] = input_file
4499
+
4500
+ # http body (model)
4501
+ post_body = nil
4502
+ auth_names = ['Apikey']
4503
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
4504
+ :header_params => header_params,
4505
+ :query_params => query_params,
4506
+ :form_params => form_params,
4507
+ :body => post_body,
4508
+ :auth_names => auth_names,
4509
+ :return_type => 'String')
4510
+ if @api_client.config.debugging
4511
+ @api_client.config.logger.debug "API called: ConvertDocumentApi#convert_document_xlsx_to_xls\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4512
+ end
4513
+ return data, status_code, headers
4514
+ end
4359
4515
  end
4360
4516
  end
@@ -73,6 +73,64 @@ module CloudmersiveConvertApiClient
73
73
  end
74
74
  return data, status_code, headers
75
75
  end
76
+ # Convert a PDF file to PDF/A
77
+ # Converts the input PDF file to a PDF/A-1b or PDF/A-2b standardized PDF.
78
+ # @param input_file Input file to perform the operation on.
79
+ # @param [Hash] opts the optional parameters
80
+ # @option opts [String] :conformance_level Optional: Select the conformance level for PDF/A - specify &#39;1b&#39; for PDF/A-1b or specify &#39;2b&#39; for PDF/A-2b; default is PDF/A-1b
81
+ # @return [String]
82
+ def edit_pdf_convert_to_pdf_a(input_file, opts = {})
83
+ data, _status_code, _headers = edit_pdf_convert_to_pdf_a_with_http_info(input_file, opts)
84
+ data
85
+ end
86
+
87
+ # Convert a PDF file to PDF/A
88
+ # Converts the input PDF file to a PDF/A-1b or PDF/A-2b standardized PDF.
89
+ # @param input_file Input file to perform the operation on.
90
+ # @param [Hash] opts the optional parameters
91
+ # @option opts [String] :conformance_level Optional: Select the conformance level for PDF/A - specify &#39;1b&#39; for PDF/A-1b or specify &#39;2b&#39; for PDF/A-2b; default is PDF/A-1b
92
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
93
+ def edit_pdf_convert_to_pdf_a_with_http_info(input_file, opts = {})
94
+ if @api_client.config.debugging
95
+ @api_client.config.logger.debug 'Calling API: EditPdfApi.edit_pdf_convert_to_pdf_a ...'
96
+ end
97
+ # verify the required parameter 'input_file' is set
98
+ if @api_client.config.client_side_validation && input_file.nil?
99
+ fail ArgumentError, "Missing the required parameter 'input_file' when calling EditPdfApi.edit_pdf_convert_to_pdf_a"
100
+ end
101
+ # resource path
102
+ local_var_path = '/convert/edit/pdf/optimize/pdf-a'
103
+
104
+ # query parameters
105
+ query_params = {}
106
+
107
+ # header parameters
108
+ header_params = {}
109
+ # HTTP header 'Accept' (if needed)
110
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
111
+ # HTTP header 'Content-Type'
112
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
113
+ header_params[:'conformanceLevel'] = opts[:'conformance_level'] if !opts[:'conformance_level'].nil?
114
+
115
+ # form parameters
116
+ form_params = {}
117
+ form_params['inputFile'] = input_file
118
+
119
+ # http body (model)
120
+ post_body = nil
121
+ auth_names = ['Apikey']
122
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
123
+ :header_params => header_params,
124
+ :query_params => query_params,
125
+ :form_params => form_params,
126
+ :body => post_body,
127
+ :auth_names => auth_names,
128
+ :return_type => 'String')
129
+ if @api_client.config.debugging
130
+ @api_client.config.logger.debug "API called: EditPdfApi#edit_pdf_convert_to_pdf_a\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
131
+ end
132
+ return data, status_code, headers
133
+ end
76
134
  # Decrypt and password-protect a PDF
77
135
  # Decrypt a PDF document with a password. Decrypted PDF will no longer require a password to open.
78
136
  # @param password Valid password for the PDF file
@@ -574,6 +632,61 @@ module CloudmersiveConvertApiClient
574
632
  end
575
633
  return data, status_code, headers
576
634
  end
635
+ # Linearize and optimize a PDF for streaming download
636
+ # Linearizes the content of a PDF to optimize it for streaming download, particularly over web streaming.
637
+ # @param input_file Input file to perform the operation on.
638
+ # @param [Hash] opts the optional parameters
639
+ # @return [String]
640
+ def edit_pdf_linearize(input_file, opts = {})
641
+ data, _status_code, _headers = edit_pdf_linearize_with_http_info(input_file, opts)
642
+ data
643
+ end
644
+
645
+ # Linearize and optimize a PDF for streaming download
646
+ # Linearizes the content of a PDF to optimize it for streaming download, particularly over web streaming.
647
+ # @param input_file Input file to perform the operation on.
648
+ # @param [Hash] opts the optional parameters
649
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
650
+ def edit_pdf_linearize_with_http_info(input_file, opts = {})
651
+ if @api_client.config.debugging
652
+ @api_client.config.logger.debug 'Calling API: EditPdfApi.edit_pdf_linearize ...'
653
+ end
654
+ # verify the required parameter 'input_file' is set
655
+ if @api_client.config.client_side_validation && input_file.nil?
656
+ fail ArgumentError, "Missing the required parameter 'input_file' when calling EditPdfApi.edit_pdf_linearize"
657
+ end
658
+ # resource path
659
+ local_var_path = '/convert/edit/pdf/optimize/linearize'
660
+
661
+ # query parameters
662
+ query_params = {}
663
+
664
+ # header parameters
665
+ header_params = {}
666
+ # HTTP header 'Accept' (if needed)
667
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
668
+ # HTTP header 'Content-Type'
669
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
670
+
671
+ # form parameters
672
+ form_params = {}
673
+ form_params['inputFile'] = input_file
674
+
675
+ # http body (model)
676
+ post_body = nil
677
+ auth_names = ['Apikey']
678
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
679
+ :header_params => header_params,
680
+ :query_params => query_params,
681
+ :form_params => form_params,
682
+ :body => post_body,
683
+ :auth_names => auth_names,
684
+ :return_type => 'String')
685
+ if @api_client.config.debugging
686
+ @api_client.config.logger.debug "API called: EditPdfApi#edit_pdf_linearize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
687
+ end
688
+ return data, status_code, headers
689
+ end
577
690
  # Rasterize a PDF to an image-based PDF
578
691
  # Rasterize a PDF into an image-based PDF. The output is a PDF where each page is comprised of a high-resolution image, with all text, figures and other components removed.
579
692
  # @param input_file Input file to perform the operation on.
@@ -629,6 +742,61 @@ module CloudmersiveConvertApiClient
629
742
  end
630
743
  return data, status_code, headers
631
744
  end
745
+ # Reduce the file size and optimize a PDF
746
+ # Reduces the file size and optimizes the content of a PDF to minimize its file size.
747
+ # @param input_file Input file to perform the operation on.
748
+ # @param [Hash] opts the optional parameters
749
+ # @return [String]
750
+ def edit_pdf_reduce_file_size(input_file, opts = {})
751
+ data, _status_code, _headers = edit_pdf_reduce_file_size_with_http_info(input_file, opts)
752
+ data
753
+ end
754
+
755
+ # Reduce the file size and optimize a PDF
756
+ # Reduces the file size and optimizes the content of a PDF to minimize its file size.
757
+ # @param input_file Input file to perform the operation on.
758
+ # @param [Hash] opts the optional parameters
759
+ # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
760
+ def edit_pdf_reduce_file_size_with_http_info(input_file, opts = {})
761
+ if @api_client.config.debugging
762
+ @api_client.config.logger.debug 'Calling API: EditPdfApi.edit_pdf_reduce_file_size ...'
763
+ end
764
+ # verify the required parameter 'input_file' is set
765
+ if @api_client.config.client_side_validation && input_file.nil?
766
+ fail ArgumentError, "Missing the required parameter 'input_file' when calling EditPdfApi.edit_pdf_reduce_file_size"
767
+ end
768
+ # resource path
769
+ local_var_path = '/convert/edit/pdf/optimize/reduce-file-size'
770
+
771
+ # query parameters
772
+ query_params = {}
773
+
774
+ # header parameters
775
+ header_params = {}
776
+ # HTTP header 'Accept' (if needed)
777
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
778
+ # HTTP header 'Content-Type'
779
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
780
+
781
+ # form parameters
782
+ form_params = {}
783
+ form_params['inputFile'] = input_file
784
+
785
+ # http body (model)
786
+ post_body = nil
787
+ auth_names = ['Apikey']
788
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
789
+ :header_params => header_params,
790
+ :query_params => query_params,
791
+ :form_params => form_params,
792
+ :body => post_body,
793
+ :auth_names => auth_names,
794
+ :return_type => 'String')
795
+ if @api_client.config.debugging
796
+ @api_client.config.logger.debug "API called: EditPdfApi#edit_pdf_reduce_file_size\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
797
+ end
798
+ return data, status_code, headers
799
+ end
632
800
  # Remove all PDF annotations, including comments in the document
633
801
  # Removes all of the annotations, including comments and notes, in a PDF document.
634
802
  # @param input_file Input file to perform the operation on.