Skip to content

Commit 26d3aeb

Browse files
Merge pull request #27 from kaferi/master
Update to v20.2
2 parents 4509942 + edcac1c commit 26d3aeb

File tree

7 files changed

+316
-6
lines changed

7 files changed

+316
-6
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Aspose.PDF Cloud
22
- API version: 3.0
3-
- Package version: 20.1.0
3+
- Package version: 20.2.0
44

55
[Aspose.PDF Cloud](https://products.aspose.cloud/pdf) is a true REST API that enables you to perform a wide range of document processing operations including creation, manipulation, conversion and rendering of Pdf documents in the cloud.
66

@@ -238,6 +238,7 @@ Class | Method | HTTP request | Description
238238
*PdfApi* | [**get_page_underline_annotations**](docs/PdfApi.md#get_page_underline_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/underline | Read document page underline annotations.
239239
*PdfApi* | [**get_pages**](docs/PdfApi.md#get_pages) | **GET** /pdf/\{name}/pages | Read document pages info.
240240
*PdfApi* | [**get_pcl_in_storage_to_pdf**](docs/PdfApi.md#get_pcl_in_storage_to_pdf) | **GET** /pdf/create/pcl | Convert PCL file (located on storage) to PDF format and return resulting file in response.
241+
*PdfApi* | [**get_pdf_a_in_storage_to_pdf**](docs/PdfApi.md#get_pdf_a_in_storage_to_pdf) | **GET** /pdf/create/pdfa | Convert PDFA file (located on storage) to PDF format and return resulting file in response.
241242
*PdfApi* | [**get_pdf_in_storage_to_doc**](docs/PdfApi.md#get_pdf_in_storage_to_doc) | **GET** /pdf/\{name}/convert/doc | Converts PDF document (located on storage) to DOC format and returns resulting file in response content
242243
*PdfApi* | [**get_pdf_in_storage_to_epub**](docs/PdfApi.md#get_pdf_in_storage_to_epub) | **GET** /pdf/\{name}/convert/epub | Converts PDF document (located on storage) to EPUB format and returns resulting file in response content
243244
*PdfApi* | [**get_pdf_in_storage_to_html**](docs/PdfApi.md#get_pdf_in_storage_to_html) | **GET** /pdf/\{name}/convert/html | Converts PDF document (located on storage) to Html format and returns resulting file in response content
@@ -391,6 +392,7 @@ Class | Method | HTTP request | Description
391392
*PdfApi* | [**put_page_convert_to_png**](docs/PdfApi.md#put_page_convert_to_png) | **PUT** /pdf/\{name}/pages/\{pageNumber}/convert/png | Convert document page to png image and upload resulting file to storage.
392393
*PdfApi* | [**put_page_convert_to_tiff**](docs/PdfApi.md#put_page_convert_to_tiff) | **PUT** /pdf/\{name}/pages/\{pageNumber}/convert/tiff | Convert document page to Tiff image and upload resulting file to storage.
393394
*PdfApi* | [**put_pcl_in_storage_to_pdf**](docs/PdfApi.md#put_pcl_in_storage_to_pdf) | **PUT** /pdf/\{name}/create/pcl | Convert PCL file (located on storage) to PDF format and upload resulting file to storage.
395+
*PdfApi* | [**put_pdf_a_in_storage_to_pdf**](docs/PdfApi.md#put_pdf_a_in_storage_to_pdf) | **PUT** /pdf/\{name}/create/pdfa | Convert PDFA file (located on storage) to PDF format and upload resulting file to storage.
394396
*PdfApi* | [**put_pdf_in_request_to_doc**](docs/PdfApi.md#put_pdf_in_request_to_doc) | **PUT** /pdf/convert/doc | Converts PDF document (in request content) to DOC format and uploads resulting file to storage.
395397
*PdfApi* | [**put_pdf_in_request_to_epub**](docs/PdfApi.md#put_pdf_in_request_to_epub) | **PUT** /pdf/convert/epub | Converts PDF document (in request content) to EPUB format and uploads resulting file to storage.
396398
*PdfApi* | [**put_pdf_in_request_to_html**](docs/PdfApi.md#put_pdf_in_request_to_html) | **PUT** /pdf/convert/html | Converts PDF document (in request content) to Html format and uploads resulting file to storage.

asposepdfcloud/apis/pdf_api.py

Lines changed: 237 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16547,6 +16547,118 @@ def get_pcl_in_storage_to_pdf_with_http_info(self, src_path, **kwargs):
1654716547
_request_timeout=params.get('_request_timeout'),
1654816548
collection_formats=collection_formats)
1654916549

16550+
def get_pdf_a_in_storage_to_pdf(self, src_path, **kwargs):
16551+
"""
16552+
Convert PDFA file (located on storage) to PDF format and return resulting file in response.
16553+
This method makes a synchronous HTTP request by default. To make an
16554+
asynchronous HTTP request, please define a `callback` function
16555+
to be invoked when receiving the response.
16556+
>>> def callback_function(response):
16557+
>>> pprint(response)
16558+
>>>
16559+
>>> thread = api.get_pdf_a_in_storage_to_pdf(src_path, callback=callback_function)
16560+
16561+
:param callback function: The callback function
16562+
for asynchronous request. (optional)
16563+
:param str src_path: Full source filename (ex. /folder1/folder2/template.pdf) (required)
16564+
:param bool dont_optimize: If set, document resources will not be optimized.
16565+
:param str storage: The document storage.
16566+
:return: file
16567+
If the method is called asynchronously,
16568+
returns the request thread.
16569+
"""
16570+
kwargs['_return_http_data_only'] = True
16571+
if kwargs.get('callback'):
16572+
return self.get_pdf_a_in_storage_to_pdf_with_http_info(src_path, **kwargs)
16573+
else:
16574+
(data) = self.get_pdf_a_in_storage_to_pdf_with_http_info(src_path, **kwargs)
16575+
return data
16576+
16577+
def get_pdf_a_in_storage_to_pdf_with_http_info(self, src_path, **kwargs):
16578+
"""
16579+
Convert PDFA file (located on storage) to PDF format and return resulting file in response.
16580+
This method makes a synchronous HTTP request by default. To make an
16581+
asynchronous HTTP request, please define a `callback` function
16582+
to be invoked when receiving the response.
16583+
>>> def callback_function(response):
16584+
>>> pprint(response)
16585+
>>>
16586+
>>> thread = api.get_pdf_a_in_storage_to_pdf_with_http_info(src_path, callback=callback_function)
16587+
16588+
:param callback function: The callback function
16589+
for asynchronous request. (optional)
16590+
:param str src_path: Full source filename (ex. /folder1/folder2/template.pdf) (required)
16591+
:param bool dont_optimize: If set, document resources will not be optimized.
16592+
:param str storage: The document storage.
16593+
:return: file
16594+
If the method is called asynchronously,
16595+
returns the request thread.
16596+
"""
16597+
16598+
all_params = ['src_path', 'dont_optimize', 'storage']
16599+
all_params.append('callback')
16600+
all_params.append('_return_http_data_only')
16601+
all_params.append('_preload_content')
16602+
all_params.append('_request_timeout')
16603+
16604+
params = locals()
16605+
for key, val in iteritems(params['kwargs']):
16606+
if key not in all_params:
16607+
raise TypeError(
16608+
"Got an unexpected keyword argument '%s'"
16609+
" to method get_pdf_a_in_storage_to_pdf" % key
16610+
)
16611+
params[key] = val
16612+
del params['kwargs']
16613+
# verify the required parameter 'src_path' is set
16614+
if ('src_path' not in params) or (params['src_path'] is None):
16615+
raise ValueError("Missing the required parameter `src_path` when calling `get_pdf_a_in_storage_to_pdf`")
16616+
16617+
16618+
collection_formats = {}
16619+
16620+
path_params = {}
16621+
16622+
query_params = []
16623+
if 'src_path' in params:
16624+
query_params.append(('srcPath', params['src_path']))
16625+
if 'dont_optimize' in params:
16626+
query_params.append(('dontOptimize', params['dont_optimize']))
16627+
if 'storage' in params:
16628+
query_params.append(('storage', params['storage']))
16629+
16630+
header_params = {}
16631+
16632+
form_params = []
16633+
local_var_files = {}
16634+
16635+
body_params = None
16636+
# HTTP header `Accept`
16637+
header_params['Accept'] = self.api_client.\
16638+
select_header_accept(['multipart/form-data'])
16639+
16640+
# HTTP header `Content-Type`
16641+
header_params['Content-Type'] = self.api_client.\
16642+
select_header_content_type(['application/json'])
16643+
16644+
# Authentication setting
16645+
auth_settings = ['JWT']
16646+
16647+
return self.api_client.call_api('/pdf/create/pdfa', 'GET',
16648+
path_params,
16649+
query_params,
16650+
header_params,
16651+
body=body_params,
16652+
post_params=form_params,
16653+
files=local_var_files,
16654+
response_type='file',
16655+
auth_settings=auth_settings,
16656+
callback=params.get('callback'),
16657+
_return_http_data_only=params.get('_return_http_data_only'),
16658+
_preload_content=params.get('_preload_content', True),
16659+
_request_timeout=params.get('_request_timeout'),
16660+
collection_formats=collection_formats)
16661+
1655016662
def get_pdf_in_storage_to_doc(self, name, **kwargs):
1655116663
"""
1655216664
Converts PDF document (located on storage) to DOC format and returns resulting file in response content
@@ -22235,7 +22347,7 @@ def post_bookmark(self, name, bookmark_path, bookmarks, **kwargs):
2223522347
:param callback function: The callback function
2223622348
for asynchronous request. (optional)
2223722349
:param str name: The document name. (required)
22238-
:param str bookmark_path: The bookmark path. (required)
22350+
:param str bookmark_path: The parent bookmark path. Specify an empty string when adding a bookmark to the root. (required)
2223922351
:param list[Bookmark] bookmarks: The array of bookmark. (required)
2224022352
:param str folder: The document folder.
2224122353
:param str storage: The document storage.
@@ -22264,7 +22376,7 @@ def post_bookmark_with_http_info(self, name, bookmark_path, bookmarks, **kwargs)
2226422376
:param callback function: The callback function
2226522377
for asynchronous request. (optional)
2226622378
:param str name: The document name. (required)
22267-
:param str bookmark_path: The bookmark path. (required)
22379+
:param str bookmark_path: The parent bookmark path. Specify an empty string when adding a bookmark to the root. (required)
2226822380
:param list[Bookmark] bookmarks: The array of bookmark. (required)
2226922381
:param str folder: The document folder.
2227022382
:param str storage: The document storage.
@@ -35641,6 +35753,129 @@ def put_pcl_in_storage_to_pdf_with_http_info(self, name, src_path, **kwargs):
3564135753
_request_timeout=params.get('_request_timeout'),
3564235754
collection_formats=collection_formats)
3564335755

35756+
def put_pdf_a_in_storage_to_pdf(self, name, src_path, **kwargs):
35757+
"""
35758+
Convert PDFA file (located on storage) to PDF format and upload resulting file to storage.
35759+
This method makes a synchronous HTTP request by default. To make an
35760+
asynchronous HTTP request, please define a `callback` function
35761+
to be invoked when receiving the response.
35762+
>>> def callback_function(response):
35763+
>>> pprint(response)
35764+
>>>
35765+
>>> thread = api.put_pdf_a_in_storage_to_pdf(name, src_path, callback=callback_function)
35766+
35767+
:param callback function: The callback function
35768+
for asynchronous request. (optional)
35769+
:param str name: The document name. (required)
35770+
:param str src_path: Full source filename (ex. /folder1/folder2/template.pdf) (required)
35771+
:param str dst_folder: The destination document folder.
35772+
:param bool dont_optimize: If set, document resources will not be optimized.
35773+
:param str storage: The document storage.
35774+
:return: AsposeResponse
35775+
If the method is called asynchronously,
35776+
returns the request thread.
35777+
"""
35778+
kwargs['_return_http_data_only'] = True
35779+
if kwargs.get('callback'):
35780+
return self.put_pdf_a_in_storage_to_pdf_with_http_info(name, src_path, **kwargs)
35781+
else:
35782+
(data) = self.put_pdf_a_in_storage_to_pdf_with_http_info(name, src_path, **kwargs)
35783+
return data
35784+
35785+
def put_pdf_a_in_storage_to_pdf_with_http_info(self, name, src_path, **kwargs):
35786+
"""
35787+
Convert PDFA file (located on storage) to PDF format and upload resulting file to storage.
35788+
This method makes a synchronous HTTP request by default. To make an
35789+
asynchronous HTTP request, please define a `callback` function
35790+
to be invoked when receiving the response.
35791+
>>> def callback_function(response):
35792+
>>> pprint(response)
35793+
>>>
35794+
>>> thread = api.put_pdf_a_in_storage_to_pdf_with_http_info(name, src_path, callback=callback_function)
35795+
35796+
:param callback function: The callback function
35797+
for asynchronous request. (optional)
35798+
:param str name: The document name. (required)
35799+
:param str src_path: Full source filename (ex. /folder1/folder2/template.pdf) (required)
35800+
:param str dst_folder: The destination document folder.
35801+
:param bool dont_optimize: If set, document resources will not be optimized.
35802+
:param str storage: The document storage.
35803+
:return: AsposeResponse
35804+
If the method is called asynchronously,
35805+
returns the request thread.
35806+
"""
35807+
35808+
all_params = ['name', 'src_path', 'dst_folder', 'dont_optimize', 'storage']
35809+
all_params.append('callback')
35810+
all_params.append('_return_http_data_only')
35811+
all_params.append('_preload_content')
35812+
all_params.append('_request_timeout')
35813+
35814+
params = locals()
35815+
for key, val in iteritems(params['kwargs']):
35816+
if key not in all_params:
35817+
raise TypeError(
35818+
"Got an unexpected keyword argument '%s'"
35819+
" to method put_pdf_a_in_storage_to_pdf" % key
35820+
)
35821+
params[key] = val
35822+
del params['kwargs']
35823+
# verify the required parameter 'name' is set
35824+
if ('name' not in params) or (params['name'] is None):
35825+
raise ValueError("Missing the required parameter `name` when calling `put_pdf_a_in_storage_to_pdf`")
35826+
# verify the required parameter 'src_path' is set
35827+
if ('src_path' not in params) or (params['src_path'] is None):
35828+
raise ValueError("Missing the required parameter `src_path` when calling `put_pdf_a_in_storage_to_pdf`")
35829+
35830+
35831+
collection_formats = {}
35832+
35833+
path_params = {}
35834+
if 'name' in params:
35835+
path_params['name'] = params['name']
35836+
35837+
query_params = []
35838+
if 'src_path' in params:
35839+
query_params.append(('srcPath', params['src_path']))
35840+
if 'dst_folder' in params:
35841+
query_params.append(('dstFolder', params['dst_folder']))
35842+
if 'dont_optimize' in params:
35843+
query_params.append(('dontOptimize', params['dont_optimize']))
35844+
if 'storage' in params:
35845+
query_params.append(('storage', params['storage']))
35846+
35847+
header_params = {}
35848+
35849+
form_params = []
35850+
local_var_files = {}
35851+
35852+
body_params = None
35853+
# HTTP header `Accept`
35854+
header_params['Accept'] = self.api_client.\
35855+
select_header_accept(['application/json'])
35856+
35857+
# HTTP header `Content-Type`
35858+
header_params['Content-Type'] = self.api_client.\
35859+
select_header_content_type(['application/json'])
35860+
35861+
# Authentication setting
35862+
auth_settings = ['JWT']
35863+
35864+
return self.api_client.call_api('/pdf/{name}/create/pdfa', 'PUT',
35865+
path_params,
35866+
query_params,
35867+
header_params,
35868+
body=body_params,
35869+
post_params=form_params,
35870+
files=local_var_files,
35871+
response_type='AsposeResponse',
35872+
auth_settings=auth_settings,
35873+
callback=params.get('callback'),
35874+
_return_http_data_only=params.get('_return_http_data_only'),
35875+
_preload_content=params.get('_preload_content', True),
35876+
_request_timeout=params.get('_request_timeout'),
35877+
collection_formats=collection_formats)
35878+
3564435879
def put_pdf_in_request_to_doc(self, out_path, **kwargs):
3564535880
"""
3564635881
Converts PDF document (in request content) to DOC format and uploads resulting file to storage.

asposepdfcloud/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,5 +199,5 @@ def to_debug_report(self):
199199
"OS: {env}\n"\
200200
"Python Version: {pyversion}\n"\
201201
"Version of the API: 3.0\n"\
202-
"SDK Package Version: 20.1.0".\
202+
"SDK Package Version: 20.2.0".\
203203
format(env=sys.platform, pyversion=sys.version)

0 commit comments

Comments
 (0)