Skip to content

Commit f462bf3

Browse files
Merge pull request #60 from aspose-pdf-cloud/develop
update to 23.8
2 parents e0c1c8e + 055c003 commit f462bf3

File tree

8 files changed

+236
-28
lines changed

8 files changed

+236
-28
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,16 @@ 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 23.7
34-
- Form Field MappingName property support.
33+
## Enhancements in Version 23.8
34+
- Support to split password protected PDF documents.
35+
- Support to convert password Protected PDF to Xlsx.
36+
- Support to convert password Protected PDF to Excel.
37+
- Replace a single image using multiple Image Ids.
3538
- A new version of Aspose.PDF Cloud was prepared using the latest version of Aspose.PDF for .NET.
3639

37-
## Bugs fixed in Version 23.7
38-
- Adding Radio Button throws Internal Error.
40+
## Bugs fixed in Version 23.8
41+
- The putMergeDocuments API method in Node.js Throws Gateway Error.
42+
- Text Replacement Changes the Background.
3943

4044
## Requirements.
4145
Python 2.7 and 3.4+

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):
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'] = '23.7.0'
86+
self.default_headers['x-aspose-client-version'] = '23.8.0'
8787

8888
self.app_key = app_key
8989
self.app_sid = app_sid

asposepdfcloud/apis/pdf_api.py

Lines changed: 168 additions & 8 deletions
Large diffs are not rendered by default.

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

