diff --git a/README.md b/README.md index 06fadfc..167eb22 100644 --- a/README.md +++ b/README.md @@ -30,13 +30,11 @@ XLS, XLSX, PPTX, DOC, DOCX, MobiXML, JPEG, EMF, PNG, BMP, GIF, TIFF, Text ## Read PDF Formats MHT, PCL, PS, XSLFO, MD -## Enhancements in Version 24.7 +## Enhancements in Version 24.8 +- Adding Text stamps to multiple pages. +- Adding Image stamps to multiple pages. - A new version of Aspose.PDF Cloud was prepared using the latest version of Aspose.PDF for .NET. -## Bugs fixed in Version 24.7 -- PutPsInStorageToPdf throws: Cannot find resource ‘Aspose.PDF.dependencies.ZapfDingbats.ttf. -- Ocr method is not working. - ## Requirements. Python 2.7 and 3.4+ diff --git a/asposepdfcloud/api_client.py b/asposepdfcloud/api_client.py index 1fcfcbf..a2da867 100644 --- a/asposepdfcloud/api_client.py +++ b/asposepdfcloud/api_client.py @@ -83,7 +83,7 @@ def __init__(self, app_key, app_sid, host=None, self_host=False): self.rest_client = RESTClientObject() self.default_headers = {} self.default_headers['x-aspose-client'] = 'python sdk' - self.default_headers['x-aspose-client-version'] = '24.7.0' + self.default_headers['x-aspose-client-version'] = '24.8.0' self.self_host = self_host self.app_key = app_key @@ -250,14 +250,35 @@ def __request_token(self): tokenUrl = self.host.replace("/v3.0", "") + resource_path print("tokenUrl: " + tokenUrl) - # perform request and return response - response_data = self.request(method, tokenUrl, - headers=header_params, - post_params=post_params) + try: + # perform request and return response + response_data = self.request(method, tokenUrl, + headers=header_params, + post_params=post_params) + if isinstance(response_data.data, bytes): + responseJson = str(response_data.data, 'UTF-8') + else: + responseJson = str(response_data.data) + except Exception as ex: + if (hasattr(ex, 'body')): + if isinstance(ex.body, bytes): + responseJson = str(ex.body, 'UTF-8') + else: + responseJson = str(response_data.data) + else: + raise ApiException(ex) - data = json.loads(str(response_data.data)) - config.access_token = data['access_token'] + try: + data = json.loads(responseJson) + except json.JSONDecodeError as ex: + if responseJson.strip(): + raise ApiException(reason=responseJson) + else: + raise ApiException(reason="empty token ({0})".format(responseJson)) + if 'access_token' not in data or not data['access_token'] or data['access_token'].strip() == "": + raise ApiException(reason="empty token ({0})".format(responseJson)) + config.access_token = data['access_token'] def __add_o_auth_token(self, header_params): config = Configuration() diff --git a/asposepdfcloud/apis/pdf_api.py b/asposepdfcloud/apis/pdf_api.py index 1552422..3f8f6e7 100644 --- a/asposepdfcloud/apis/pdf_api.py +++ b/asposepdfcloud/apis/pdf_api.py @@ -23783,6 +23783,129 @@ def post_document_image_header_with_http_info(self, name, image_header, **kwargs _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def post_document_image_stamps(self, name, stamps, **kwargs): + """ + Add document pages image stamps. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please define a `callback` function + to be invoked when receiving the response. + >>> def callback_function(response): + >>> pprint(response) + >>> + >>> thread = api.post_document_image_stamps(name, stamps, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str name: The document name. (required) + :param list[ImageStamp] stamps: The array of stamp. (required) + :param str storage: The document storage. + :param str folder: The document folder. + :param str password: Base64 encoded password. + :return: AsposeResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('callback'): + return self.post_document_image_stamps_with_http_info(name, stamps, **kwargs) + else: + (data) = self.post_document_image_stamps_with_http_info(name, stamps, **kwargs) + return data + + def post_document_image_stamps_with_http_info(self, name, stamps, **kwargs): + """ + Add document pages image stamps. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please define a `callback` function + to be invoked when receiving the response. + >>> def callback_function(response): + >>> pprint(response) + >>> + >>> thread = api.post_document_image_stamps_with_http_info(name, stamps, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str name: The document name. (required) + :param list[ImageStamp] stamps: The array of stamp. (required) + :param str storage: The document storage. + :param str folder: The document folder. + :param str password: Base64 encoded password. + :return: AsposeResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['name', 'stamps', 'storage', 'folder', 'password'] + all_params.append('callback') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method post_document_image_stamps" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'name' is set + if ('name' not in params) or (params['name'] is None): + raise ValueError("Missing the required parameter `name` when calling `post_document_image_stamps`") + # verify the required parameter 'stamps' is set + if ('stamps' not in params) or (params['stamps'] is None): + raise ValueError("Missing the required parameter `stamps` when calling `post_document_image_stamps`") + + + collection_formats = {} + + path_params = {} + if 'name' in params: + path_params['name'] = params['name'] + + query_params = [] + if 'storage' in params: + query_params.append(('storage', params['storage'])) + if 'folder' in params: + query_params.append(('folder', params['folder'])) + if 'password' in params: + query_params.append(('password', params['password'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'stamps' in params: + body_params = params['stamps'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.\ + select_header_content_type(['application/json']) + + # Authentication setting + auth_settings = ['JWT'] + + return self.api_client.call_api('/pdf/{name}/stamps/image', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AsposeResponse', + auth_settings=auth_settings, + callback=params.get('callback'), + _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 post_document_page_number_stamps(self, name, stamp, **kwargs): """ Add document page number stamps. @@ -24287,6 +24410,129 @@ def post_document_text_replace_with_http_info(self, name, text_replace, **kwargs _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def post_document_text_stamps(self, name, stamps, **kwargs): + """ + Add document pages text stamps. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please define a `callback` function + to be invoked when receiving the response. + >>> def callback_function(response): + >>> pprint(response) + >>> + >>> thread = api.post_document_text_stamps(name, stamps, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str name: The document name. (required) + :param list[TextStamp] stamps: The array of stamp. (required) + :param str storage: The document storage. + :param str folder: The document folder. + :param str password: Base64 encoded password. + :return: AsposeResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('callback'): + return self.post_document_text_stamps_with_http_info(name, stamps, **kwargs) + else: + (data) = self.post_document_text_stamps_with_http_info(name, stamps, **kwargs) + return data + + def post_document_text_stamps_with_http_info(self, name, stamps, **kwargs): + """ + Add document pages text stamps. + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please define a `callback` function + to be invoked when receiving the response. + >>> def callback_function(response): + >>> pprint(response) + >>> + >>> thread = api.post_document_text_stamps_with_http_info(name, stamps, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str name: The document name. (required) + :param list[TextStamp] stamps: The array of stamp. (required) + :param str storage: The document storage. + :param str folder: The document folder. + :param str password: Base64 encoded password. + :return: AsposeResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['name', 'stamps', 'storage', 'folder', 'password'] + all_params.append('callback') + all_params.append('_return_http_data_only') + all_params.append('_preload_content') + all_params.append('_request_timeout') + + params = locals() + for key, val in iteritems(params['kwargs']): + if key not in all_params: + raise TypeError( + "Got an unexpected keyword argument '%s'" + " to method post_document_text_stamps" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'name' is set + if ('name' not in params) or (params['name'] is None): + raise ValueError("Missing the required parameter `name` when calling `post_document_text_stamps`") + # verify the required parameter 'stamps' is set + if ('stamps' not in params) or (params['stamps'] is None): + raise ValueError("Missing the required parameter `stamps` when calling `post_document_text_stamps`") + + + collection_formats = {} + + path_params = {} + if 'name' in params: + path_params['name'] = params['name'] + + query_params = [] + if 'storage' in params: + query_params.append(('storage', params['storage'])) + if 'folder' in params: + query_params.append(('folder', params['folder'])) + if 'password' in params: + query_params.append(('password', params['password'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'stamps' in params: + body_params = params['stamps'] + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['application/json']) + + # HTTP header `Content-Type` + header_params['Content-Type'] = self.api_client.\ + select_header_content_type(['application/json']) + + # Authentication setting + auth_settings = ['JWT'] + + return self.api_client.call_api('/pdf/{name}/stamps/text', 'POST', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='AsposeResponse', + auth_settings=auth_settings, + callback=params.get('callback'), + _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 post_encrypt_document_in_storage(self, name, user_password, owner_password, crypto_algorithm, **kwargs): """ Encrypt document in storage. diff --git a/asposepdfcloud/configuration.py b/asposepdfcloud/configuration.py index 43438aa..6969c38 100644 --- a/asposepdfcloud/configuration.py +++ b/asposepdfcloud/configuration.py @@ -199,5 +199,5 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 3.0\n"\ - "SDK Package Version: 24.7.0".\ + "SDK Package Version: 24.8.0".\ format(env=sys.platform, pyversion=sys.version) diff --git a/asposepdfcloud/models/optimize_options.py b/asposepdfcloud/models/optimize_options.py index e507377..8901a6c 100644 --- a/asposepdfcloud/models/optimize_options.py +++ b/asposepdfcloud/models/optimize_options.py @@ -157,7 +157,7 @@ def password(self, password): def allow_reuse_page_content(self): """ Gets the allow_reuse_page_content of this OptimizeOptions. - If true page contents will be reused when document is optimized for equal pages. + If true page contents will be reused when document is optimized for equal pages. LinkDuplcateStreams option must be set to true. :return: The allow_reuse_page_content of this OptimizeOptions. :rtype: bool @@ -168,7 +168,7 @@ def allow_reuse_page_content(self): def allow_reuse_page_content(self, allow_reuse_page_content): """ Sets the allow_reuse_page_content of this OptimizeOptions. - If true page contents will be reused when document is optimized for equal pages. + If true page contents will be reused when document is optimized for equal pages. LinkDuplcateStreams option must be set to true. :param allow_reuse_page_content: The allow_reuse_page_content of this OptimizeOptions. :type: bool @@ -295,7 +295,7 @@ def remove_unused_streams(self, remove_unused_streams): def unembed_fonts(self): """ Gets the unembed_fonts of this OptimizeOptions. - Make fonts not embedded if set to true. + Make fonts not embedded if set to true. Unembedding a font means removing the embedded byte stream data of the font included in a PDF document. :return: The unembed_fonts of this OptimizeOptions. :rtype: bool @@ -306,7 +306,7 @@ def unembed_fonts(self): def unembed_fonts(self, unembed_fonts): """ Sets the unembed_fonts of this OptimizeOptions. - Make fonts not embedded if set to true. + Make fonts not embedded if set to true. Unembedding a font means removing the embedded byte stream data of the font included in a PDF document. :param unembed_fonts: The unembed_fonts of this OptimizeOptions. :type: bool @@ -364,7 +364,7 @@ def max_resolution(self, max_resolution): def subset_fonts(self): """ Gets the subset_fonts of this OptimizeOptions. - Fonts will be converted into subsets if set to true. + Fonts will be converted into subsets if set to true. Only those characters that are actually used in the layout are stored in the PDF. :return: The subset_fonts of this OptimizeOptions. :rtype: bool @@ -375,7 +375,7 @@ def subset_fonts(self): def subset_fonts(self, subset_fonts): """ Sets the subset_fonts of this OptimizeOptions. - Fonts will be converted into subsets if set to true. + Fonts will be converted into subsets if set to true. Only those characters that are actually used in the layout are stored in the PDF. :param subset_fonts: The subset_fonts of this OptimizeOptions. :type: bool diff --git a/docs/OptimizeOptions.md b/docs/OptimizeOptions.md index 22b7b01..5db7ecf 100644 --- a/docs/OptimizeOptions.md +++ b/docs/OptimizeOptions.md @@ -5,16 +5,16 @@ Represents Pdf optimize options. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **password** | **str** | Specifies document password (if any) encoded with base-64. | [optional] -**allow_reuse_page_content** | **bool** | If true page contents will be reused when document is optimized for equal pages. | [optional] +**allow_reuse_page_content** | **bool** | If true page contents will be reused when document is optimized for equal pages. LinkDuplcateStreams option must be set to true. | [optional] **compress_images** | **bool** | If this flag is set to true images will be compressed in the document. Compression level is specified with ImageQuality property. | [optional] **image_quality** | **int** | Specifies level of image compression when CompressImages flag is used. | [optional] **link_duplcate_streams** | **bool** | If this flag is set to true, Resource streams will be analyzed. If duplicate streams are found (i.e. if stream contents is equal), then thees streams will be stored as one object. This allows to decrease document size in some cases (for example, when same document was concatenated multiple times). | [optional] **remove_unused_objects** | **bool** | If this flag is set to true, all document objects will be checked and unused objects (i.e. objects which does not have any reference) are removed from document. | [optional] **remove_unused_streams** | **bool** | If this flag set to true, every resource is checked on it's usage. If resource is never used, then resources is removed. This may decrease document size for example when pages were extracted from document. | [optional] -**unembed_fonts** | **bool** | Make fonts not embedded if set to true. | [optional] +**unembed_fonts** | **bool** | Make fonts not embedded if set to true. Unembedding a font means removing the embedded byte stream data of the font included in a PDF document. | [optional] **resize_images** | **bool** | If this flag set to true and CompressImages is true images will be resized if image resolution is greater then specified MaxResolution parameter. | [optional] **max_resolution** | **int** | Specifies maximum resolution of images. If image has higher resolution it will be scaled. | [optional] -**subset_fonts** | **bool** | Fonts will be converted into subsets if set to true. | [optional] +**subset_fonts** | **bool** | Fonts will be converted into subsets if set to true. Only those characters that are actually used in the layout are stored in the PDF. | [optional] **remove_private_info** | **bool** | Remove private information (page piece info). | [optional] **image_encoding** | [**ImageEncoding**](ImageEncoding.md) | Image encode which will be used. | [optional] **image_compression_version** | [**ImageCompressionVersion**](ImageCompressionVersion.md) | Version of compression algorithm. Possible values are: "Standard" - standard compression, "Fast" - fast (improved compression which is faster then standard but may be applicable not for all images), "Mixed" - mixed (standard compression is applied to images which can not be compressed by faster algorithm, this may give best compression but more slow then "Fast" algorithm. Version "Fast" is not applicable for resizing images (standard method will be used). Default is "Standard". | [optional] diff --git a/docs/PdfApi.md b/docs/PdfApi.md index 81fa2bc..926c8f6 100644 --- a/docs/PdfApi.md +++ b/docs/PdfApi.md @@ -203,10 +203,12 @@ Method | HTTP request | Description [**post_decrypt_document_in_storage**](PdfApi.md#post_decrypt_document_in_storage) | **POST** /pdf/\{name}/decrypt | Decrypt document in storage. [**post_document_image_footer**](PdfApi.md#post_document_image_footer) | **POST** /pdf/\{name}/footer/image | Add document image footer. [**post_document_image_header**](PdfApi.md#post_document_image_header) | **POST** /pdf/\{name}/header/image | Add document image header. +[**post_document_image_stamps**](PdfApi.md#post_document_image_stamps) | **POST** /pdf/\{name}/stamps/image | Add document pages image stamps. [**post_document_page_number_stamps**](PdfApi.md#post_document_page_number_stamps) | **POST** /pdf/\{name}/stamps/pagenumber | Add document page number stamps. [**post_document_text_footer**](PdfApi.md#post_document_text_footer) | **POST** /pdf/\{name}/footer/text | Add document text footer. [**post_document_text_header**](PdfApi.md#post_document_text_header) | **POST** /pdf/\{name}/header/text | Add document text header. [**post_document_text_replace**](PdfApi.md#post_document_text_replace) | **POST** /pdf/\{name}/text/replace | Document's replace text method. +[**post_document_text_stamps**](PdfApi.md#post_document_text_stamps) | **POST** /pdf/\{name}/stamps/text | Add document pages text stamps. [**post_encrypt_document_in_storage**](PdfApi.md#post_encrypt_document_in_storage) | **POST** /pdf/\{name}/encrypt | Encrypt document in storage. [**post_flatten_document**](PdfApi.md#post_flatten_document) | **POST** /pdf/\{name}/flatten | Flatten the document. [**post_html_to_pdf**](PdfApi.md#post_html_to_pdf) | **POST** /pdf/create/html | Convert HTML file (zip archive in request content) to PDF format and return resulting file in response. @@ -5409,6 +5411,32 @@ 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) +# **post_document_image_stamps** +> AsposeResponse post_document_image_stamps(name, stamps, storage=storage, folder=folder, password=password) + +Add document pages image stamps. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The document name. | + **stamps** | [**list[ImageStamp]**](ImageStamp.md)| The array of stamp. | + **storage** | **str**| The document storage. | [optional] + **folder** | **str**| The document folder. | [optional] + **password** | **str**| Base64 encoded password. | [optional] + +### Return type + +[**AsposeResponse**](AsposeResponse.md) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + # **post_document_page_number_stamps** > AsposeResponse post_document_page_number_stamps(name, stamp, start_page_number=start_page_number, end_page_number=end_page_number, storage=storage, folder=folder, password=password) @@ -5516,6 +5544,32 @@ 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) +# **post_document_text_stamps** +> AsposeResponse post_document_text_stamps(name, stamps, storage=storage, folder=folder, password=password) + +Add document pages text stamps. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The document name. | + **stamps** | [**list[TextStamp]**](TextStamp.md)| The array of stamp. | + **storage** | **str**| The document storage. | [optional] + **folder** | **str**| The document folder. | [optional] + **password** | **str**| Base64 encoded password. | [optional] + +### Return type + +[**AsposeResponse**](AsposeResponse.md) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[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) + # **post_encrypt_document_in_storage** > AsposeResponse post_encrypt_document_in_storage(name, user_password, owner_password, crypto_algorithm, permissions_flags=permissions_flags, use_pdf20=use_pdf20, storage=storage, folder=folder) diff --git a/setup.py b/setup.py index ce4a9b2..85c7f6a 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ from setuptools import setup, find_packages NAME = "asposepdfcloud" -VERSION = "24.7.0" +VERSION = "24.8.0" # To install the library, run the following # # python setup.py install diff --git a/test/pdf_test.py b/test/pdf_test.py index aba5ae3..0988312 100644 --- a/test/pdf_test.py +++ b/test/pdf_test.py @@ -290,6 +290,33 @@ def testPostPageTextStamps(self): response = self.pdf_api.post_page_text_stamps(file_name, page_number, [stamp], folder=self.temp_folder) self.assertEqual(response.code, 200) + def testPostDocumentTextStamps(self): + file_name = 'PageNumberStamp.pdf' + self.uploadFile(file_name) + + text_state = asposepdfcloud.models.TextState(font_size=14, font_style=asposepdfcloud.models.FontStyles.REGULAR, font='Arial') + + stamp = asposepdfcloud.models.TextStamp() + stamp.background = True + stamp.left_margin = 1 + stamp.right_margin = 2 + stamp.top_margin = 3 + stamp.bottom_margin = 4 + stamp.horizontal_alignment = asposepdfcloud.models.HorizontalAlignment.CENTER + stamp.vertical_alignment = asposepdfcloud.models.VerticalAlignment.CENTER + stamp.opacity = 1 + stamp.rotate = asposepdfcloud.models.Rotation.NONE + stamp.rotate_angle = 0 + stamp.x_indent = 0 + stamp.y_indent = 0 + stamp.zoom = 1 + stamp.text_alignment = asposepdfcloud.models.HorizontalAlignment.CENTER + stamp.value = 'Text Stamp' + stamp.text_state = text_state + + response = self.pdf_api.post_document_text_stamps(file_name, [stamp], folder=self.temp_folder) + self.assertEqual(response.code, 200) + def testPostPageImageStamps(self): file_name = 'PageNumberStamp.pdf' self.uploadFile(file_name) @@ -318,6 +345,32 @@ def testPostPageImageStamps(self): response = self.pdf_api.post_page_image_stamps(file_name, page_number, [stamp], folder=self.temp_folder) self.assertEqual(response.code, 200) + def testPostDocumentImageStamps(self): + file_name = 'PageNumberStamp.pdf' + self.uploadFile(file_name) + + image = 'Koala.jpg' + self.uploadFile(image) + + stamp = asposepdfcloud.models.ImageStamp() + stamp.background = True + stamp.left_margin = 1 + stamp.right_margin = 2 + stamp.top_margin = 3 + stamp.bottom_margin = 4 + stamp.horizontal_alignment = asposepdfcloud.models.HorizontalAlignment.CENTER + stamp.vertical_alignment = asposepdfcloud.models.VerticalAlignment.CENTER + stamp.opacity = 1 + stamp.rotate = asposepdfcloud.models.Rotation.NONE + stamp.rotate_angle = 0 + stamp.x_indent = 0 + stamp.y_indent = 0 + stamp.zoom = 1 + stamp.file_name = self.temp_folder + '/' + image + + response = self.pdf_api.post_document_image_stamps(file_name, [stamp], folder=self.temp_folder) + self.assertEqual(response.code, 200) + def testPostPagePdfPageStamps(self): file_name = 'PageNumberStamp.pdf' self.uploadFile(file_name)