From 255eec594c36ab6eaef24ea6b1c3bca7d3e135fc Mon Sep 17 00:00:00 2001 From: Cloudmersive <35204726+Cloudmersive@users.noreply.github.com> Date: Sun, 27 Oct 2019 14:10:56 -0700 Subject: [PATCH] 2.1.4 --- README.md | 3 +- .../api/convert_document_api.py | 99 +++++++++++++++++++ cloudmersive_convert_api_client/api_client.py | 2 +- .../configuration.py | 2 +- docs/ConvertDocumentApi.md | 55 +++++++++++ packageconfig.json | 2 +- setup.py | 2 +- 7 files changed, 160 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8fcc9ef..f887882 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 diff --git a/cloudmersive_convert_api_client/api/convert_document_api.py b/cloudmersive_convert_api_client/api/convert_document_api.py index a956d9b..6a39942 100644 --- a/cloudmersive_convert_api_client/api/convert_document_api.py +++ b/cloudmersive_convert_api_client/api/convert_document_api.py @@ -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 diff --git a/cloudmersive_convert_api_client/api_client.py b/cloudmersive_convert_api_client/api_client.py index ff7e90c..c450791 100644 --- a/cloudmersive_convert_api_client/api_client.py +++ b/cloudmersive_convert_api_client/api_client.py @@ -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: diff --git a/cloudmersive_convert_api_client/configuration.py b/cloudmersive_convert_api_client/configuration.py index 012660c..9fff73d 100644 --- a/cloudmersive_convert_api_client/configuration.py +++ b/cloudmersive_convert_api_client/configuration.py @@ -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) diff --git a/docs/ConvertDocumentApi.md b/docs/ConvertDocumentApi.md index 14b1fc4..c5c2cd8 100644 --- a/docs/ConvertDocumentApi.md +++ b/docs/ConvertDocumentApi.md @@ -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 @@ -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) diff --git a/packageconfig.json b/packageconfig.json index 5b2e9b6..5dddfa0 100644 --- a/packageconfig.json +++ b/packageconfig.json @@ -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" } \ No newline at end of file diff --git a/setup.py b/setup.py index 5bcf919..929ecf6 100644 --- a/setup.py +++ b/setup.py @@ -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