diff --git a/README.md b/README.md index b058d04..4e84f71 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Convert API lets you effortlessly convert file formats and types. This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - API version: v1 -- Package version: 2.0.3 +- Package version: 2.0.4 - Build package: io.swagger.codegen.languages.PythonClientCodegen ## Requirements. @@ -84,10 +84,13 @@ Class | Method | HTTP request | Description *ConvertDataApi* | [**convert_data_xml_to_json**](docs/ConvertDataApi.md#convert_data_xml_to_json) | **POST** /convert/xml/to/json | XML to JSON conversion *ConvertDocumentApi* | [**convert_document_autodetect_get_info**](docs/ConvertDocumentApi.md#convert_document_autodetect_get_info) | **POST** /convert/autodetect/get-info | Get document type information *ConvertDocumentApi* | [**convert_document_autodetect_to_pdf**](docs/ConvertDocumentApi.md#convert_document_autodetect_to_pdf) | **POST** /convert/autodetect/to/pdf | Convert Document to PDF +*ConvertDocumentApi* | [**convert_document_autodetect_to_png_array**](docs/ConvertDocumentApi.md#convert_document_autodetect_to_png_array) | **POST** /convert/autodetect/to/png | Convert Document to PNG array *ConvertDocumentApi* | [**convert_document_csv_to_xlsx**](docs/ConvertDocumentApi.md#convert_document_csv_to_xlsx) | **POST** /convert/csv/to/xlsx | CSV to Excel XLSX *ConvertDocumentApi* | [**convert_document_doc_to_docx**](docs/ConvertDocumentApi.md#convert_document_doc_to_docx) | **POST** /convert/doc/to/docx | Word DOC (97-03) to DOCX *ConvertDocumentApi* | [**convert_document_doc_to_pdf**](docs/ConvertDocumentApi.md#convert_document_doc_to_pdf) | **POST** /convert/doc/to/pdf | Word DOC (97-03) to PDF *ConvertDocumentApi* | [**convert_document_docx_to_pdf**](docs/ConvertDocumentApi.md#convert_document_docx_to_pdf) | **POST** /convert/docx/to/pdf | Word DOCX to PDF +*ConvertDocumentApi* | [**convert_document_html_to_pdf**](docs/ConvertDocumentApi.md#convert_document_html_to_pdf) | **POST** /convert/html/to/pdf | HTML to PDF +*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_pptx**](docs/ConvertDocumentApi.md#convert_document_pdf_to_pptx) | **POST** /convert/pdf/to/pptx | PDF to PowerPoint PPTX @@ -145,6 +148,7 @@ Class | Method | HTTP request | Description - [AlternateFileFormatCandidate](docs/AlternateFileFormatCandidate.md) - [AutodetectGetInfoResult](docs/AutodetectGetInfoResult.md) + - [AutodetectToPngResult](docs/AutodetectToPngResult.md) - [ConvertedPngPage](docs/ConvertedPngPage.md) - [DocumentValidationError](docs/DocumentValidationError.md) - [DocumentValidationResult](docs/DocumentValidationResult.md) diff --git a/cloudmersive_convert_api_client/__init__.py b/cloudmersive_convert_api_client/__init__.py index c4bfb20..28c97dd 100644 --- a/cloudmersive_convert_api_client/__init__.py +++ b/cloudmersive_convert_api_client/__init__.py @@ -33,6 +33,7 @@ # import models into sdk package from cloudmersive_convert_api_client.models.alternate_file_format_candidate import AlternateFileFormatCandidate from cloudmersive_convert_api_client.models.autodetect_get_info_result import AutodetectGetInfoResult +from cloudmersive_convert_api_client.models.autodetect_to_png_result import AutodetectToPngResult from cloudmersive_convert_api_client.models.converted_png_page import ConvertedPngPage from cloudmersive_convert_api_client.models.document_validation_error import DocumentValidationError from cloudmersive_convert_api_client.models.document_validation_result import DocumentValidationResult diff --git a/cloudmersive_convert_api_client/api/convert_document_api.py b/cloudmersive_convert_api_client/api/convert_document_api.py index f8256d4..4c75870 100644 --- a/cloudmersive_convert_api_client/api/convert_document_api.py +++ b/cloudmersive_convert_api_client/api/convert_document_api.py @@ -36,7 +36,7 @@ def __init__(self, api_client=None): def convert_document_autodetect_get_info(self, input_file, **kwargs): # noqa: E501 """Get document type information # noqa: E501 - Auto-detects a document's type information; does not require file extension. Analyzes file contents to confirm file type. # noqa: E501 + 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. # 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_autodetect_get_info(input_file, async_req=True) @@ -58,7 +58,7 @@ def convert_document_autodetect_get_info(self, input_file, **kwargs): # noqa: E def convert_document_autodetect_get_info_with_http_info(self, input_file, **kwargs): # noqa: E501 """Get document type information # noqa: E501 - Auto-detects a document's type information; does not require file extension. Analyzes file contents to confirm file type. # noqa: E501 + 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. # 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_autodetect_get_info_with_http_info(input_file, async_req=True) @@ -135,7 +135,7 @@ def convert_document_autodetect_get_info_with_http_info(self, input_file, **kwar def convert_document_autodetect_to_pdf(self, input_file, **kwargs): # noqa: E501 """Convert Document to PDF # noqa: E501 - Automatically detect file type and convert it to PDF. # noqa: E501 + 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, and even multi-page TIFF files. # 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_autodetect_to_pdf(input_file, async_req=True) @@ -157,7 +157,7 @@ def convert_document_autodetect_to_pdf(self, input_file, **kwargs): # noqa: E50 def convert_document_autodetect_to_pdf_with_http_info(self, input_file, **kwargs): # noqa: E501 """Convert Document to PDF # noqa: E501 - Automatically detect file type and convert it to PDF. # noqa: E501 + 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, and even multi-page TIFF files. # 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_autodetect_to_pdf_with_http_info(input_file, async_req=True) @@ -231,6 +231,105 @@ def convert_document_autodetect_to_pdf_with_http_info(self, input_file, **kwargs _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def convert_document_autodetect_to_png_array(self, input_file, **kwargs): # noqa: E501 + """Convert Document to PNG array # noqa: E501 + + 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. # 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_autodetect_to_png_array(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: AutodetectToPngResult + 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_autodetect_to_png_array_with_http_info(input_file, **kwargs) # noqa: E501 + else: + (data) = self.convert_document_autodetect_to_png_array_with_http_info(input_file, **kwargs) # noqa: E501 + return data + + def convert_document_autodetect_to_png_array_with_http_info(self, input_file, **kwargs): # noqa: E501 + """Convert Document to PNG array # noqa: E501 + + 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. # 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_autodetect_to_png_array_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: AutodetectToPngResult + 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_autodetect_to_png_array" % 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_autodetect_to_png_array`") # 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/autodetect/to/png', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AutodetectToPngResult', # 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_csv_to_xlsx(self, input_file, **kwargs): # noqa: E501 """CSV to Excel XLSX # noqa: E501 @@ -627,6 +726,204 @@ def convert_document_docx_to_pdf_with_http_info(self, input_file, **kwargs): # _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def convert_document_html_to_pdf(self, input_file, **kwargs): # noqa: E501 + """HTML to PDF # noqa: E501 + + 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. # 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_html_to_pdf(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_html_to_pdf_with_http_info(input_file, **kwargs) # noqa: E501 + else: + (data) = self.convert_document_html_to_pdf_with_http_info(input_file, **kwargs) # noqa: E501 + return data + + def convert_document_html_to_pdf_with_http_info(self, input_file, **kwargs): # noqa: E501 + """HTML to PDF # noqa: E501 + + 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. # 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_html_to_pdf_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_html_to_pdf" % 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_html_to_pdf`") # 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/html/to/pdf', '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_html_to_png(self, input_file, **kwargs): # noqa: E501 + """HTML to PNG array # noqa: E501 + + 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. # 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_html_to_png(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: PdfToPngResult + 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_html_to_png_with_http_info(input_file, **kwargs) # noqa: E501 + else: + (data) = self.convert_document_html_to_png_with_http_info(input_file, **kwargs) # noqa: E501 + return data + + def convert_document_html_to_png_with_http_info(self, input_file, **kwargs): # noqa: E501 + """HTML to PNG array # noqa: E501 + + 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. # 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_html_to_png_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: PdfToPngResult + 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_html_to_png" % 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_html_to_png`") # 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/html/to/png', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='PdfToPngResult', # 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_docx(self, input_file, **kwargs): # noqa: E501 """PDF to Word DOCX # noqa: E501 diff --git a/cloudmersive_convert_api_client/api_client.py b/cloudmersive_convert_api_client/api_client.py index 16f4372..fbb13bc 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.0.3/python' + self.user_agent = 'Swagger-Codegen/2.0.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 d515320..eca10e9 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.0.3".\ + "SDK Package Version: 2.0.4".\ format(env=sys.platform, pyversion=sys.version) diff --git a/cloudmersive_convert_api_client/models/__init__.py b/cloudmersive_convert_api_client/models/__init__.py index a4798e7..3baf6d9 100644 --- a/cloudmersive_convert_api_client/models/__init__.py +++ b/cloudmersive_convert_api_client/models/__init__.py @@ -17,6 +17,7 @@ # import models into model package from cloudmersive_convert_api_client.models.alternate_file_format_candidate import AlternateFileFormatCandidate from cloudmersive_convert_api_client.models.autodetect_get_info_result import AutodetectGetInfoResult +from cloudmersive_convert_api_client.models.autodetect_to_png_result import AutodetectToPngResult from cloudmersive_convert_api_client.models.converted_png_page import ConvertedPngPage from cloudmersive_convert_api_client.models.document_validation_error import DocumentValidationError from cloudmersive_convert_api_client.models.document_validation_result import DocumentValidationResult diff --git a/cloudmersive_convert_api_client/models/autodetect_to_png_result.py b/cloudmersive_convert_api_client/models/autodetect_to_png_result.py new file mode 100644 index 0000000..9725843 --- /dev/null +++ b/cloudmersive_convert_api_client/models/autodetect_to_png_result.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + convertapi + + Convert API lets you effortlessly convert file formats and types. # noqa: E501 + + OpenAPI spec version: v1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from cloudmersive_convert_api_client.models.converted_png_page import ConvertedPngPage # noqa: F401,E501 + + +class AutodetectToPngResult(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'successful': 'bool', + 'png_result_pages': 'list[ConvertedPngPage]' + } + + attribute_map = { + 'successful': 'Successful', + 'png_result_pages': 'PngResultPages' + } + + def __init__(self, successful=None, png_result_pages=None): # noqa: E501 + """AutodetectToPngResult - a model defined in Swagger""" # noqa: E501 + + self._successful = None + self._png_result_pages = None + self.discriminator = None + + if successful is not None: + self.successful = successful + if png_result_pages is not None: + self.png_result_pages = png_result_pages + + @property + def successful(self): + """Gets the successful of this AutodetectToPngResult. # noqa: E501 + + True if the operation was successful, false otherwise # noqa: E501 + + :return: The successful of this AutodetectToPngResult. # noqa: E501 + :rtype: bool + """ + return self._successful + + @successful.setter + def successful(self, successful): + """Sets the successful of this AutodetectToPngResult. + + True if the operation was successful, false otherwise # noqa: E501 + + :param successful: The successful of this AutodetectToPngResult. # noqa: E501 + :type: bool + """ + + self._successful = successful + + @property + def png_result_pages(self): + """Gets the png_result_pages of this AutodetectToPngResult. # noqa: E501 + + Array of converted pages # noqa: E501 + + :return: The png_result_pages of this AutodetectToPngResult. # noqa: E501 + :rtype: list[ConvertedPngPage] + """ + return self._png_result_pages + + @png_result_pages.setter + def png_result_pages(self, png_result_pages): + """Sets the png_result_pages of this AutodetectToPngResult. + + Array of converted pages # noqa: E501 + + :param png_result_pages: The png_result_pages of this AutodetectToPngResult. # noqa: E501 + :type: list[ConvertedPngPage] + """ + + self._png_result_pages = png_result_pages + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(AutodetectToPngResult, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, AutodetectToPngResult): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/docs/AutodetectToPngResult.md b/docs/AutodetectToPngResult.md new file mode 100644 index 0000000..51b3067 --- /dev/null +++ b/docs/AutodetectToPngResult.md @@ -0,0 +1,11 @@ +# AutodetectToPngResult + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**successful** | **bool** | True if the operation was successful, false otherwise | [optional] +**png_result_pages** | [**list[ConvertedPngPage]**](ConvertedPngPage.md) | Array of converted pages | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ConvertDocumentApi.md b/docs/ConvertDocumentApi.md index 829e38a..339cab7 100644 --- a/docs/ConvertDocumentApi.md +++ b/docs/ConvertDocumentApi.md @@ -6,10 +6,13 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**convert_document_autodetect_get_info**](ConvertDocumentApi.md#convert_document_autodetect_get_info) | **POST** /convert/autodetect/get-info | Get document type information [**convert_document_autodetect_to_pdf**](ConvertDocumentApi.md#convert_document_autodetect_to_pdf) | **POST** /convert/autodetect/to/pdf | Convert Document to PDF +[**convert_document_autodetect_to_png_array**](ConvertDocumentApi.md#convert_document_autodetect_to_png_array) | **POST** /convert/autodetect/to/png | Convert Document to PNG array [**convert_document_csv_to_xlsx**](ConvertDocumentApi.md#convert_document_csv_to_xlsx) | **POST** /convert/csv/to/xlsx | CSV to Excel XLSX [**convert_document_doc_to_docx**](ConvertDocumentApi.md#convert_document_doc_to_docx) | **POST** /convert/doc/to/docx | Word DOC (97-03) to DOCX [**convert_document_doc_to_pdf**](ConvertDocumentApi.md#convert_document_doc_to_pdf) | **POST** /convert/doc/to/pdf | Word DOC (97-03) to PDF [**convert_document_docx_to_pdf**](ConvertDocumentApi.md#convert_document_docx_to_pdf) | **POST** /convert/docx/to/pdf | Word DOCX to PDF +[**convert_document_html_to_pdf**](ConvertDocumentApi.md#convert_document_html_to_pdf) | **POST** /convert/html/to/pdf | HTML to PDF +[**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_pptx**](ConvertDocumentApi.md#convert_document_pdf_to_pptx) | **POST** /convert/pdf/to/pptx | PDF to PowerPoint PPTX @@ -27,7 +30,7 @@ Method | HTTP request | Description Get document type information -Auto-detects a document's type information; does not require file extension. Analyzes file contents to confirm file type. +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. ### Example ```python @@ -81,7 +84,7 @@ Name | Type | Description | Notes Convert Document to PDF -Automatically detect file type and convert it 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, and even multi-page TIFF files. ### Example ```python @@ -130,6 +133,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_autodetect_to_png_array** +> AutodetectToPngResult convert_document_autodetect_to_png_array(input_file) + +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. + +### 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: + # Convert Document to PNG array + api_response = api_instance.convert_document_autodetect_to_png_array(input_file) + pprint(api_response) +except ApiException as e: + print("Exception when calling ConvertDocumentApi->convert_document_autodetect_to_png_array: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **input_file** | **file**| Input file to perform the operation on. | + +### Return type + +[**AutodetectToPngResult**](AutodetectToPngResult.md) + +### 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_csv_to_xlsx** > str convert_document_csv_to_xlsx(input_file) @@ -346,6 +403,114 @@ 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_html_to_pdf** +> str convert_document_html_to_pdf(input_file) + +HTML to PDF + +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. + +### 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: + # HTML to PDF + api_response = api_instance.convert_document_html_to_pdf(input_file) + pprint(api_response) +except ApiException as e: + print("Exception when calling ConvertDocumentApi->convert_document_html_to_pdf: %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_html_to_png** +> PdfToPngResult convert_document_html_to_png(input_file) + +HTML to PNG 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. + +### 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: + # HTML to PNG array + api_response = api_instance.convert_document_html_to_png(input_file) + pprint(api_response) +except ApiException as e: + print("Exception when calling ConvertDocumentApi->convert_document_html_to_png: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **input_file** | **file**| Input file to perform the operation on. | + +### Return type + +[**PdfToPngResult**](PdfToPngResult.md) + +### 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_docx** > str convert_document_pdf_to_docx(input_file) diff --git a/packageconfig.json b/packageconfig.json index 11080a6..99a9657 100644 --- a/packageconfig.json +++ b/packageconfig.json @@ -1,5 +1,5 @@ { "projectName" : "cloudmersive_convert_api_client", "packageName" : "cloudmersive_convert_api_client", - "packageVersion": "2.0.3" + "packageVersion": "2.0.4" } \ No newline at end of file diff --git a/setup.py b/setup.py index e045ddd..8bfa9f2 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.0.3" +VERSION = "2.0.4" # To install the library, run the following # # python setup.py install diff --git a/test/test_autodetect_to_png_result.py b/test/test_autodetect_to_png_result.py new file mode 100644 index 0000000..1cf5f97 --- /dev/null +++ b/test/test_autodetect_to_png_result.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + convertapi + + Convert API lets you effortlessly convert file formats and types. # noqa: E501 + + OpenAPI spec version: v1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import cloudmersive_convert_api_client +from cloudmersive_convert_api_client.models.autodetect_to_png_result import AutodetectToPngResult # noqa: E501 +from cloudmersive_convert_api_client.rest import ApiException + + +class TestAutodetectToPngResult(unittest.TestCase): + """AutodetectToPngResult unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAutodetectToPngResult(self): + """Test AutodetectToPngResult""" + # FIXME: construct object with mandatory attributes with example values + # model = cloudmersive_convert_api_client.models.autodetect_to_png_result.AutodetectToPngResult() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main()