docs/PdfApi.md

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ Method | HTTP request | Description
336336
[**put_radio_button_field**](PdfApi.md#put_radio_button_field) | **PUT** /pdf/\{name}/fields/radiobutton/\{fieldName} | Replace document RadioButton field
337337
[**put_redaction_annotation**](PdfApi.md#put_redaction_annotation) | **PUT** /pdf/\{name}/annotations/redaction/\{annotationId} | Replace document redaction annotation
338338
[**put_replace_image**](PdfApi.md#put_replace_image) | **PUT** /pdf/\{name}/images/\{imageId} | Replace document image.
339+
[**put_replace_multiple_image**](PdfApi.md#put_replace_multiple_image) | **PUT** /pdf/\{name}/images/replace | Replace document multiple image.
339340
[**put_screen_annotation**](PdfApi.md#put_screen_annotation) | **PUT** /pdf/\{name}/annotations/screen/\{annotationId} | Replace document screen annotation
340341
[**put_screen_annotation_data_extract**](PdfApi.md#put_screen_annotation_data_extract) | **PUT** /pdf/\{name}/annotations/screen/\{annotationId}/data/extract | Extract document screen annotation content to storage
341342
[**put_searchable_document**](PdfApi.md#put_searchable_document) | **PUT** /pdf/\{name}/ocr | Create searchable PDF document. Generate OCR layer for images in input PDF document.
@@ -4142,7 +4143,7 @@ Name | Type | Description | Notes
41424143
[[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)
41434144

41444145
# **get_pdf_in_storage_to_xls**
4145-
> file get_pdf_in_storage_to_xls(name, insert_blank_column_at_first=insert_blank_column_at_first, minimize_the_number_of_worksheets=minimize_the_number_of_worksheets, scale_factor=scale_factor, uniform_worksheets=uniform_worksheets, folder=folder, storage=storage)
4146+
> file get_pdf_in_storage_to_xls(name, insert_blank_column_at_first=insert_blank_column_at_first, minimize_the_number_of_worksheets=minimize_the_number_of_worksheets, scale_factor=scale_factor, uniform_worksheets=uniform_worksheets, folder=folder, storage=storage, password=password)
41464147
41474148
Converts PDF document (located on storage) to XLS format and returns resulting file in response content
41484149

@@ -4157,6 +4158,7 @@ Name | Type | Description | Notes
41574158
**uniform_worksheets** | **bool**| Uniform worksheets | [optional]
41584159
**folder** | **str**| The document folder. | [optional]
41594160
**storage** | **str**| The document storage. | [optional]
4161+
**password** | **str**| The password (Base64). | [optional]
41604162

41614163
### Return type
41624164

@@ -4170,7 +4172,7 @@ Name | Type | Description | Notes
41704172
[[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)
41714173

41724174
# **get_pdf_in_storage_to_xlsx**
4173-
> file get_pdf_in_storage_to_xlsx(name, insert_blank_column_at_first=insert_blank_column_at_first, minimize_the_number_of_worksheets=minimize_the_number_of_worksheets, scale_factor=scale_factor, uniform_worksheets=uniform_worksheets, folder=folder, storage=storage)
4175+
> file get_pdf_in_storage_to_xlsx(name, insert_blank_column_at_first=insert_blank_column_at_first, minimize_the_number_of_worksheets=minimize_the_number_of_worksheets, scale_factor=scale_factor, uniform_worksheets=uniform_worksheets, folder=folder, storage=storage, password=password)
41744176
41754177
Converts PDF document (located on storage) to XLSX format and returns resulting file in response content
41764178

@@ -4185,6 +4187,7 @@ Name | Type | Description | Notes
41854187
**uniform_worksheets** | **bool**| Uniform worksheets | [optional]
41864188
**folder** | **str**| The document folder. | [optional]
41874189
**storage** | **str**| The document storage. | [optional]
4190+
**password** | **str**| The password (Base64). | [optional]
41884191

41894192
### Return type
41904193

@@ -6536,7 +6539,7 @@ Name | Type | Description | Notes
65366539
[[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)
65376540

65386541
# **post_split_document**
6539-
> SplitResultResponse post_split_document(name, format=format, _from=_from, to=to, storage=storage, folder=folder)
6542+
> SplitResultResponse post_split_document(name, format=format, _from=_from, to=to, storage=storage, folder=folder, password=password)
65406543
65416544
Split document to parts.
65426545

@@ -6550,6 +6553,7 @@ Name | Type | Description | Notes
65506553
**to** | **int**| End page if defined. | [optional]
65516554
**storage** | **str**| The document storage. | [optional]
65526555
**folder** | **str**| The document folder. | [optional]
6556+
**password** | **str**| Base64 encoded password. | [optional]
65536557

65546558
### Return type
65556559

@@ -6563,7 +6567,7 @@ Name | Type | Description | Notes
65636567
[[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)
65646568

65656569
# **post_split_range_pdf_document**
6566-
> SplitResultResponse post_split_range_pdf_document(name, options, storage=storage, folder=folder)
6570+
> SplitResultResponse post_split_range_pdf_document(name, options, storage=storage, folder=folder, password=password)
65676571
65686572
Split document into ranges.
65696573

@@ -6575,6 +6579,7 @@ Name | Type | Description | Notes
65756579
**options** | [**SplitRangePdfOptions**](SplitRangePdfOptions.md)| The splitting options. |
65766580
**storage** | **str**| The document storage. | [optional]
65776581
**folder** | **str**| The document folder. | [optional]
6582+
**password** | **str**| Base64 encoded password. | [optional]
65786583

65796584
### Return type
65806585

@@ -8266,7 +8271,7 @@ Name | Type | Description | Notes
82668271
[[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)
82678272

82688273
# **put_pdf_in_request_to_xls**
8269-
> AsposeResponse put_pdf_in_request_to_xls(out_path, insert_blank_column_at_first=insert_blank_column_at_first, minimize_the_number_of_worksheets=minimize_the_number_of_worksheets, scale_factor=scale_factor, uniform_worksheets=uniform_worksheets, storage=storage, file=file)
8274+
> AsposeResponse put_pdf_in_request_to_xls(out_path, insert_blank_column_at_first=insert_blank_column_at_first, minimize_the_number_of_worksheets=minimize_the_number_of_worksheets, scale_factor=scale_factor, uniform_worksheets=uniform_worksheets, storage=storage, password=password, file=file)
82708275
82718276
Converts PDF document (in request content) to XLS format and uploads resulting file to storage.
82728277

@@ -8280,6 +8285,7 @@ Name | Type | Description | Notes
82808285
**scale_factor** | **float**| Scale factor (Obsolete) | [optional]
82818286
**uniform_worksheets** | **bool**| Uniform worksheets | [optional]
82828287
**storage** | **str**| The document storage. | [optional]
8288+
**password** | **str**| The password (Base64). | [optional]
82838289
**file** | **file**| A file to be converted. | [optional]
82848290

82858291
### Return type
@@ -8294,7 +8300,7 @@ Name | Type | Description | Notes
82948300
[[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)
82958301

82968302
# **put_pdf_in_request_to_xlsx**
8297-
> AsposeResponse put_pdf_in_request_to_xlsx(out_path, insert_blank_column_at_first=insert_blank_column_at_first, minimize_the_number_of_worksheets=minimize_the_number_of_worksheets, scale_factor=scale_factor, uniform_worksheets=uniform_worksheets, storage=storage, file=file)
8303+
> AsposeResponse put_pdf_in_request_to_xlsx(out_path, insert_blank_column_at_first=insert_blank_column_at_first, minimize_the_number_of_worksheets=minimize_the_number_of_worksheets, scale_factor=scale_factor, uniform_worksheets=uniform_worksheets, storage=storage, password=password, file=file)
82988304
82998305
Converts PDF document (in request content) to XLSX format and uploads resulting file to storage.
83008306

@@ -8308,6 +8314,7 @@ Name | Type | Description | Notes
83088314
**scale_factor** | **float**| Scale factor (Obsolete) | [optional]
83098315
**uniform_worksheets** | **bool**| Uniform worksheets | [optional]
83108316
**storage** | **str**| The document storage. | [optional]
8317+
**password** | **str**| The password (Base64). | [optional]
83118318
**file** | **file**| A file to be converted. | [optional]
83128319

83138320
### Return type
@@ -8654,7 +8661,7 @@ Name | Type | Description | Notes
86548661
[[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)
86558662

86568663
# **put_pdf_in_storage_to_xls**
8657-
> AsposeResponse put_pdf_in_storage_to_xls(name, out_path, insert_blank_column_at_first=insert_blank_column_at_first, minimize_the_number_of_worksheets=minimize_the_number_of_worksheets, scale_factor=scale_factor, uniform_worksheets=uniform_worksheets, folder=folder, storage=storage)
8664+
> AsposeResponse put_pdf_in_storage_to_xls(name, out_path, insert_blank_column_at_first=insert_blank_column_at_first, minimize_the_number_of_worksheets=minimize_the_number_of_worksheets, scale_factor=scale_factor, uniform_worksheets=uniform_worksheets, folder=folder, storage=storage, password=password)
86588665
86598666
Converts PDF document (located on storage) to XLS format and uploads resulting file to storage
86608667

@@ -8670,6 +8677,7 @@ Name | Type | Description | Notes
86708677
**uniform_worksheets** | **bool**| Uniform worksheets | [optional]
86718678
**folder** | **str**| The document folder. | [optional]
86728679
**storage** | **str**| The document storage. | [optional]
8680+
**password** | **str**| The password (Base64). | [optional]
86738681

86748682
### Return type
86758683

@@ -8683,7 +8691,7 @@ Name | Type | Description | Notes
86838691
[[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)
86848692

86858693
# **put_pdf_in_storage_to_xlsx**
8686-
> AsposeResponse put_pdf_in_storage_to_xlsx(name, out_path, insert_blank_column_at_first=insert_blank_column_at_first, minimize_the_number_of_worksheets=minimize_the_number_of_worksheets, scale_factor=scale_factor, uniform_worksheets=uniform_worksheets, folder=folder, storage=storage)
8694+
> AsposeResponse put_pdf_in_storage_to_xlsx(name, out_path, insert_blank_column_at_first=insert_blank_column_at_first, minimize_the_number_of_worksheets=minimize_the_number_of_worksheets, scale_factor=scale_factor, uniform_worksheets=uniform_worksheets, folder=folder, storage=storage, password=password)
86878695
86888696
Converts PDF document (located on storage) to XLSX format and uploads resulting file to storage
86898697

@@ -8699,6 +8707,7 @@ Name | Type | Description | Notes
86998707
**uniform_worksheets** | **bool**| Uniform worksheets | [optional]
87008708
**folder** | **str**| The document folder. | [optional]
87018709
**storage** | **str**| The document storage. | [optional]
8710+
**password** | **str**| The password (Base64). | [optional]
87028711

87038712
### Return type
87048713

@@ -8969,6 +8978,33 @@ Name | Type | Description | Notes
89698978

89708979
[[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)
89718980

8981+
# **put_replace_multiple_image**
8982+
> ImagesResponse put_replace_multiple_image(name, image_ids, image_file_path=image_file_path, storage=storage, folder=folder, image=image)
8983+
8984+
Replace document multiple image.
8985+
8986+
### Parameters
8987+
8988+
Name | Type | Description | Notes
8989+
------------- | ------------- | ------------- | -------------
8990+
**name** | **str**| The document name. |
8991+
**image_ids** | **list[str]**| The image IDs. |
8992+
**image_file_path** | **str**| Path to image file if specified. Request content is used otherwise. | [optional]
8993+
**storage** | **str**| The document storage. | [optional]
8994+
**folder** | **str**| The document folder. | [optional]
8995+
**image** | **file**| Image file. | [optional]
8996+
8997+
### Return type
8998+
8999+
[**ImagesResponse**](ImagesResponse.md)
9000+
9001+
### HTTP request headers
9002+
9003+
- **Content-Type**: multipart/form-data
9004+
- **Accept**: application/json
9005+
9006+
[[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)
9007+
89729008
# **put_screen_annotation**
89739009
> ScreenAnnotationResponse put_screen_annotation(name, annotation_id, annotation, storage=storage, folder=folder)
89749010

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 = "23.7.0"
35+
VERSION = "23.8.0"
3636
# To install the library, run the following
3737
#
3838
# python setup.py install

test/pdf_tests.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3999,30 +3999,38 @@ def testGetImages(self):
39993999
response = self.pdf_api.get_images(file_name, page_number, **opts)
40004000
self.assertEqual(response.code, 200)
40014001

4002-
40034002
def testPutReplaceImage(self):
40044003
file_name = 'PdfWithImages2.pdf'
40054004
self.uploadFile(file_name)
4006-
40074005
image_file_name = 'Koala.jpg'
40084006
self.uploadFile(image_file_name)
4009-
40104007
opts = {
40114008
"folder" : self.temp_folder
40124009
}
40134010
page_number = 1
40144011
responseImages = self.pdf_api.get_images(file_name, page_number, **opts)
40154012
self.assertEqual(responseImages.code, 200)
40164013
image_id = responseImages.images.list[0].id
4017-
40184014
opts = {
40194015
"image_file_path" : self.temp_folder + '/' + image_file_name,
40204016
"folder" : self.temp_folder
40214017
}
4022-
40234018
response = self.pdf_api.put_replace_image(file_name, image_id, **opts)
40244019
self.assertEqual(response.code, 200)
40254020

4021+
def testPutReplaceMultipleImage(self):
4022+
file_name = 'PdfWithImages.pdf'
4023+
self.uploadFile(file_name)
4024+
image_file_name = 'butterfly.jpg'
4025+
self.uploadFile(image_file_name)
4026+
image_ids = ['GE5TENJVGQZTWMJYGQWDINRUFQ2DCMRMGY4TC', 'GE5TIMJSGY3TWMJXG4WDIMBZFQ2DCOJMGQ3DK']
4027+
opts = {
4028+
"image_file_path" : self.temp_folder + '/' + image_file_name,
4029+
"folder" : self.temp_folder
4030+
}
4031+
response = self.pdf_api.put_replace_multiple_image(file_name, image_ids, **opts)
4032+
self.assertEqual(response.code, 200)
4033+
40264034
def testPostInsertImage(self):
40274035
file_name = 'PdfWithImages2.pdf'
40284036
self.uploadFile(file_name)

test_data/PdfWithImages.pdf

1.55 MB
Binary file not shown.

0 commit comments

Comments
 (0)