Skip to content

Commit 1e7dfe0

Browse files
authored
Merge pull request #68 from aspose-pdf-cloud/develop
update to 24.4
2 parents 07907e0 + 4c27dc4 commit 1e7dfe0

File tree

7 files changed

+305
-62
lines changed

7 files changed

+305
-62
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ XLS, XLSX, PPTX, DOC, DOCX, MobiXML, JPEG, EMF, PNG, BMP, GIF, TIFF, Text
3030
## Read PDF Formats
3131
MHT, PCL, PS, XSLFO, MD
3232

33-
## Enhancements in Version 24.3
33+
## Enhancements in Version 24.4
34+
- Convert PDF to optimized Text.
35+
- Convert PDF to EXCEL without Cloud Storage.
3436
- A new version of Aspose.PDF Cloud was prepared using the latest version of Aspose.PDF for .NET.
3537

3638
## Requirements.

asposepdfcloud/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def __init__(self, app_key, app_sid, host=None, self_host=False):
8383
self.rest_client = RESTClientObject()
8484
self.default_headers = {}
8585
self.default_headers['x-aspose-client'] = 'python sdk'
86-
self.default_headers['x-aspose-client-version'] = '24.3.0'
86+
self.default_headers['x-aspose-client-version'] = '24.4.0'
8787

8888
self.self_host = self_host
8989
self.app_key = app_key

asposepdfcloud/apis/pdf_api.py

Lines changed: 229 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17715,6 +17715,118 @@ def get_pdf_in_storage_to_te_x_with_http_info(self, name, **kwargs):
1771517715
_request_timeout=params.get('_request_timeout'),
1771617716
collection_formats=collection_formats)
1771717717

