Skip to content

Commit

Permalink
2.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Cloudmersive committed Oct 27, 2019
1 parent 4c6f9fc commit 255eec5
Show file tree
Hide file tree
Showing 7 changed files with 160 additions and 5 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Convert API lets you effortlessly convert file formats and types.
This Python package provides a native API client for [Cloudmersive Document Conversion](https://www.cloudmersive.com/convert-api)

- API version: v1
- Package version: 2.1.3
- Package version: 2.1.4
- Build package: io.swagger.codegen.languages.PythonClientCodegen

## Requirements.
Expand Down Expand Up @@ -95,6 +95,7 @@ Class | Method | HTTP request | Description
*ConvertDocumentApi* | [**convert_document_html_to_png**](docs/ConvertDocumentApi.md#convert_document_html_to_png) | **POST** /convert/html/to/png | HTML to PNG array
*ConvertDocumentApi* | [**convert_document_pdf_to_docx**](docs/ConvertDocumentApi.md#convert_document_pdf_to_docx) | **POST** /convert/pdf/to/docx | PDF to Word DOCX
*ConvertDocumentApi* | [**convert_document_pdf_to_png_array**](docs/ConvertDocumentApi.md#convert_document_pdf_to_png_array) | **POST** /convert/pdf/to/png | PDF to PNG Array
*ConvertDocumentApi* | [**convert_document_pdf_to_png_single**](docs/ConvertDocumentApi.md#convert_document_pdf_to_png_single) | **POST** /convert/pdf/to/png/merge-single | PDF to Single PNG image
*ConvertDocumentApi* | [**convert_document_pdf_to_pptx**](docs/ConvertDocumentApi.md#convert_document_pdf_to_pptx) | **POST** /convert/pdf/to/pptx | PDF to PowerPoint PPTX
*ConvertDocumentApi* | [**convert_document_pdf_to_txt**](docs/ConvertDocumentApi.md#convert_document_pdf_to_txt) | **POST** /convert/pdf/to/txt | PDF to Text
*ConvertDocumentApi* | [**convert_document_ppt_to_pdf**](docs/ConvertDocumentApi.md#convert_document_ppt_to_pdf) | **POST** /convert/ppt/to/pdf | PowerPoint PPT (97-03) to PDF
Expand Down
99 changes: 99 additions & 0 deletions cloudmersive_convert_api_client/api/convert_document_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1320,6 +1320,105 @@ def convert_document_pdf_to_png_array_with_http_info(self, input_file, **kwargs)
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)

def convert_document_pdf_to_png_single(self, input_file, **kwargs): # noqa: E501
"""PDF to Single PNG image # noqa: E501
Convert PDF document to a single tall PNG image, by stacking/concatenating the images vertically into a single \"tall\" image # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.convert_document_pdf_to_png_single(input_file, async_req=True)
>>> result = thread.get()
:param async_req bool
:param file input_file: Input file to perform the operation on. (required)
:return: str
If the method is called asynchronously,
returns the request thread.
"""
kwargs['_return_http_data_only'] = True
if kwargs.get('async_req'):
return self.convert_document_pdf_to_png_single_with_http_info(input_file, **kwargs) # noqa: E501
else:
(data) = self.convert_document_pdf_to_png_single_with_http_info(input_file, **kwargs) # noqa: E501
return data

def convert_document_pdf_to_png_single_with_http_info(self, input_file, **kwargs): # noqa: E501
"""PDF to Single PNG image # noqa: E501
Convert PDF document to a single tall PNG image, by stacking/concatenating the images vertically into a single \"tall\" image # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.convert_document_pdf_to_png_single_with_http_info(input_file, async_req=True)
>>> result = thread.get()
:param async_req bool
:param file input_file: Input file to perform the operation on. (required)
:return: str
If the method is called asynchronously,
returns the request thread.
"""

all_params = ['input_file'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
all_params.append('_request_timeout')

params = locals()
for key, val in six.iteritems(params['kwargs']):
if key not in all_params:
raise TypeError(
"Got an unexpected keyword argument '%s'"
" to method convert_document_pdf_to_png_single" % key
)
params[key] = val
del params['kwargs']
# verify the required parameter 'input_file' is set
if ('input_file' not in params or
params['input_file'] is None):
raise ValueError("Missing the required parameter `input_file` when calling `convert_document_pdf_to_png_single`") # noqa: E501

collection_formats = {}

path_params = {}

query_params = []

header_params = {}

form_params = []
local_var_files = {}
if 'input_file' in params:
local_var_files['inputFile'] = params['input_file'] # noqa: E501

body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/octet-stream']) # noqa: E501

# HTTP header `Content-Type`
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
['multipart/form-data']) # noqa: E501

# Authentication setting
auth_settings = ['Apikey'] # noqa: E501

return self.api_client.call_api(
'/convert/pdf/to/png/merge-single', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_type='str', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
_preload_content=params.get('_preload_content', True),
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)

def convert_document_pdf_to_pptx(self, input_file, **kwargs): # noqa: E501
"""PDF to PowerPoint PPTX # noqa: E501
Expand Down
2 changes: 1 addition & 1 deletion cloudmersive_convert_api_client/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'Swagger-Codegen/2.1.3/python'
self.user_agent = 'Swagger-Codegen/2.1.4/python'

def __del__(self):
if self._pool is not None:
Expand Down
2 changes: 1 addition & 1 deletion cloudmersive_convert_api_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,5 +240,5 @@ def to_debug_report(self):
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: v1\n"\
"SDK Package Version: 2.1.3".\
"SDK Package Version: 2.1.4".\
format(env=sys.platform, pyversion=sys.version)
55 changes: 55 additions & 0 deletions docs/ConvertDocumentApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Method | HTTP request | Description
[**convert_document_html_to_png**](ConvertDocumentApi.md#convert_document_html_to_png) | **POST** /convert/html/to/png | HTML to PNG array
[**convert_document_pdf_to_docx**](ConvertDocumentApi.md#convert_document_pdf_to_docx) | **POST** /convert/pdf/to/docx | PDF to Word DOCX
[**convert_document_pdf_to_png_array**](ConvertDocumentApi.md#convert_document_pdf_to_png_array) | **POST** /convert/pdf/to/png | PDF to PNG Array
[**convert_document_pdf_to_png_single**](ConvertDocumentApi.md#convert_document_pdf_to_png_single) | **POST** /convert/pdf/to/png/merge-single | PDF to Single PNG image
[**convert_document_pdf_to_pptx**](ConvertDocumentApi.md#convert_document_pdf_to_pptx) | **POST** /convert/pdf/to/pptx | PDF to PowerPoint PPTX
[**convert_document_pdf_to_txt**](ConvertDocumentApi.md#convert_document_pdf_to_txt) | **POST** /convert/pdf/to/txt | PDF to Text
[**convert_document_ppt_to_pdf**](ConvertDocumentApi.md#convert_document_ppt_to_pdf) | **POST** /convert/ppt/to/pdf | PowerPoint PPT (97-03) to PDF
Expand Down Expand Up @@ -733,6 +734,60 @@ Name | Type | Description | Notes

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **convert_document_pdf_to_png_single**
> str convert_document_pdf_to_png_single(input_file)
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

### Example
```python
from __future__ import print_function
import time
import cloudmersive_convert_api_client
from cloudmersive_convert_api_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Apikey
configuration = cloudmersive_convert_api_client.Configuration()
configuration.api_key['Apikey'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Apikey'] = 'Bearer'

# create an instance of the API class
api_instance = cloudmersive_convert_api_client.ConvertDocumentApi(cloudmersive_convert_api_client.ApiClient(configuration))
input_file = '/path/to/file.txt' # file | Input file to perform the operation on.

try:
# PDF to Single PNG image
api_response = api_instance.convert_document_pdf_to_png_single(input_file)
pprint(api_response)
except ApiException as e:
print("Exception when calling ConvertDocumentApi->convert_document_pdf_to_png_single: %s\n" % e)
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**input_file** | **file**| Input file to perform the operation on. |

### Return type

**str**

### Authorization

[Apikey](../README.md#Apikey)

### HTTP request headers

- **Content-Type**: multipart/form-data
- **Accept**: application/octet-stream

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **convert_document_pdf_to_pptx**
> str convert_document_pdf_to_pptx(input_file)
Expand Down
2 changes: 1 addition & 1 deletion packageconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"projectName" : "cloudmersive_convert_api_client",
"packageName" : "cloudmersive_convert_api_client",
"packageVersion": "2.1.3",
"packageVersion": "2.1.4",
"packageUrl": "https://www.cloudmersive.com/convert-api"
}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from setuptools import setup, find_packages # noqa: H301

NAME = "cloudmersive_convert_api_client"
VERSION = "2.1.3"
VERSION = "2.1.4"
# To install the library, run the following
#
# python setup.py install
Expand Down

0 comments on commit 255eec5

Please sign in to comment.