cloudmersive-convert-api-client 1.6.2 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 404bc80eb7731a18c1fc3046dc02c22aecda5b6e898de803aaaca9e0a3bdf1fe
|
4
|
+
data.tar.gz: ed17bc0db457680bcac102109cb88ec6fa754dea7505b8759e7c645cc3ea1944
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7dfc670d2965397b617fe0ea2ad0b68d636c0f9505e6e233f2e3b6c8ddf122e1811e282bd100fdf5435676ee8c6d7113eb3029c8b6fe4f96e60a73abaf6c18b
|
7
|
+
data.tar.gz: acf3228cd98c3fbef834a7e2e7fe4a5fb1bb93313f67d5ea33de4585d5df570b629ce302ad6c1714c2c4f3218ed7559e14aec7c26f577b03a98aa718d060d78e
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Convert API lets you effortlessly convert file formats and types.
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
8
|
|
9
9
|
- API version: v1
|
10
|
-
- Package version: 1.6.
|
10
|
+
- Package version: 1.6.3
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
12
|
|
13
13
|
## Installation
|
@@ -23,15 +23,15 @@ gem build cloudmersive-convert-api-client.gemspec
|
|
23
23
|
Then either install the gem locally:
|
24
24
|
|
25
25
|
```shell
|
26
|
-
gem install ./cloudmersive-convert-api-client-1.6.
|
26
|
+
gem install ./cloudmersive-convert-api-client-1.6.3.gem
|
27
27
|
```
|
28
|
-
(for development, run `gem install --dev ./cloudmersive-convert-api-client-1.6.
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-convert-api-client-1.6.3.gem` to install the development dependencies)
|
29
29
|
|
30
30
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
31
31
|
|
32
32
|
Finally add this to the Gemfile:
|
33
33
|
|
34
|
-
gem 'cloudmersive-convert-api-client', '~> 1.6.
|
34
|
+
gem 'cloudmersive-convert-api-client', '~> 1.6.3'
|
35
35
|
|
36
36
|
### Install from Git
|
37
37
|
|
data/docs/ConvertDocumentApi.md
CHANGED
@@ -198,7 +198,7 @@ Name | Type | Description | Notes
|
|
198
198
|
|
199
199
|
|
200
200
|
# **convert_document_autodetect_to_txt**
|
201
|
-
> TextConversionResult convert_document_autodetect_to_txt(input_file)
|
201
|
+
> TextConversionResult convert_document_autodetect_to_txt(input_file, opts)
|
202
202
|
|
203
203
|
Convert Document to Text (txt)
|
204
204
|
|
@@ -220,10 +220,13 @@ api_instance = CloudmersiveConvertApiClient::ConvertDocumentApi.new
|
|
220
220
|
|
221
221
|
input_file = File.new("/path/to/file.txt") # File | Input file to perform the operation on.
|
222
222
|
|
223
|
+
opts = {
|
224
|
+
text_formatting_mode: "text_formatting_mode_example" # String | Optional; specify how whitespace should be handled when converting the document to text. Possible values are 'preserveWhitespace' which will attempt to preserve whitespace in the document and relative positioning of text within the document, and 'minimizeWhitespace' which will not insert additional spaces into the document in most cases. Default is 'preserveWhitespace'.
|
225
|
+
}
|
223
226
|
|
224
227
|
begin
|
225
228
|
#Convert Document to Text (txt)
|
226
|
-
result = api_instance.convert_document_autodetect_to_txt(input_file)
|
229
|
+
result = api_instance.convert_document_autodetect_to_txt(input_file, opts)
|
227
230
|
p result
|
228
231
|
rescue CloudmersiveConvertApiClient::ApiError => e
|
229
232
|
puts "Exception when calling ConvertDocumentApi->convert_document_autodetect_to_txt: #{e}"
|
@@ -235,6 +238,7 @@ end
|
|
235
238
|
Name | Type | Description | Notes
|
236
239
|
------------- | ------------- | ------------- | -------------
|
237
240
|
**input_file** | **File**| Input file to perform the operation on. |
|
241
|
+
**text_formatting_mode** | **String**| Optional; specify how whitespace should be handled when converting the document to text. Possible values are 'preserveWhitespace' which will attempt to preserve whitespace in the document and relative positioning of text within the document, and 'minimizeWhitespace' which will not insert additional spaces into the document in most cases. Default is 'preserveWhitespace'. | [optional]
|
238
242
|
|
239
243
|
### Return type
|
240
244
|
|
@@ -954,7 +958,7 @@ Name | Type | Description | Notes
|
|
954
958
|
|
955
959
|
|
956
960
|
# **convert_document_pdf_to_txt**
|
957
|
-
> TextConversionResult convert_document_pdf_to_txt(input_file)
|
961
|
+
> TextConversionResult convert_document_pdf_to_txt(input_file, opts)
|
958
962
|
|
959
963
|
Convert PDF Document to Text (txt)
|
960
964
|
|
@@ -976,10 +980,13 @@ api_instance = CloudmersiveConvertApiClient::ConvertDocumentApi.new
|
|
976
980
|
|
977
981
|
input_file = File.new("/path/to/file.txt") # File | Input file to perform the operation on.
|
978
982
|
|
983
|
+
opts = {
|
984
|
+
text_formatting_mode: "text_formatting_mode_example" # String | Optional; specify how whitespace should be handled when converting PDF to text. Possible values are 'preserveWhitespace' which will attempt to preserve whitespace in the document and relative positioning of text within the document, and 'minimizeWhitespace' which will not insert additional spaces into the document in most cases. Default is 'preserveWhitespace'.
|
985
|
+
}
|
979
986
|
|
980
987
|
begin
|
981
988
|
#Convert PDF Document to Text (txt)
|
982
|
-
result = api_instance.convert_document_pdf_to_txt(input_file)
|
989
|
+
result = api_instance.convert_document_pdf_to_txt(input_file, opts)
|
983
990
|
p result
|
984
991
|
rescue CloudmersiveConvertApiClient::ApiError => e
|
985
992
|
puts "Exception when calling ConvertDocumentApi->convert_document_pdf_to_txt: #{e}"
|
@@ -991,6 +998,7 @@ end
|
|
991
998
|
Name | Type | Description | Notes
|
992
999
|
------------- | ------------- | ------------- | -------------
|
993
1000
|
**input_file** | **File**| Input file to perform the operation on. |
|
1001
|
+
**text_formatting_mode** | **String**| Optional; specify how whitespace should be handled when converting PDF to text. Possible values are 'preserveWhitespace' which will attempt to preserve whitespace in the document and relative positioning of text within the document, and 'minimizeWhitespace' which will not insert additional spaces into the document in most cases. Default is 'preserveWhitespace'. | [optional]
|
994
1002
|
|
995
1003
|
### Return type
|
996
1004
|
|
@@ -192,6 +192,7 @@ module CloudmersiveConvertApiClient
|
|
192
192
|
# 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.
|
193
193
|
# @param input_file Input file to perform the operation on.
|
194
194
|
# @param [Hash] opts the optional parameters
|
195
|
+
# @option opts [String] :text_formatting_mode Optional; specify how whitespace should be handled when converting the document to text. Possible values are 'preserveWhitespace' which will attempt to preserve whitespace in the document and relative positioning of text within the document, and 'minimizeWhitespace' which will not insert additional spaces into the document in most cases. Default is 'preserveWhitespace'.
|
195
196
|
# @return [TextConversionResult]
|
196
197
|
def convert_document_autodetect_to_txt(input_file, opts = {})
|
197
198
|
data, _status_code, _headers = convert_document_autodetect_to_txt_with_http_info(input_file, opts)
|
@@ -202,6 +203,7 @@ module CloudmersiveConvertApiClient
|
|
202
203
|
# 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.
|
203
204
|
# @param input_file Input file to perform the operation on.
|
204
205
|
# @param [Hash] opts the optional parameters
|
206
|
+
# @option opts [String] :text_formatting_mode Optional; specify how whitespace should be handled when converting the document to text. Possible values are 'preserveWhitespace' which will attempt to preserve whitespace in the document and relative positioning of text within the document, and 'minimizeWhitespace' which will not insert additional spaces into the document in most cases. Default is 'preserveWhitespace'.
|
205
207
|
# @return [Array<(TextConversionResult, Fixnum, Hash)>] TextConversionResult data, response status code and response headers
|
206
208
|
def convert_document_autodetect_to_txt_with_http_info(input_file, opts = {})
|
207
209
|
if @api_client.config.debugging
|
@@ -223,6 +225,7 @@ module CloudmersiveConvertApiClient
|
|
223
225
|
header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
|
224
226
|
# HTTP header 'Content-Type'
|
225
227
|
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
228
|
+
header_params[:'textFormattingMode'] = opts[:'text_formatting_mode'] if !opts[:'text_formatting_mode'].nil?
|
226
229
|
|
227
230
|
# form parameters
|
228
231
|
form_params = {}
|
@@ -976,6 +979,7 @@ module CloudmersiveConvertApiClient
|
|
976
979
|
# PDF document to text
|
977
980
|
# @param input_file Input file to perform the operation on.
|
978
981
|
# @param [Hash] opts the optional parameters
|
982
|
+
# @option opts [String] :text_formatting_mode Optional; specify how whitespace should be handled when converting PDF to text. Possible values are 'preserveWhitespace' which will attempt to preserve whitespace in the document and relative positioning of text within the document, and 'minimizeWhitespace' which will not insert additional spaces into the document in most cases. Default is 'preserveWhitespace'.
|
979
983
|
# @return [TextConversionResult]
|
980
984
|
def convert_document_pdf_to_txt(input_file, opts = {})
|
981
985
|
data, _status_code, _headers = convert_document_pdf_to_txt_with_http_info(input_file, opts)
|
@@ -986,6 +990,7 @@ module CloudmersiveConvertApiClient
|
|
986
990
|
# PDF document to text
|
987
991
|
# @param input_file Input file to perform the operation on.
|
988
992
|
# @param [Hash] opts the optional parameters
|
993
|
+
# @option opts [String] :text_formatting_mode Optional; specify how whitespace should be handled when converting PDF to text. Possible values are 'preserveWhitespace' which will attempt to preserve whitespace in the document and relative positioning of text within the document, and 'minimizeWhitespace' which will not insert additional spaces into the document in most cases. Default is 'preserveWhitespace'.
|
989
994
|
# @return [Array<(TextConversionResult, Fixnum, Hash)>] TextConversionResult data, response status code and response headers
|
990
995
|
def convert_document_pdf_to_txt_with_http_info(input_file, opts = {})
|
991
996
|
if @api_client.config.debugging
|
@@ -1007,6 +1012,7 @@ module CloudmersiveConvertApiClient
|
|
1007
1012
|
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml'])
|
1008
1013
|
# HTTP header 'Content-Type'
|
1009
1014
|
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
|
1015
|
+
header_params[:'textFormattingMode'] = opts[:'text_formatting_mode'] if !opts[:'text_formatting_mode'].nil?
|
1010
1016
|
|
1011
1017
|
# form parameters
|
1012
1018
|
form_params = {}
|
@@ -73,6 +73,7 @@ describe 'ConvertDocumentApi' do
|
|
73
73
|
# 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.
|
74
74
|
# @param input_file Input file to perform the operation on.
|
75
75
|
# @param [Hash] opts the optional parameters
|
76
|
+
# @option opts [String] :text_formatting_mode Optional; specify how whitespace should be handled when converting the document to text. Possible values are 'preserveWhitespace' which will attempt to preserve whitespace in the document and relative positioning of text within the document, and 'minimizeWhitespace' which will not insert additional spaces into the document in most cases. Default is 'preserveWhitespace'.
|
76
77
|
# @return [TextConversionResult]
|
77
78
|
describe 'convert_document_autodetect_to_txt test' do
|
78
79
|
it "should work" do
|
@@ -241,6 +242,7 @@ describe 'ConvertDocumentApi' do
|
|
241
242
|
# PDF document to text
|
242
243
|
# @param input_file Input file to perform the operation on.
|
243
244
|
# @param [Hash] opts the optional parameters
|
245
|
+
# @option opts [String] :text_formatting_mode Optional; specify how whitespace should be handled when converting PDF to text. Possible values are 'preserveWhitespace' which will attempt to preserve whitespace in the document and relative positioning of text within the document, and 'minimizeWhitespace' which will not insert additional spaces into the document in most cases. Default is 'preserveWhitespace'.
|
244
246
|
# @return [TextConversionResult]
|
245
247
|
describe 'convert_document_pdf_to_txt test' do
|
246
248
|
it "should work" do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudmersive-convert-api-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cloudmersive
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|