17718+
def get_pdf_in_storage_to_text(self, name, **kwargs):
17719+
"""
17720+
Converts PDF document (located on storage) to Text format and returns resulting file in response content
17721+
This method makes a synchronous HTTP request by default. To make an
17722+
asynchronous HTTP request, please define a `callback` function
17723+
to be invoked when receiving the response.
17724+
>>> def callback_function(response):
17725+
>>> pprint(response)
17726+
>>>
17727+
>>> thread = api.get_pdf_in_storage_to_text(name, callback=callback_function)
17728+
17729+
:param callback function: The callback function
17730+
for asynchronous request. (optional)
17731+
:param str name: The document name. (required)
17732+
:param str folder: The document folder.
17733+
:param str storage: The document storage.
17734+
:return: file
17735+
If the method is called asynchronously,
17736+
returns the request thread.
17737+
"""
17738+
kwargs['_return_http_data_only'] = True
17739+
if kwargs.get('callback'):
17740+
return self.get_pdf_in_storage_to_text_with_http_info(name, **kwargs)
17741+
else:
17742+
(data) = self.get_pdf_in_storage_to_text_with_http_info(name, **kwargs)
17743+
return data
17744+
17745+
def get_pdf_in_storage_to_text_with_http_info(self, name, **kwargs):
17746+
"""
17747+
Converts PDF document (located on storage) to Text format and returns resulting file in response content
17748+
This method makes a synchronous HTTP request by default. To make an
17749+
asynchronous HTTP request, please define a `callback` function
17750+
to be invoked when receiving the response.
17751+
>>> def callback_function(response):
17752+
>>> pprint(response)
17753+
>>>
17754+
>>> thread = api.get_pdf_in_storage_to_text_with_http_info(name, callback=callback_function)
17755+
17756+
:param callback function: The callback function
17757+
for asynchronous request. (optional)
17758+
:param str name: The document name. (required)
17759+
:param str folder: The document folder.
17760+
:param str storage: The document storage.
17761+
:return: file
17762+
If the method is called asynchronously,
17763+
returns the request thread.
17764+
"""
17765+
17766+
all_params = ['name', 'folder', 'storage']
17767+
all_params.append('callback')
17768+
all_params.append('_return_http_data_only')
17769+
all_params.append('_preload_content')
17770+
all_params.append('_request_timeout')
17771+
17772+
params = locals()
17773+
for key, val in iteritems(params['kwargs']):
17774+
if key not in all_params:
17775+
raise TypeError(
17776+
"Got an unexpected keyword argument '%s'"
17777+
" to method get_pdf_in_storage_to_text" % key
17778+
)
17779+
params[key] = val
17780+
del params['kwargs']
17781+
# verify the required parameter 'name' is set
17782+
if ('name' not in params) or (params['name'] is None):
17783+
raise ValueError("Missing the required parameter `name` when calling `get_pdf_in_storage_to_text`")
17784+
17785+
17786+
collection_formats = {}
17787+
17788+
path_params = {}
17789+
if 'name' in params:
17790+
path_params['name'] = params['name']
17791+
17792+
query_params = []
17793+
if 'folder' in params:
17794+
query_params.append(('folder', params['folder']))
17795+
if 'storage' in params:
17796+
query_params.append(('storage', params['storage']))
17797+
17798+
header_params = {}
17799+
17800+
form_params = []
17801+
local_var_files = {}
17802+
17803+
body_params = None
17804+
# HTTP header `Accept`
17805+
header_params['Accept'] = self.api_client.\
17806+
select_header_accept(['multipart/form-data'])
17807+
17808+
# HTTP header `Content-Type`
17809+
header_params['Content-Type'] = self.api_client.\
17810+
select_header_content_type(['application/json'])
17811+
17812+
# Authentication setting
17813+
auth_settings = ['JWT']
17814+
17815+
return self.api_client.call_api('/pdf/{name}/convert/text', 'GET',
17816+
path_params,
17817+
query_params,
17818+
header_params,
17819+
body=body_params,
17820+
post_params=form_params,
17821+
files=local_var_files,
17822+
response_type='file',
17823+
auth_settings=auth_settings,
17824+
callback=params.get('callback'),
17825+
_return_http_data_only=params.get('_return_http_data_only'),
17826+
_preload_content=params.get('_preload_content', True),
17827+
_request_timeout=params.get('_request_timeout'),
17828+
collection_formats=collection_formats)
17829+
1771817830
def get_pdf_in_storage_to_tiff(self, name, **kwargs):
1771917831
"""
1772017832
Converts PDF document (located on storage) to TIFF format and returns resulting file in response content
@@ -28854,6 +28966,123 @@ def post_page_underline_annotations_with_http_info(self, name, page_number, anno
2885428966
_request_timeout=params.get('_request_timeout'),
2885528967
collection_formats=collection_formats)
2885628968

28969+
def post_pdf_to_xlsx(self, **kwargs):
28970+
"""
28971+
Converts PDF document (in request content) to XLSX format and uploads and returns resulting file in response content.
28972+
This method makes a synchronous HTTP request by default. To make an
28973+
asynchronous HTTP request, please define a `callback` function
28974+
to be invoked when receiving the response.
28975+
>>> def callback_function(response):
28976+
>>> pprint(response)
28977+
>>>
28978+
>>> thread = api.post_pdf_to_xlsx(callback=callback_function)
28979+
28980+
:param callback function: The callback function
28981+
for asynchronous request. (optional)
28982+
:param bool insert_blank_column_at_first: Insert blank column at first
28983+
:param bool minimize_the_number_of_worksheets: Minimize the number of worksheets
28984+
:param bool uniform_worksheets: Uniform worksheets
28985+
:param str password: The password (Base64).
28986+
:param file file: A file to be converted.
28987+
:return: file
28988+
If the method is called asynchronously,
28989+
returns the request thread.
28990+
"""
28991+
kwargs['_return_http_data_only'] = True
28992+
if kwargs.get('callback'):
28993+
return self.post_pdf_to_xlsx_with_http_info(**kwargs)
28994+
else:
28995+
(data) = self.post_pdf_to_xlsx_with_http_info(**kwargs)
28996+
return data
28997+
28998+
def post_pdf_to_xlsx_with_http_info(self, **kwargs):
28999+
"""
29000+
Converts PDF document (in request content) to XLSX format and uploads and returns resulting file in response content.
29001+
This method makes a synchronous HTTP request by default. To make an
29002+
asynchronous HTTP request, please define a `callback` function
29003+
to be invoked when receiving the response.
29004+
>>> def callback_function(response):
29005+
>>> pprint(response)
29006+
>>>
29007+
>>> thread = api.post_pdf_to_xlsx_with_http_info(callback=callback_function)
29008+
29009+
:param callback function: The callback function
29010+
for asynchronous request. (optional)
29011+
:param bool insert_blank_column_at_first: Insert blank column at first
29012+
:param bool minimize_the_number_of_worksheets: Minimize the number of worksheets
29013+
:param bool uniform_worksheets: Uniform worksheets
29014+
:param str password: The password (Base64).
29015+
:param file file: A file to be converted.
29016+
:return: file
29017+
If the method is called asynchronously,
29018+
returns the request thread.
29019+
"""
29020+
29021+
all_params = ['insert_blank_column_at_first', 'minimize_the_number_of_worksheets', 'uniform_worksheets', 'password', 'file']
29022+
all_params.append('callback')
29023+
all_params.append('_return_http_data_only')
29024+
all_params.append('_preload_content')
29025+
all_params.append('_request_timeout')
29026+
29027+
params = locals()
29028+
for key, val in iteritems(params['kwargs']):
29029+
if key not in all_params:
29030+
raise TypeError(
29031+
"Got an unexpected keyword argument '%s'"
29032+
" to method post_pdf_to_xlsx" % key
29033+
)
29034+
params[key] = val
29035+
del params['kwargs']
29036+
29037+
29038+
collection_formats = {}
29039+
29040+
path_params = {}
29041+
29042+
query_params = []
29043+
if 'insert_blank_column_at_first' in params:
29044+
query_params.append(('insertBlankColumnAtFirst', params['insert_blank_column_at_first']))
29045+
if 'minimize_the_number_of_worksheets' in params:
29046+
query_params.append(('minimizeTheNumberOfWorksheets', params['minimize_the_number_of_worksheets']))
29047+
if 'uniform_worksheets' in params:
29048+
query_params.append(('uniformWorksheets', params['uniform_worksheets']))
29049+
if 'password' in params:
29050+
query_params.append(('password', params['password']))
29051+
29052+
header_params = {}
29053+
29054+
form_params = []
29055+
local_var_files = {}
29056+
if 'file' in params:
29057+
local_var_files['file'] = params['file']
29058+
29059+
body_params = None
29060+
# HTTP header `Accept`
29061+
header_params['Accept'] = self.api_client.\
29062+
select_header_accept(['multipart/form-data'])
29063+
29064+
# HTTP header `Content-Type`
29065+
header_params['Content-Type'] = self.api_client.\
29066+
select_header_content_type(['multipart/form-data'])
29067+
29068+
# Authentication setting
29069+
auth_settings = ['JWT']
29070+
29071+
return self.api_client.call_api('/pdf/convert/xlsx', 'POST',
29072+
path_params,
29073+
query_params,
29074+
header_params,
29075+
body=body_params,
29076+
post_params=form_params,
29077+
files=local_var_files,
29078+
response_type='file',
29079+
auth_settings=auth_settings,
29080+
callback=params.get('callback'),
29081+
_return_http_data_only=params.get('_return_http_data_only'),
29082+
_preload_content=params.get('_preload_content', True),
29083+
_request_timeout=params.get('_request_timeout'),
29084+
collection_formats=collection_formats)
29085+
2885729086
def post_popup_annotation(self, name, annotation_id, annotation, **kwargs):
2885829087
"""
2885929088
Add document popup annotations.

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: 24.3.0".\
202+
"SDK Package Version: 24.4.0".\
203203
format(env=sys.platform, pyversion=sys.version)

docs/PdfApi.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ Method | HTTP request | Description
153153
[**get_pdf_in_storage_to_pptx**](PdfApi.md#get_pdf_in_storage_to_pptx) | **GET** /pdf/\{name}/convert/pptx | Converts PDF document (located on storage) to PPTX format and returns resulting file in response content
154154
[**get_pdf_in_storage_to_svg**](PdfApi.md#get_pdf_in_storage_to_svg) | **GET** /pdf/\{name}/convert/svg | Converts PDF document (located on storage) to SVG format and returns resulting file in response content
155155
[**get_pdf_in_storage_to_te_x**](PdfApi.md#get_pdf_in_storage_to_te_x) | **GET** /pdf/\{name}/convert/tex | Converts PDF document (located on storage) to TeX format and returns resulting file in response content
156+
[**get_pdf_in_storage_to_text**](PdfApi.md#get_pdf_in_storage_to_text) | **GET** /pdf/\{name}/convert/text | Converts PDF document (located on storage) to Text format and returns resulting file in response content
156157
[**get_pdf_in_storage_to_tiff**](PdfApi.md#get_pdf_in_storage_to_tiff) | **GET** /pdf/\{name}/convert/tiff | Converts PDF document (located on storage) to TIFF format and returns resulting file in response content
157158
[**get_pdf_in_storage_to_xls**](PdfApi.md#get_pdf_in_storage_to_xls) | **GET** /pdf/\{name}/convert/xls | Converts PDF document (located on storage) to XLS format and returns resulting file in response content
158159
[**get_pdf_in_storage_to_xlsx**](PdfApi.md#get_pdf_in_storage_to_xlsx) | **GET** /pdf/\{name}/convert/xlsx | Converts PDF document (located on storage) to XLSX format and returns resulting file in response content
@@ -243,6 +244,7 @@ Method | HTTP request | Description
243244
[**post_page_text_replace**](PdfApi.md#post_page_text_replace) | **POST** /pdf/\{name}/pages/\{pageNumber}/text/replace | Page's replace text method.
244245
[**post_page_text_stamps**](PdfApi.md#post_page_text_stamps) | **POST** /pdf/\{name}/pages/\{pageNumber}/stamps/text | Add document page text stamps.
245246
[**post_page_underline_annotations**](PdfApi.md#post_page_underline_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/underline | Add document page underline annotations.
247+
[**post_pdf_to_xlsx**](PdfApi.md#post_pdf_to_xlsx) | **POST** /pdf/convert/xlsx | Converts PDF document (in request content) to XLSX format and uploads and returns resulting file in response content.
246248
[**post_popup_annotation**](PdfApi.md#post_popup_annotation) | **POST** /pdf/\{name}/annotations/\{annotationId}/popup | Add document popup annotations.
247249
[**post_radio_button_fields**](PdfApi.md#post_radio_button_fields) | **POST** /pdf/\{name}/fields/radiobutton | Add document RadioButton fields.
248250
[**post_sign_document**](PdfApi.md#post_sign_document) | **POST** /pdf/\{name}/sign | Sign document.
@@ -4120,6 +4122,30 @@ Name | Type | Description | Notes
41204122

41214123
[[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)
41224124

4125+
# **get_pdf_in_storage_to_text**
4126+
> file get_pdf_in_storage_to_text(name, folder=folder, storage=storage)
4127+
4128+
Converts PDF document (located on storage) to Text format and returns resulting file in response content
4129+
4130+
### Parameters
4131+
4132+
Name | Type | Description | Notes
4133+
------------- | ------------- | ------------- | -------------
4134+
**name** | **str**| The document name. |
4135+
**folder** | **str**| The document folder. | [optional]
4136+
**storage** | **str**| The document storage. | [optional]
4137+
4138+
### Return type
4139+
4140+
**file**
4141+
4142+
### HTTP request headers
4143+
4144+
- **Content-Type**: application/json
4145+
- **Accept**: multipart/form-data
4146+
4147+
[[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)
4148+
41234149
# **get_pdf_in_storage_to_tiff**
41244150
> file get_pdf_in_storage_to_tiff(name, brightness=brightness, compression=compression, color_depth=color_depth, left_margin=left_margin, right_margin=right_margin, top_margin=top_margin, bottom_margin=bottom_margin, orientation=orientation, skip_blank_pages=skip_blank_pages, width=width, height=height, x_resolution=x_resolution, y_resolution=y_resolution, page_index=page_index, page_count=page_count, folder=folder, storage=storage)
41254151
@@ -6458,6 +6484,32 @@ Name | Type | Description | Notes
64586484

64596485
[[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)
64606486

6487+
# **post_pdf_to_xlsx**
6488+
> file post_pdf_to_xlsx(insert_blank_column_at_first=insert_blank_column_at_first, minimize_the_number_of_worksheets=minimize_the_number_of_worksheets, uniform_worksheets=uniform_worksheets, password=password, file=file)
6489+
6490+
Converts PDF document (in request content) to XLSX format and uploads and returns resulting file in response content.
6491+
6492+
### Parameters
6493+
6494+
Name | Type | Description | Notes
6495+
------------- | ------------- | ------------- | -------------
6496+
**insert_blank_column_at_first** | **bool**| Insert blank column at first | [optional]
6497+
**minimize_the_number_of_worksheets** | **bool**| Minimize the number of worksheets | [optional]
6498+
**uniform_worksheets** | **bool**| Uniform worksheets | [optional]
6499+
**password** | **str**| The password (Base64). | [optional]
6500+
**file** | **file**| A file to be converted. | [optional]
6501+
6502+
### Return type
6503+
6504+
**file**
6505+
6506+
### HTTP request headers
6507+
6508+
- **Content-Type**: multipart/form-data
6509+
- **Accept**: multipart/form-data
6510+
6511+
[[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)
6512+
64616513
# **post_popup_annotation**
64626514
> AsposeResponse post_popup_annotation(name, annotation_id, annotation, storage=storage, folder=folder)
64636515

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
from setuptools import setup, find_packages
3333

3434
NAME = "asposepdfcloud"
35-
VERSION = "24.3.0"
35+
VERSION = "24.4.0"
3636
# To install the library, run the following
3737
#
3838
# python setup.py install

0 commit comments

Comments
 (0)