diff --git a/README.md b/README.md index ea6bd1a..c6e6408 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Aspose.PDF Cloud - API version: 3.0 -- Package version: 19.7.0 +- Package version: 19.8.0 [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. @@ -146,6 +146,7 @@ Class | Method | HTTP request | Description *PdfApi* | [**get_document_property**](docs/PdfApi.md#get_document_property) | **GET** /pdf/\{name}/documentproperties/\{propertyName} | Read document property by name. *PdfApi* | [**get_document_redaction_annotations**](docs/PdfApi.md#get_document_redaction_annotations) | **GET** /pdf/\{name}/annotations/redaction | Read document redaction annotations. *PdfApi* | [**get_document_screen_annotations**](docs/PdfApi.md#get_document_screen_annotations) | **GET** /pdf/\{name}/annotations/screen | Read document screen annotations. +*PdfApi* | [**get_document_signature_fields**](docs/PdfApi.md#get_document_signature_fields) | **GET** /pdf/\{name}/fields/signature | Read document signature fields. *PdfApi* | [**get_document_sound_annotations**](docs/PdfApi.md#get_document_sound_annotations) | **GET** /pdf/\{name}/annotations/sound | Read document sound annotations. *PdfApi* | [**get_document_square_annotations**](docs/PdfApi.md#get_document_square_annotations) | **GET** /pdf/\{name}/annotations/square | Read document square annotations. *PdfApi* | [**get_document_squiggly_annotations**](docs/PdfApi.md#get_document_squiggly_annotations) | **GET** /pdf/\{name}/annotations/squiggly | Read document squiggly annotations. @@ -182,6 +183,7 @@ Class | Method | HTTP request | Description *PdfApi* | [**get_la_te_x_in_storage_to_pdf**](docs/PdfApi.md#get_la_te_x_in_storage_to_pdf) | **GET** /pdf/create/latex | Convert LaTeX file (located on storage) to PDF format and return resulting file in response. *PdfApi* | [**get_line_annotation**](docs/PdfApi.md#get_line_annotation) | **GET** /pdf/\{name}/annotations/line/\{annotationId} | Read document page line annotation by ID. *PdfApi* | [**get_link_annotation**](docs/PdfApi.md#get_link_annotation) | **GET** /pdf/\{name}/links/\{linkId} | Read document link annotation by ID. +*PdfApi* | [**get_markdown_in_storage_to_pdf**](docs/PdfApi.md#get_markdown_in_storage_to_pdf) | **GET** /pdf/create/markdown | Convert MD file (located on storage) to PDF format and return resulting file in response. *PdfApi* | [**get_mht_in_storage_to_pdf**](docs/PdfApi.md#get_mht_in_storage_to_pdf) | **GET** /pdf/create/mht | Convert MHT file (located on storage) to PDF format and return resulting file in response. *PdfApi* | [**get_movie_annotation**](docs/PdfApi.md#get_movie_annotation) | **GET** /pdf/\{name}/annotations/movie/\{annotationId} | Read document page movie annotation by ID. *PdfApi* | [**get_page**](docs/PdfApi.md#get_page) | **GET** /pdf/\{name}/pages/\{pageNumber} | Read document page info. @@ -207,6 +209,7 @@ Class | Method | HTTP request | Description *PdfApi* | [**get_page_popup_annotations**](docs/PdfApi.md#get_page_popup_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/popup | Read document page popup annotations. *PdfApi* | [**get_page_redaction_annotations**](docs/PdfApi.md#get_page_redaction_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/redaction | Read document page redaction annotations. *PdfApi* | [**get_page_screen_annotations**](docs/PdfApi.md#get_page_screen_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/screen | Read document page screen annotations. +*PdfApi* | [**get_page_signature_fields**](docs/PdfApi.md#get_page_signature_fields) | **GET** /pdf/\{name}/page/\{pageNumber}/fields/signature | Read document page signature fields. *PdfApi* | [**get_page_sound_annotations**](docs/PdfApi.md#get_page_sound_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/sound | Read document page sound annotations. *PdfApi* | [**get_page_square_annotations**](docs/PdfApi.md#get_page_square_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/square | Read document page square annotations. *PdfApi* | [**get_page_squiggly_annotations**](docs/PdfApi.md#get_page_squiggly_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/squiggly | Read document page squiggly annotations. @@ -239,6 +242,7 @@ Class | Method | HTTP request | Description *PdfApi* | [**get_redaction_annotation**](docs/PdfApi.md#get_redaction_annotation) | **GET** /pdf/\{name}/annotations/redaction/\{annotationId} | Read document page redaction annotation by ID. *PdfApi* | [**get_screen_annotation**](docs/PdfApi.md#get_screen_annotation) | **GET** /pdf/\{name}/annotations/screen/\{annotationId} | Read document page screen annotation by ID. *PdfApi* | [**get_screen_annotation_data**](docs/PdfApi.md#get_screen_annotation_data) | **GET** /pdf/\{name}/annotations/screen/\{annotationId}/data | Read document page screen annotation by ID. +*PdfApi* | [**get_signature_field**](docs/PdfApi.md#get_signature_field) | **GET** /pdf/\{name}/fields/signature/\{fieldName} | Read document signature field by name. *PdfApi* | [**get_sound_annotation**](docs/PdfApi.md#get_sound_annotation) | **GET** /pdf/\{name}/annotations/sound/\{annotationId} | Read document page sound annotation by ID. *PdfApi* | [**get_sound_annotation_data**](docs/PdfApi.md#get_sound_annotation_data) | **GET** /pdf/\{name}/annotations/sound/\{annotationId}/data | Read document page sound annotation by ID. *PdfApi* | [**get_square_annotation**](docs/PdfApi.md#get_square_annotation) | **GET** /pdf/\{name}/annotations/square/\{annotationId} | Read document page square annotation by ID. @@ -281,6 +285,7 @@ Class | Method | HTTP request | Description *PdfApi* | [**post_move_page**](docs/PdfApi.md#post_move_page) | **POST** /pdf/\{name}/pages/\{pageNumber}/movePage | Move page to new position. *PdfApi* | [**post_optimize_document**](docs/PdfApi.md#post_optimize_document) | **POST** /pdf/\{name}/optimize | Optimize document. *PdfApi* | [**post_page_caret_annotations**](docs/PdfApi.md#post_page_caret_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/caret | Add document page caret annotations. +*PdfApi* | [**post_page_certify**](docs/PdfApi.md#post_page_certify) | **POST** /pdf/\{name}/pages/\{pageNumber}/certify | Certify document page. *PdfApi* | [**post_page_circle_annotations**](docs/PdfApi.md#post_page_circle_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/circle | Add document page circle annotations. *PdfApi* | [**post_page_file_attachment_annotations**](docs/PdfApi.md#post_page_file_attachment_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/fileattachment | Add document page FileAttachment annotations. *PdfApi* | [**post_page_free_text_annotations**](docs/PdfApi.md#post_page_free_text_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/freetext | Add document page free text annotations. @@ -345,6 +350,7 @@ Class | Method | HTTP request | Description *PdfApi* | [**put_la_te_x_in_storage_to_pdf**](docs/PdfApi.md#put_la_te_x_in_storage_to_pdf) | **PUT** /pdf/\{name}/create/latex | Convert LaTeX file (located on storage) to PDF format and upload resulting file to storage. *PdfApi* | [**put_line_annotation**](docs/PdfApi.md#put_line_annotation) | **PUT** /pdf/\{name}/annotations/line/\{annotationId} | Replace document line annotation *PdfApi* | [**put_link_annotation**](docs/PdfApi.md#put_link_annotation) | **PUT** /pdf/\{name}/links/\{linkId} | Replace document page link annotations +*PdfApi* | [**put_markdown_in_storage_to_pdf**](docs/PdfApi.md#put_markdown_in_storage_to_pdf) | **PUT** /pdf/\{name}/create/markdown | Convert MD file (located on storage) to PDF format and upload resulting file to storage. *PdfApi* | [**put_merge_documents**](docs/PdfApi.md#put_merge_documents) | **PUT** /pdf/\{name}/merge | Merge a list of documents. *PdfApi* | [**put_mht_in_storage_to_pdf**](docs/PdfApi.md#put_mht_in_storage_to_pdf) | **PUT** /pdf/\{name}/create/mht | Convert MHT file (located on storage) to PDF format and upload resulting file to storage. *PdfApi* | [**put_movie_annotation**](docs/PdfApi.md#put_movie_annotation) | **PUT** /pdf/\{name}/annotations/movie/\{annotationId} | Replace document movie annotation @@ -437,6 +443,7 @@ Class | Method | HTTP request | Description - [CryptoAlgorithm](docs/CryptoAlgorithm.md) - [DiscUsage](docs/DiscUsage.md) - [DocFormat](docs/DocFormat.md) + - [DocMDPAccessPermissionType](docs/DocMDPAccessPermissionType.md) - [DocRecognitionMode](docs/DocRecognitionMode.md) - [DocumentPrivilege](docs/DocumentPrivilege.md) - [EpubRecognitionMode](docs/EpubRecognitionMode.md) @@ -487,6 +494,7 @@ Class | Method | HTTP request | Description - [Segment](docs/Segment.md) - [ShapeType](docs/ShapeType.md) - [Signature](docs/Signature.md) + - [SignatureCustomAppearance](docs/SignatureCustomAppearance.md) - [SignatureType](docs/SignatureType.md) - [SoundEncoding](docs/SoundEncoding.md) - [SoundIcon](docs/SoundIcon.md) @@ -506,6 +514,7 @@ Class | Method | HTTP request | Description - [TextReplaceListRequest](docs/TextReplaceListRequest.md) - [TextState](docs/TextState.md) - [TextStyle](docs/TextStyle.md) + - [TimestampSettings](docs/TimestampSettings.md) - [VerticalAlignment](docs/VerticalAlignment.md) - [WordCount](docs/WordCount.md) - [WrapMode](docs/WrapMode.md) @@ -542,6 +551,7 @@ Class | Method | HTTP request | Description - [FileAttachmentAnnotations](docs/FileAttachmentAnnotations.md) - [FileAttachmentAnnotationsResponse](docs/FileAttachmentAnnotationsResponse.md) - [FileVersion](docs/FileVersion.md) + - [FormField](docs/FormField.md) - [FreeTextAnnotationResponse](docs/FreeTextAnnotationResponse.md) - [FreeTextAnnotations](docs/FreeTextAnnotations.md) - [FreeTextAnnotationsResponse](docs/FreeTextAnnotationsResponse.md) @@ -582,6 +592,9 @@ Class | Method | HTTP request | Description - [ScreenAnnotationResponse](docs/ScreenAnnotationResponse.md) - [ScreenAnnotations](docs/ScreenAnnotations.md) - [ScreenAnnotationsResponse](docs/ScreenAnnotationsResponse.md) + - [SignatureFieldResponse](docs/SignatureFieldResponse.md) + - [SignatureFields](docs/SignatureFields.md) + - [SignatureFieldsResponse](docs/SignatureFieldsResponse.md) - [SignatureVerifyResponse](docs/SignatureVerifyResponse.md) - [SoundAnnotationResponse](docs/SoundAnnotationResponse.md) - [SoundAnnotations](docs/SoundAnnotations.md) @@ -629,6 +642,7 @@ Class | Method | HTTP request | Description - [PopupAnnotation](docs/PopupAnnotation.md) - [RedactionAnnotation](docs/RedactionAnnotation.md) - [ScreenAnnotation](docs/ScreenAnnotation.md) + - [SignatureField](docs/SignatureField.md) - [TextFooter](docs/TextFooter.md) - [TextHeader](docs/TextHeader.md) - [TextStamp](docs/TextStamp.md) diff --git a/asposepdfcloud/__init__.py b/asposepdfcloud/__init__.py index 9d0689b..74b9536 100644 --- a/asposepdfcloud/__init__.py +++ b/asposepdfcloud/__init__.py @@ -50,6 +50,7 @@ from .models.crypto_algorithm import CryptoAlgorithm from .models.disc_usage import DiscUsage from .models.doc_format import DocFormat +from .models.doc_mdp_access_permission_type import DocMDPAccessPermissionType from .models.doc_recognition_mode import DocRecognitionMode from .models.document_privilege import DocumentPrivilege from .models.epub_recognition_mode import EpubRecognitionMode @@ -100,6 +101,7 @@ from .models.segment import Segment from .models.shape_type import ShapeType from .models.signature import Signature +from .models.signature_custom_appearance import SignatureCustomAppearance from .models.signature_type import SignatureType from .models.sound_encoding import SoundEncoding from .models.sound_icon import SoundIcon @@ -119,6 +121,7 @@ from .models.text_replace_list_request import TextReplaceListRequest from .models.text_state import TextState from .models.text_style import TextStyle +from .models.timestamp_settings import TimestampSettings from .models.vertical_alignment import VerticalAlignment from .models.word_count import WordCount from .models.wrap_mode import WrapMode @@ -155,6 +158,7 @@ from .models.file_attachment_annotations import FileAttachmentAnnotations from .models.file_attachment_annotations_response import FileAttachmentAnnotationsResponse from .models.file_version import FileVersion +from .models.form_field import FormField from .models.free_text_annotation_response import FreeTextAnnotationResponse from .models.free_text_annotations import FreeTextAnnotations from .models.free_text_annotations_response import FreeTextAnnotationsResponse @@ -195,6 +199,9 @@ from .models.screen_annotation_response import ScreenAnnotationResponse from .models.screen_annotations import ScreenAnnotations from .models.screen_annotations_response import ScreenAnnotationsResponse +from .models.signature_field_response import SignatureFieldResponse +from .models.signature_fields import SignatureFields +from .models.signature_fields_response import SignatureFieldsResponse from .models.signature_verify_response import SignatureVerifyResponse from .models.sound_annotation_response import SoundAnnotationResponse from .models.sound_annotations import SoundAnnotations @@ -242,6 +249,7 @@ from .models.popup_annotation import PopupAnnotation from .models.redaction_annotation import RedactionAnnotation from .models.screen_annotation import ScreenAnnotation +from .models.signature_field import SignatureField from .models.text_footer import TextFooter from .models.text_header import TextHeader from .models.text_stamp import TextStamp diff --git a/asposepdfcloud/apis/pdf_api.py b/asposepdfcloud/apis/pdf_api.py index dc0172e..4d1870e 100644 --- a/asposepdfcloud/apis/pdf_api.py +++ b/asposepdfcloud/apis/pdf_api.py @@ -5912,6 +5912,118 @@ def get_document_screen_annotations_with_http_info(self, name, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_document_signature_fields(self, name, **kwargs): + """ + Read document signature fields. + 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.get_document_signature_fields(name, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str name: The document name. (required) + :param str storage: The document storage. + :param str folder: The document folder. + :return: SignatureFieldsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('callback'): + return self.get_document_signature_fields_with_http_info(name, **kwargs) + else: + (data) = self.get_document_signature_fields_with_http_info(name, **kwargs) + return data + + def get_document_signature_fields_with_http_info(self, name, **kwargs): + """ + Read document signature fields. + 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.get_document_signature_fields_with_http_info(name, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str name: The document name. (required) + :param str storage: The document storage. + :param str folder: The document folder. + :return: SignatureFieldsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['name', 'storage', 'folder'] + 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 get_document_signature_fields" % 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 `get_document_signature_fields`") + + + 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'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # 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}/fields/signature', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SignatureFieldsResponse', + 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 get_document_sound_annotations(self, name, **kwargs): """ Read document sound annotations. @@ -10114,6 +10226,114 @@ def get_link_annotation_with_http_info(self, name, link_id, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_markdown_in_storage_to_pdf(self, src_path, **kwargs): + """ + Convert MD file (located on storage) to PDF format and return resulting file in response. + 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.get_markdown_in_storage_to_pdf(src_path, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str src_path: Full source filename (ex. /folder1/folder2/template.md) (required) + :param str storage: The document storage. + :return: file + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('callback'): + return self.get_markdown_in_storage_to_pdf_with_http_info(src_path, **kwargs) + else: + (data) = self.get_markdown_in_storage_to_pdf_with_http_info(src_path, **kwargs) + return data + + def get_markdown_in_storage_to_pdf_with_http_info(self, src_path, **kwargs): + """ + Convert MD file (located on storage) to PDF format and return resulting file in response. + 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.get_markdown_in_storage_to_pdf_with_http_info(src_path, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str src_path: Full source filename (ex. /folder1/folder2/template.md) (required) + :param str storage: The document storage. + :return: file + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['src_path', 'storage'] + 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 get_markdown_in_storage_to_pdf" % key + ) + params[key] = val + del params['kwargs'] + # verify the required parameter 'src_path' is set + if ('src_path' not in params) or (params['src_path'] is None): + raise ValueError("Missing the required parameter `src_path` when calling `get_markdown_in_storage_to_pdf`") + + + collection_formats = {} + + path_params = {} + + query_params = [] + if 'src_path' in params: + query_params.append(('srcPath', params['src_path'])) + if 'storage' in params: + query_params.append(('storage', params['storage'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # HTTP header `Accept` + header_params['Accept'] = self.api_client.\ + select_header_accept(['multipart/form-data']) + + # 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/create/markdown', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='file', + 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 get_mht_in_storage_to_pdf(self, src_path, **kwargs): """ Convert MHT file (located on storage) to PDF format and return resulting file in response. @@ -13133,6 +13353,125 @@ def get_page_screen_annotations_with_http_info(self, name, page_number, **kwargs _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def get_page_signature_fields(self, name, page_number, **kwargs): + """ + Read document page signature fields. + 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.get_page_signature_fields(name, page_number, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str name: The document name. (required) + :param int page_number: The page number. (required) + :param str storage: The document storage. + :param str folder: The document folder. + :return: SignatureFieldsResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('callback'): + return self.get_page_signature_fields_with_http_info(name, page_number, **kwargs) + else: + (data) = self.get_page_signature_fields_with_http_info(name, page_number, **kwargs) + return data + + def get_page_signature_fields_with_http_info(self, name, page_number, **kwargs): + """ + Read document page signature fields. + 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.get_page_signature_fields_with_http_info(name, page_number, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str name: The document name. (required) + :param int page_number: The page number. (required) + :param str storage: The document storage. + :param str folder: The document folder. + :return: SignatureFieldsResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['name', 'page_number', 'storage', 'folder'] + 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 get_page_signature_fields" % 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 `get_page_signature_fields`") + # verify the required parameter 'page_number' is set + if ('page_number' not in params) or (params['page_number'] is None): + raise ValueError("Missing the required parameter `page_number` when calling `get_page_signature_fields`") + + + collection_formats = {} + + path_params = {} + if 'name' in params: + path_params['name'] = params['name'] + if 'page_number' in params: + path_params['pageNumber'] = params['page_number'] + + query_params = [] + if 'storage' in params: + query_params.append(('storage', params['storage'])) + if 'folder' in params: + query_params.append(('folder', params['folder'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # 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}/page/{pageNumber}/fields/signature', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='SignatureFieldsResponse', + 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 get_page_sound_annotations(self, name, page_number, **kwargs): """ Read document page sound annotations. @@ -16955,10 +17294,129 @@ def get_screen_annotation_with_http_info(self, name, annotation_id, **kwargs): 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 `get_screen_annotation`") + raise ValueError("Missing the required parameter `name` when calling `get_screen_annotation`") + # verify the required parameter 'annotation_id' is set + if ('annotation_id' not in params) or (params['annotation_id'] is None): + raise ValueError("Missing the required parameter `annotation_id` when calling `get_screen_annotation`") + + + collection_formats = {} + + path_params = {} + if 'name' in params: + path_params['name'] = params['name'] + if 'annotation_id' in params: + path_params['annotationId'] = params['annotation_id'] + + query_params = [] + if 'storage' in params: + query_params.append(('storage', params['storage'])) + if 'folder' in params: + query_params.append(('folder', params['folder'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # 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}/annotations/screen/{annotationId}', 'GET', + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type='ScreenAnnotationResponse', + 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 get_screen_annotation_data(self, name, annotation_id, **kwargs): + """ + Read document page screen annotation by ID. + 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.get_screen_annotation_data(name, annotation_id, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str name: The document name. (required) + :param str annotation_id: The annotation ID. (required) + :param str storage: The document storage. + :param str folder: The document folder. + :return: file + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('callback'): + return self.get_screen_annotation_data_with_http_info(name, annotation_id, **kwargs) + else: + (data) = self.get_screen_annotation_data_with_http_info(name, annotation_id, **kwargs) + return data + + def get_screen_annotation_data_with_http_info(self, name, annotation_id, **kwargs): + """ + Read document page screen annotation by ID. + 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.get_screen_annotation_data_with_http_info(name, annotation_id, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str name: The document name. (required) + :param str annotation_id: The annotation ID. (required) + :param str storage: The document storage. + :param str folder: The document folder. + :return: file + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['name', 'annotation_id', 'storage', 'folder'] + 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 get_screen_annotation_data" % 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 `get_screen_annotation_data`") # verify the required parameter 'annotation_id' is set if ('annotation_id' not in params) or (params['annotation_id'] is None): - raise ValueError("Missing the required parameter `annotation_id` when calling `get_screen_annotation`") + raise ValueError("Missing the required parameter `annotation_id` when calling `get_screen_annotation_data`") collection_formats = {} @@ -16983,7 +17441,7 @@ def get_screen_annotation_with_http_info(self, name, annotation_id, **kwargs): body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ - select_header_accept(['application/json']) + select_header_accept(['multipart/form-data']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ @@ -16992,14 +17450,14 @@ def get_screen_annotation_with_http_info(self, name, annotation_id, **kwargs): # Authentication setting auth_settings = ['JWT'] - return self.api_client.call_api('/pdf/{name}/annotations/screen/{annotationId}', 'GET', + return self.api_client.call_api('/pdf/{name}/annotations/screen/{annotationId}/data', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='ScreenAnnotationResponse', + response_type='file', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), @@ -17007,57 +17465,57 @@ def get_screen_annotation_with_http_info(self, name, annotation_id, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) - def get_screen_annotation_data(self, name, annotation_id, **kwargs): + def get_signature_field(self, name, field_name, **kwargs): """ - Read document page screen annotation by ID. + Read document signature field by name. 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.get_screen_annotation_data(name, annotation_id, callback=callback_function) + >>> thread = api.get_signature_field(name, field_name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: The document name. (required) - :param str annotation_id: The annotation ID. (required) + :param str field_name: The field name. (required) :param str storage: The document storage. :param str folder: The document folder. - :return: file + :return: SignatureFieldResponse If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): - return self.get_screen_annotation_data_with_http_info(name, annotation_id, **kwargs) + return self.get_signature_field_with_http_info(name, field_name, **kwargs) else: - (data) = self.get_screen_annotation_data_with_http_info(name, annotation_id, **kwargs) + (data) = self.get_signature_field_with_http_info(name, field_name, **kwargs) return data - def get_screen_annotation_data_with_http_info(self, name, annotation_id, **kwargs): + def get_signature_field_with_http_info(self, name, field_name, **kwargs): """ - Read document page screen annotation by ID. + Read document signature field by name. 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.get_screen_annotation_data_with_http_info(name, annotation_id, callback=callback_function) + >>> thread = api.get_signature_field_with_http_info(name, field_name, callback=callback_function) :param callback function: The callback function for asynchronous request. (optional) :param str name: The document name. (required) - :param str annotation_id: The annotation ID. (required) + :param str field_name: The field name. (required) :param str storage: The document storage. :param str folder: The document folder. - :return: file + :return: SignatureFieldResponse If the method is called asynchronously, returns the request thread. """ - all_params = ['name', 'annotation_id', 'storage', 'folder'] + all_params = ['name', 'field_name', 'storage', 'folder'] all_params.append('callback') all_params.append('_return_http_data_only') all_params.append('_preload_content') @@ -17068,16 +17526,16 @@ def get_screen_annotation_data_with_http_info(self, name, annotation_id, **kwarg if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" - " to method get_screen_annotation_data" % key + " to method get_signature_field" % 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 `get_screen_annotation_data`") - # verify the required parameter 'annotation_id' is set - if ('annotation_id' not in params) or (params['annotation_id'] is None): - raise ValueError("Missing the required parameter `annotation_id` when calling `get_screen_annotation_data`") + raise ValueError("Missing the required parameter `name` when calling `get_signature_field`") + # verify the required parameter 'field_name' is set + if ('field_name' not in params) or (params['field_name'] is None): + raise ValueError("Missing the required parameter `field_name` when calling `get_signature_field`") collection_formats = {} @@ -17085,8 +17543,8 @@ def get_screen_annotation_data_with_http_info(self, name, annotation_id, **kwarg path_params = {} if 'name' in params: path_params['name'] = params['name'] - if 'annotation_id' in params: - path_params['annotationId'] = params['annotation_id'] + if 'field_name' in params: + path_params['fieldName'] = params['field_name'] query_params = [] if 'storage' in params: @@ -17102,7 +17560,7 @@ def get_screen_annotation_data_with_http_info(self, name, annotation_id, **kwarg body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.\ - select_header_accept(['multipart/form-data']) + select_header_accept(['application/json']) # HTTP header `Content-Type` header_params['Content-Type'] = self.api_client.\ @@ -17111,14 +17569,14 @@ def get_screen_annotation_data_with_http_info(self, name, annotation_id, **kwarg # Authentication setting auth_settings = ['JWT'] - return self.api_client.call_api('/pdf/{name}/annotations/screen/{annotationId}/data', 'GET', + return self.api_client.call_api('/pdf/{name}/fields/signature/{fieldName}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, - response_type='file', + response_type='SignatureFieldResponse', auth_settings=auth_settings, callback=params.get('callback'), _return_http_data_only=params.get('_return_http_data_only'), @@ -22295,6 +22753,139 @@ def post_page_caret_annotations_with_http_info(self, name, page_number, annotati _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def post_page_certify(self, name, page_number, sign, doc_mdp_access_permission_type, **kwargs): + """ + Certify document page. + 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_page_certify(name, page_number, sign, doc_mdp_access_permission_type, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str name: The document name. (required) + :param int page_number: The page number. (required) + :param Signature sign: Signature object containing signature data. (required) + :param str doc_mdp_access_permission_type: The access permissions granted for this document. (required) + :param str storage: The document storage. + :param str folder: The document folder. + :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_page_certify_with_http_info(name, page_number, sign, doc_mdp_access_permission_type, **kwargs) + else: + (data) = self.post_page_certify_with_http_info(name, page_number, sign, doc_mdp_access_permission_type, **kwargs) + return data + + def post_page_certify_with_http_info(self, name, page_number, sign, doc_mdp_access_permission_type, **kwargs): + """ + Certify document page. + 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_page_certify_with_http_info(name, page_number, sign, doc_mdp_access_permission_type, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str name: The document name. (required) + :param int page_number: The page number. (required) + :param Signature sign: Signature object containing signature data. (required) + :param str doc_mdp_access_permission_type: The access permissions granted for this document. (required) + :param str storage: The document storage. + :param str folder: The document folder. + :return: AsposeResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['name', 'page_number', 'sign', 'doc_mdp_access_permission_type', 'storage', 'folder'] + 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_page_certify" % 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_page_certify`") + # verify the required parameter 'page_number' is set + if ('page_number' not in params) or (params['page_number'] is None): + raise ValueError("Missing the required parameter `page_number` when calling `post_page_certify`") + # verify the required parameter 'sign' is set + if ('sign' not in params) or (params['sign'] is None): + raise ValueError("Missing the required parameter `sign` when calling `post_page_certify`") + # verify the required parameter 'doc_mdp_access_permission_type' is set + if ('doc_mdp_access_permission_type' not in params) or (params['doc_mdp_access_permission_type'] is None): + raise ValueError("Missing the required parameter `doc_mdp_access_permission_type` when calling `post_page_certify`") + + + collection_formats = {} + + path_params = {} + if 'name' in params: + path_params['name'] = params['name'] + if 'page_number' in params: + path_params['pageNumber'] = params['page_number'] + + query_params = [] + if 'doc_mdp_access_permission_type' in params: + query_params.append(('docMdpAccessPermissionType', params['doc_mdp_access_permission_type'])) + if 'storage' in params: + query_params.append(('storage', params['storage'])) + if 'folder' in params: + query_params.append(('folder', params['folder'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + if 'sign' in params: + body_params = params['sign'] + # 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}/pages/{pageNumber}/certify', '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_page_circle_annotations(self, name, page_number, annotations, **kwargs): """ Add document page circle annotations. @@ -30322,6 +30913,125 @@ def put_link_annotation_with_http_info(self, name, link_id, link, **kwargs): _request_timeout=params.get('_request_timeout'), collection_formats=collection_formats) + def put_markdown_in_storage_to_pdf(self, name, src_path, **kwargs): + """ + Convert MD file (located on storage) to PDF format and upload resulting file to storage. + 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.put_markdown_in_storage_to_pdf(name, src_path, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str name: The document name. (required) + :param str src_path: Full source filename (ex. /folder1/folder2/template.md) (required) + :param str storage: The document storage. + :param str dst_folder: The destination document folder. + :return: AsposeResponse + If the method is called asynchronously, + returns the request thread. + """ + kwargs['_return_http_data_only'] = True + if kwargs.get('callback'): + return self.put_markdown_in_storage_to_pdf_with_http_info(name, src_path, **kwargs) + else: + (data) = self.put_markdown_in_storage_to_pdf_with_http_info(name, src_path, **kwargs) + return data + + def put_markdown_in_storage_to_pdf_with_http_info(self, name, src_path, **kwargs): + """ + Convert MD file (located on storage) to PDF format and upload resulting file to storage. + 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.put_markdown_in_storage_to_pdf_with_http_info(name, src_path, callback=callback_function) + + :param callback function: The callback function + for asynchronous request. (optional) + :param str name: The document name. (required) + :param str src_path: Full source filename (ex. /folder1/folder2/template.md) (required) + :param str storage: The document storage. + :param str dst_folder: The destination document folder. + :return: AsposeResponse + If the method is called asynchronously, + returns the request thread. + """ + + all_params = ['name', 'src_path', 'storage', 'dst_folder'] + 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 put_markdown_in_storage_to_pdf" % 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 `put_markdown_in_storage_to_pdf`") + # verify the required parameter 'src_path' is set + if ('src_path' not in params) or (params['src_path'] is None): + raise ValueError("Missing the required parameter `src_path` when calling `put_markdown_in_storage_to_pdf`") + + + collection_formats = {} + + path_params = {} + if 'name' in params: + path_params['name'] = params['name'] + + query_params = [] + if 'src_path' in params: + query_params.append(('srcPath', params['src_path'])) + if 'storage' in params: + query_params.append(('storage', params['storage'])) + if 'dst_folder' in params: + query_params.append(('dstFolder', params['dst_folder'])) + + header_params = {} + + form_params = [] + local_var_files = {} + + body_params = None + # 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}/create/markdown', 'PUT', + 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 put_merge_documents(self, name, merge_documents, **kwargs): """ Merge a list of documents. diff --git a/asposepdfcloud/configuration.py b/asposepdfcloud/configuration.py index 0974dc9..23ff625 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: 19.7.0".\ + "SDK Package Version: 19.8.0".\ format(env=sys.platform, pyversion=sys.version) diff --git a/asposepdfcloud/models/__init__.py b/asposepdfcloud/models/__init__.py index 5844bc7..12ed512 100644 --- a/asposepdfcloud/models/__init__.py +++ b/asposepdfcloud/models/__init__.py @@ -50,6 +50,7 @@ from .crypto_algorithm import CryptoAlgorithm from .disc_usage import DiscUsage from .doc_format import DocFormat +from .doc_mdp_access_permission_type import DocMDPAccessPermissionType from .doc_recognition_mode import DocRecognitionMode from .document_privilege import DocumentPrivilege from .epub_recognition_mode import EpubRecognitionMode @@ -100,6 +101,7 @@ from .segment import Segment from .shape_type import ShapeType from .signature import Signature +from .signature_custom_appearance import SignatureCustomAppearance from .signature_type import SignatureType from .sound_encoding import SoundEncoding from .sound_icon import SoundIcon @@ -119,6 +121,7 @@ from .text_replace_list_request import TextReplaceListRequest from .text_state import TextState from .text_style import TextStyle +from .timestamp_settings import TimestampSettings from .vertical_alignment import VerticalAlignment from .word_count import WordCount from .wrap_mode import WrapMode @@ -155,6 +158,7 @@ from .file_attachment_annotations import FileAttachmentAnnotations from .file_attachment_annotations_response import FileAttachmentAnnotationsResponse from .file_version import FileVersion +from .form_field import FormField from .free_text_annotation_response import FreeTextAnnotationResponse from .free_text_annotations import FreeTextAnnotations from .free_text_annotations_response import FreeTextAnnotationsResponse @@ -195,6 +199,9 @@ from .screen_annotation_response import ScreenAnnotationResponse from .screen_annotations import ScreenAnnotations from .screen_annotations_response import ScreenAnnotationsResponse +from .signature_field_response import SignatureFieldResponse +from .signature_fields import SignatureFields +from .signature_fields_response import SignatureFieldsResponse from .signature_verify_response import SignatureVerifyResponse from .sound_annotation_response import SoundAnnotationResponse from .sound_annotations import SoundAnnotations @@ -242,6 +249,7 @@ from .popup_annotation import PopupAnnotation from .redaction_annotation import RedactionAnnotation from .screen_annotation import ScreenAnnotation +from .signature_field import SignatureField from .text_footer import TextFooter from .text_header import TextHeader from .text_stamp import TextStamp diff --git a/asposepdfcloud/models/doc_mdp_access_permission_type.py b/asposepdfcloud/models/doc_mdp_access_permission_type.py new file mode 100644 index 0000000..c32b714 --- /dev/null +++ b/asposepdfcloud/models/doc_mdp_access_permission_type.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Aspose.PDF Cloud API Reference + + + Copyright (c) 2019 Aspose.PDF Cloud + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + + + OpenAPI spec version: 3.0 + +""" + + +from pprint import pformat +from six import iteritems +import re + + +class DocMDPAccessPermissionType(object): + """ + NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + """ + allowed enum values + """ + NOCHANGES = "NoChanges" + FILLINGINFORMS = "FillingInForms" + ANNOTATIONMODIFICATION = "AnnotationModification" + + """ + 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 = { + + } + + attribute_map = { + + } + + def __init__(self): + """ + DocMDPAccessPermissionType - a model defined in Swagger + """ + + + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in 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 + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return 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, DocMDPAccessPermissionType): + 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/asposepdfcloud/models/form_field.py b/asposepdfcloud/models/form_field.py new file mode 100644 index 0000000..61c1ee1 --- /dev/null +++ b/asposepdfcloud/models/form_field.py @@ -0,0 +1,620 @@ +# coding: utf-8 + +""" + Aspose.PDF Cloud API Reference + + + Copyright (c) 2019 Aspose.PDF Cloud + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + + + OpenAPI spec version: 3.0 + +""" + + +from pprint import pformat +from six import iteritems +import re + + +class FormField(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 = { + 'links': 'list[Link]', + 'partial_name': 'str', + 'rect': 'Rectangle', + 'value': 'str', + 'page_index': 'int', + 'height': 'float', + 'width': 'float', + 'z_index': 'int', + 'is_group': 'bool', + 'parent': 'FormField', + 'is_shared_field': 'bool', + 'flags': 'list[AnnotationFlags]', + 'color': 'Color', + 'contents': 'str', + 'margin': 'MarginInfo', + 'highlighting': 'LinkHighlightingMode', + 'horizontal_alignment': 'HorizontalAlignment', + 'vertical_alignment': 'VerticalAlignment' + } + + attribute_map = { + 'links': 'Links', + 'partial_name': 'PartialName', + 'rect': 'Rect', + 'value': 'Value', + 'page_index': 'PageIndex', + 'height': 'Height', + 'width': 'Width', + 'z_index': 'ZIndex', + 'is_group': 'IsGroup', + 'parent': 'Parent', + 'is_shared_field': 'IsSharedField', + 'flags': 'Flags', + 'color': 'Color', + 'contents': 'Contents', + 'margin': 'Margin', + 'highlighting': 'Highlighting', + 'horizontal_alignment': 'HorizontalAlignment', + 'vertical_alignment': 'VerticalAlignment' + } + + def __init__(self, links=None, partial_name=None, rect=None, value=None, page_index=None, height=None, width=None, z_index=None, is_group=None, parent=None, is_shared_field=None, flags=None, color=None, contents=None, margin=None, highlighting=None, horizontal_alignment=None, vertical_alignment=None): + """ + FormField - a model defined in Swagger + """ + + self._links = None + self._partial_name = None + self._rect = None + self._value = None + self._page_index = None + self._height = None + self._width = None + self._z_index = None + self._is_group = None + self._parent = None + self._is_shared_field = None + self._flags = None + self._color = None + self._contents = None + self._margin = None + self._highlighting = None + self._horizontal_alignment = None + self._vertical_alignment = None + + if links is not None: + self.links = links + if partial_name is not None: + self.partial_name = partial_name + if rect is not None: + self.rect = rect + if value is not None: + self.value = value + self.page_index = page_index + if height is not None: + self.height = height + if width is not None: + self.width = width + if z_index is not None: + self.z_index = z_index + self.is_group = is_group + if parent is not None: + self.parent = parent + if is_shared_field is not None: + self.is_shared_field = is_shared_field + if flags is not None: + self.flags = flags + if color is not None: + self.color = color + if contents is not None: + self.contents = contents + if margin is not None: + self.margin = margin + if highlighting is not None: + self.highlighting = highlighting + if horizontal_alignment is not None: + self.horizontal_alignment = horizontal_alignment + if vertical_alignment is not None: + self.vertical_alignment = vertical_alignment + + @property + def links(self): + """ + Gets the links of this FormField. + Link to the document. + + :return: The links of this FormField. + :rtype: list[Link] + """ + return self._links + + @links.setter + def links(self, links): + """ + Sets the links of this FormField. + Link to the document. + + :param links: The links of this FormField. + :type: list[Link] + """ + + self._links = links + + @property + def partial_name(self): + """ + Gets the partial_name of this FormField. + Field name. + + :return: The partial_name of this FormField. + :rtype: str + """ + return self._partial_name + + @partial_name.setter + def partial_name(self, partial_name): + """ + Sets the partial_name of this FormField. + Field name. + + :param partial_name: The partial_name of this FormField. + :type: str + """ + + self._partial_name = partial_name + + @property + def rect(self): + """ + Gets the rect of this FormField. + Field rectangle. + + :return: The rect of this FormField. + :rtype: Rectangle + """ + return self._rect + + @rect.setter + def rect(self, rect): + """ + Sets the rect of this FormField. + Field rectangle. + + :param rect: The rect of this FormField. + :type: Rectangle + """ + + self._rect = rect + + @property + def value(self): + """ + Gets the value of this FormField. + Field value. + + :return: The value of this FormField. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this FormField. + Field value. + + :param value: The value of this FormField. + :type: str + """ + + self._value = value + + @property + def page_index(self): + """ + Gets the page_index of this FormField. + Page index. + + :return: The page_index of this FormField. + :rtype: int + """ + return self._page_index + + @page_index.setter + def page_index(self, page_index): + """ + Sets the page_index of this FormField. + Page index. + + :param page_index: The page_index of this FormField. + :type: int + """ + if page_index is None: + raise ValueError("Invalid value for `page_index`, must not be `None`") + + self._page_index = page_index + + @property + def height(self): + """ + Gets the height of this FormField. + Gets or sets height of the field. + + :return: The height of this FormField. + :rtype: float + """ + return self._height + + @height.setter + def height(self, height): + """ + Sets the height of this FormField. + Gets or sets height of the field. + + :param height: The height of this FormField. + :type: float + """ + + self._height = height + + @property + def width(self): + """ + Gets the width of this FormField. + Gets or sets width of the field. + + :return: The width of this FormField. + :rtype: float + """ + return self._width + + @width.setter + def width(self, width): + """ + Sets the width of this FormField. + Gets or sets width of the field. + + :param width: The width of this FormField. + :type: float + """ + + self._width = width + + @property + def z_index(self): + """ + Gets the z_index of this FormField. + Z index. + + :return: The z_index of this FormField. + :rtype: int + """ + return self._z_index + + @z_index.setter + def z_index(self, z_index): + """ + Sets the z_index of this FormField. + Z index. + + :param z_index: The z_index of this FormField. + :type: int + """ + + self._z_index = z_index + + @property + def is_group(self): + """ + Gets the is_group of this FormField. + Is group. + + :return: The is_group of this FormField. + :rtype: bool + """ + return self._is_group + + @is_group.setter + def is_group(self, is_group): + """ + Sets the is_group of this FormField. + Is group. + + :param is_group: The is_group of this FormField. + :type: bool + """ + if is_group is None: + raise ValueError("Invalid value for `is_group`, must not be `None`") + + self._is_group = is_group + + @property + def parent(self): + """ + Gets the parent of this FormField. + Gets field parent. + + :return: The parent of this FormField. + :rtype: FormField + """ + return self._parent + + @parent.setter + def parent(self, parent): + """ + Sets the parent of this FormField. + Gets field parent. + + :param parent: The parent of this FormField. + :type: FormField + """ + + self._parent = parent + + @property + def is_shared_field(self): + """ + Gets the is_shared_field of this FormField. + Property for Generator support. Used when field is added to header or footer. If true, this field will created once and it's appearance will be visible on all pages of the document. If false, separated field will be created for every document page. + + :return: The is_shared_field of this FormField. + :rtype: bool + """ + return self._is_shared_field + + @is_shared_field.setter + def is_shared_field(self, is_shared_field): + """ + Sets the is_shared_field of this FormField. + Property for Generator support. Used when field is added to header or footer. If true, this field will created once and it's appearance will be visible on all pages of the document. If false, separated field will be created for every document page. + + :param is_shared_field: The is_shared_field of this FormField. + :type: bool + """ + + self._is_shared_field = is_shared_field + + @property + def flags(self): + """ + Gets the flags of this FormField. + Gets Flags of the field. + + :return: The flags of this FormField. + :rtype: list[AnnotationFlags] + """ + return self._flags + + @flags.setter + def flags(self, flags): + """ + Sets the flags of this FormField. + Gets Flags of the field. + + :param flags: The flags of this FormField. + :type: list[AnnotationFlags] + """ + + self._flags = flags + + @property + def color(self): + """ + Gets the color of this FormField. + Color of the annotation. + + :return: The color of this FormField. + :rtype: Color + """ + return self._color + + @color.setter + def color(self, color): + """ + Sets the color of this FormField. + Color of the annotation. + + :param color: The color of this FormField. + :type: Color + """ + + self._color = color + + @property + def contents(self): + """ + Gets the contents of this FormField. + Get the field content. + + :return: The contents of this FormField. + :rtype: str + """ + return self._contents + + @contents.setter + def contents(self, contents): + """ + Sets the contents of this FormField. + Get the field content. + + :param contents: The contents of this FormField. + :type: str + """ + + self._contents = contents + + @property + def margin(self): + """ + Gets the margin of this FormField. + Gets or sets a outer margin for paragraph (for pdf generation) + + :return: The margin of this FormField. + :rtype: MarginInfo + """ + return self._margin + + @margin.setter + def margin(self, margin): + """ + Sets the margin of this FormField. + Gets or sets a outer margin for paragraph (for pdf generation) + + :param margin: The margin of this FormField. + :type: MarginInfo + """ + + self._margin = margin + + @property + def highlighting(self): + """ + Gets the highlighting of this FormField. + Field highlighting mode. + + :return: The highlighting of this FormField. + :rtype: LinkHighlightingMode + """ + return self._highlighting + + @highlighting.setter + def highlighting(self, highlighting): + """ + Sets the highlighting of this FormField. + Field highlighting mode. + + :param highlighting: The highlighting of this FormField. + :type: LinkHighlightingMode + """ + + self._highlighting = highlighting + + @property + def horizontal_alignment(self): + """ + Gets the horizontal_alignment of this FormField. + Gets HorizontalAlignment of the field. + + :return: The horizontal_alignment of this FormField. + :rtype: HorizontalAlignment + """ + return self._horizontal_alignment + + @horizontal_alignment.setter + def horizontal_alignment(self, horizontal_alignment): + """ + Sets the horizontal_alignment of this FormField. + Gets HorizontalAlignment of the field. + + :param horizontal_alignment: The horizontal_alignment of this FormField. + :type: HorizontalAlignment + """ + + self._horizontal_alignment = horizontal_alignment + + @property + def vertical_alignment(self): + """ + Gets the vertical_alignment of this FormField. + Gets VerticalAlignment of the field. + + :return: The vertical_alignment of this FormField. + :rtype: VerticalAlignment + """ + return self._vertical_alignment + + @vertical_alignment.setter + def vertical_alignment(self, vertical_alignment): + """ + Sets the vertical_alignment of this FormField. + Gets VerticalAlignment of the field. + + :param vertical_alignment: The vertical_alignment of this FormField. + :type: VerticalAlignment + """ + + self._vertical_alignment = vertical_alignment + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in 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 + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return 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, FormField): + 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/asposepdfcloud/models/signature.py b/asposepdfcloud/models/signature.py index 2ce630e..f9bacd7 100644 --- a/asposepdfcloud/models/signature.py +++ b/asposepdfcloud/models/signature.py @@ -60,7 +60,10 @@ class Signature(object): 'form_field_name': 'str', 'authority': 'str', 'date': 'str', - 'show_properties': 'bool' + 'show_properties': 'bool', + 'timestamp_settings': 'TimestampSettings', + 'is_valid': 'bool', + 'custom_appearance': 'SignatureCustomAppearance' } attribute_map = { @@ -76,10 +79,13 @@ class Signature(object): 'form_field_name': 'FormFieldName', 'authority': 'Authority', 'date': 'Date', - 'show_properties': 'ShowProperties' + 'show_properties': 'ShowProperties', + 'timestamp_settings': 'TimestampSettings', + 'is_valid': 'IsValid', + 'custom_appearance': 'CustomAppearance' } - def __init__(self, signature_path=None, signature_type=None, password=None, appearance=None, reason=None, contact=None, location=None, visible=None, rectangle=None, form_field_name=None, authority=None, date=None, show_properties=None): + def __init__(self, signature_path=None, signature_type=None, password=None, appearance=None, reason=None, contact=None, location=None, visible=None, rectangle=None, form_field_name=None, authority=None, date=None, show_properties=None, timestamp_settings=None, is_valid=None, custom_appearance=None): """ Signature - a model defined in Swagger """ @@ -97,6 +103,9 @@ def __init__(self, signature_path=None, signature_type=None, password=None, appe self._authority = None self._date = None self._show_properties = None + self._timestamp_settings = None + self._is_valid = None + self._custom_appearance = None self.signature_path = signature_path self.signature_type = signature_type @@ -120,6 +129,12 @@ def __init__(self, signature_path=None, signature_type=None, password=None, appe if date is not None: self.date = date self.show_properties = show_properties + if timestamp_settings is not None: + self.timestamp_settings = timestamp_settings + if is_valid is not None: + self.is_valid = is_valid + if custom_appearance is not None: + self.custom_appearance = custom_appearance @property def signature_path(self): @@ -141,10 +156,6 @@ def signature_path(self, signature_path): :param signature_path: The signature_path of this Signature. :type: str """ - if signature_path is None: - raise ValueError("Invalid value for `signature_path`, must not be `None`") - if signature_path is not None and len(signature_path) < 1: - raise ValueError("Invalid value for `signature_path`, length must be greater than or equal to `1`") self._signature_path = signature_path @@ -430,6 +441,75 @@ def show_properties(self, show_properties): self._show_properties = show_properties + @property + def timestamp_settings(self): + """ + Gets the timestamp_settings of this Signature. + Gets/sets timestamp settings. + + :return: The timestamp_settings of this Signature. + :rtype: TimestampSettings + """ + return self._timestamp_settings + + @timestamp_settings.setter + def timestamp_settings(self, timestamp_settings): + """ + Sets the timestamp_settings of this Signature. + Gets/sets timestamp settings. + + :param timestamp_settings: The timestamp_settings of this Signature. + :type: TimestampSettings + """ + + self._timestamp_settings = timestamp_settings + + @property + def is_valid(self): + """ + Gets the is_valid of this Signature. + Verify the document regarding this signature and return true if document is valid or otherwise false. + + :return: The is_valid of this Signature. + :rtype: bool + """ + return self._is_valid + + @is_valid.setter + def is_valid(self, is_valid): + """ + Sets the is_valid of this Signature. + Verify the document regarding this signature and return true if document is valid or otherwise false. + + :param is_valid: The is_valid of this Signature. + :type: bool + """ + + self._is_valid = is_valid + + @property + def custom_appearance(self): + """ + Gets the custom_appearance of this Signature. + Gets/sets the custom appearance. + + :return: The custom_appearance of this Signature. + :rtype: SignatureCustomAppearance + """ + return self._custom_appearance + + @custom_appearance.setter + def custom_appearance(self, custom_appearance): + """ + Sets the custom_appearance of this Signature. + Gets/sets the custom appearance. + + :param custom_appearance: The custom_appearance of this Signature. + :type: SignatureCustomAppearance + """ + + self._custom_appearance = custom_appearance + def to_dict(self): """ Returns the model properties as a dict diff --git a/asposepdfcloud/models/signature_custom_appearance.py b/asposepdfcloud/models/signature_custom_appearance.py new file mode 100644 index 0000000..4c08ee6 --- /dev/null +++ b/asposepdfcloud/models/signature_custom_appearance.py @@ -0,0 +1,454 @@ +# coding: utf-8 + +""" + Aspose.PDF Cloud API Reference + + + Copyright (c) 2019 Aspose.PDF Cloud + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + + + OpenAPI spec version: 3.0 + +""" + + +from pprint import pformat +from six import iteritems +import re + + +class SignatureCustomAppearance(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 = { + 'font_family_name': 'str', + 'font_size': 'float', + 'show_contact_info': 'bool', + 'show_reason': 'bool', + 'show_location': 'bool', + 'contact_info_label': 'str', + 'reason_label': 'str', + 'location_label': 'str', + 'digital_signed_label': 'str', + 'date_signed_at_label': 'str', + 'date_time_local_format': 'str', + 'date_time_format': 'str' + } + + attribute_map = { + 'font_family_name': 'FontFamilyName', + 'font_size': 'FontSize', + 'show_contact_info': 'ShowContactInfo', + 'show_reason': 'ShowReason', + 'show_location': 'ShowLocation', + 'contact_info_label': 'ContactInfoLabel', + 'reason_label': 'ReasonLabel', + 'location_label': 'LocationLabel', + 'digital_signed_label': 'DigitalSignedLabel', + 'date_signed_at_label': 'DateSignedAtLabel', + 'date_time_local_format': 'DateTimeLocalFormat', + 'date_time_format': 'DateTimeFormat' + } + + def __init__(self, font_family_name=None, font_size=None, show_contact_info=None, show_reason=None, show_location=None, contact_info_label=None, reason_label=None, location_label=None, digital_signed_label=None, date_signed_at_label=None, date_time_local_format=None, date_time_format=None): + """ + SignatureCustomAppearance - a model defined in Swagger + """ + + self._font_family_name = None + self._font_size = None + self._show_contact_info = None + self._show_reason = None + self._show_location = None + self._contact_info_label = None + self._reason_label = None + self._location_label = None + self._digital_signed_label = None + self._date_signed_at_label = None + self._date_time_local_format = None + self._date_time_format = None + + if font_family_name is not None: + self.font_family_name = font_family_name + self.font_size = font_size + self.show_contact_info = show_contact_info + self.show_reason = show_reason + self.show_location = show_location + if contact_info_label is not None: + self.contact_info_label = contact_info_label + if reason_label is not None: + self.reason_label = reason_label + if location_label is not None: + self.location_label = location_label + if digital_signed_label is not None: + self.digital_signed_label = digital_signed_label + if date_signed_at_label is not None: + self.date_signed_at_label = date_signed_at_label + if date_time_local_format is not None: + self.date_time_local_format = date_time_local_format + if date_time_format is not None: + self.date_time_format = date_time_format + + @property + def font_family_name(self): + """ + Gets the font_family_name of this SignatureCustomAppearance. + Gets/sets font family name. It should be existed in the document. Default value: Arial. + + :return: The font_family_name of this SignatureCustomAppearance. + :rtype: str + """ + return self._font_family_name + + @font_family_name.setter + def font_family_name(self, font_family_name): + """ + Sets the font_family_name of this SignatureCustomAppearance. + Gets/sets font family name. It should be existed in the document. Default value: Arial. + + :param font_family_name: The font_family_name of this SignatureCustomAppearance. + :type: str + """ + + self._font_family_name = font_family_name + + @property + def font_size(self): + """ + Gets the font_size of this SignatureCustomAppearance. + Gets/sets font size. Default value: 10. + + :return: The font_size of this SignatureCustomAppearance. + :rtype: float + """ + return self._font_size + + @font_size.setter + def font_size(self, font_size): + """ + Sets the font_size of this SignatureCustomAppearance. + Gets/sets font size. Default value: 10. + + :param font_size: The font_size of this SignatureCustomAppearance. + :type: float + """ + if font_size is None: + raise ValueError("Invalid value for `font_size`, must not be `None`") + + self._font_size = font_size + + @property + def show_contact_info(self): + """ + Gets the show_contact_info of this SignatureCustomAppearance. + Gets/sets contact info visibility. Default value: true. + + :return: The show_contact_info of this SignatureCustomAppearance. + :rtype: bool + """ + return self._show_contact_info + + @show_contact_info.setter + def show_contact_info(self, show_contact_info): + """ + Sets the show_contact_info of this SignatureCustomAppearance. + Gets/sets contact info visibility. Default value: true. + + :param show_contact_info: The show_contact_info of this SignatureCustomAppearance. + :type: bool + """ + if show_contact_info is None: + raise ValueError("Invalid value for `show_contact_info`, must not be `None`") + + self._show_contact_info = show_contact_info + + @property + def show_reason(self): + """ + Gets the show_reason of this SignatureCustomAppearance. + Gets/sets reason visibility. Default value: true. + + :return: The show_reason of this SignatureCustomAppearance. + :rtype: bool + """ + return self._show_reason + + @show_reason.setter + def show_reason(self, show_reason): + """ + Sets the show_reason of this SignatureCustomAppearance. + Gets/sets reason visibility. Default value: true. + + :param show_reason: The show_reason of this SignatureCustomAppearance. + :type: bool + """ + if show_reason is None: + raise ValueError("Invalid value for `show_reason`, must not be `None`") + + self._show_reason = show_reason + + @property + def show_location(self): + """ + Gets the show_location of this SignatureCustomAppearance. + Gets/sets location visibility. Default value: true. + + :return: The show_location of this SignatureCustomAppearance. + :rtype: bool + """ + return self._show_location + + @show_location.setter + def show_location(self, show_location): + """ + Sets the show_location of this SignatureCustomAppearance. + Gets/sets location visibility. Default value: true. + + :param show_location: The show_location of this SignatureCustomAppearance. + :type: bool + """ + if show_location is None: + raise ValueError("Invalid value for `show_location`, must not be `None`") + + self._show_location = show_location + + @property + def contact_info_label(self): + """ + Gets the contact_info_label of this SignatureCustomAppearance. + Gets/sets contact info label. Default value: \"Contact\". + + :return: The contact_info_label of this SignatureCustomAppearance. + :rtype: str + """ + return self._contact_info_label + + @contact_info_label.setter + def contact_info_label(self, contact_info_label): + """ + Sets the contact_info_label of this SignatureCustomAppearance. + Gets/sets contact info label. Default value: \"Contact\". + + :param contact_info_label: The contact_info_label of this SignatureCustomAppearance. + :type: str + """ + + self._contact_info_label = contact_info_label + + @property + def reason_label(self): + """ + Gets the reason_label of this SignatureCustomAppearance. + Gets/sets reason label. Default value: \"Reason\". + + :return: The reason_label of this SignatureCustomAppearance. + :rtype: str + """ + return self._reason_label + + @reason_label.setter + def reason_label(self, reason_label): + """ + Sets the reason_label of this SignatureCustomAppearance. + Gets/sets reason label. Default value: \"Reason\". + + :param reason_label: The reason_label of this SignatureCustomAppearance. + :type: str + """ + + self._reason_label = reason_label + + @property + def location_label(self): + """ + Gets the location_label of this SignatureCustomAppearance. + Gets/sets location label. Default value: \"Location\". + + :return: The location_label of this SignatureCustomAppearance. + :rtype: str + """ + return self._location_label + + @location_label.setter + def location_label(self, location_label): + """ + Sets the location_label of this SignatureCustomAppearance. + Gets/sets location label. Default value: \"Location\". + + :param location_label: The location_label of this SignatureCustomAppearance. + :type: str + """ + + self._location_label = location_label + + @property + def digital_signed_label(self): + """ + Gets the digital_signed_label of this SignatureCustomAppearance. + Gets/sets digital signed label. Default value: \"Digitally signed by\". + + :return: The digital_signed_label of this SignatureCustomAppearance. + :rtype: str + """ + return self._digital_signed_label + + @digital_signed_label.setter + def digital_signed_label(self, digital_signed_label): + """ + Sets the digital_signed_label of this SignatureCustomAppearance. + Gets/sets digital signed label. Default value: \"Digitally signed by\". + + :param digital_signed_label: The digital_signed_label of this SignatureCustomAppearance. + :type: str + """ + + self._digital_signed_label = digital_signed_label + + @property + def date_signed_at_label(self): + """ + Gets the date_signed_at_label of this SignatureCustomAppearance. + Gets/sets date signed label. Default value: \"Date\". + + :return: The date_signed_at_label of this SignatureCustomAppearance. + :rtype: str + """ + return self._date_signed_at_label + + @date_signed_at_label.setter + def date_signed_at_label(self, date_signed_at_label): + """ + Sets the date_signed_at_label of this SignatureCustomAppearance. + Gets/sets date signed label. Default value: \"Date\". + + :param date_signed_at_label: The date_signed_at_label of this SignatureCustomAppearance. + :type: str + """ + + self._date_signed_at_label = date_signed_at_label + + @property + def date_time_local_format(self): + """ + Gets the date_time_local_format of this SignatureCustomAppearance. + Gets/sets datetime local format. Default value: \"yyyy.MM.dd HH:mm:ss zzz\". + + :return: The date_time_local_format of this SignatureCustomAppearance. + :rtype: str + """ + return self._date_time_local_format + + @date_time_local_format.setter + def date_time_local_format(self, date_time_local_format): + """ + Sets the date_time_local_format of this SignatureCustomAppearance. + Gets/sets datetime local format. Default value: \"yyyy.MM.dd HH:mm:ss zzz\". + + :param date_time_local_format: The date_time_local_format of this SignatureCustomAppearance. + :type: str + """ + + self._date_time_local_format = date_time_local_format + + @property + def date_time_format(self): + """ + Gets the date_time_format of this SignatureCustomAppearance. + Gets/sets datetime format. Default value: \"yyyy.MM.dd HH:mm:ss\". + + :return: The date_time_format of this SignatureCustomAppearance. + :rtype: str + """ + return self._date_time_format + + @date_time_format.setter + def date_time_format(self, date_time_format): + """ + Sets the date_time_format of this SignatureCustomAppearance. + Gets/sets datetime format. Default value: \"yyyy.MM.dd HH:mm:ss\". + + :param date_time_format: The date_time_format of this SignatureCustomAppearance. + :type: str + """ + + self._date_time_format = date_time_format + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in 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 + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return 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, SignatureCustomAppearance): + 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/asposepdfcloud/models/signature_field.py b/asposepdfcloud/models/signature_field.py new file mode 100644 index 0000000..a1568b4 --- /dev/null +++ b/asposepdfcloud/models/signature_field.py @@ -0,0 +1,648 @@ +# coding: utf-8 + +""" + Aspose.PDF Cloud API Reference + + + Copyright (c) 2019 Aspose.PDF Cloud + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + + + OpenAPI spec version: 3.0 + +""" + + +from pprint import pformat +from six import iteritems +import re + + +class SignatureField(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 = { + 'links': 'list[Link]', + 'partial_name': 'str', + 'rect': 'Rectangle', + 'value': 'str', + 'page_index': 'int', + 'height': 'float', + 'width': 'float', + 'z_index': 'int', + 'is_group': 'bool', + 'parent': 'FormField', + 'is_shared_field': 'bool', + 'flags': 'list[AnnotationFlags]', + 'color': 'Color', + 'contents': 'str', + 'margin': 'MarginInfo', + 'highlighting': 'LinkHighlightingMode', + 'horizontal_alignment': 'HorizontalAlignment', + 'vertical_alignment': 'VerticalAlignment', + 'signature': 'Signature' + } + + attribute_map = { + 'links': 'Links', + 'partial_name': 'PartialName', + 'rect': 'Rect', + 'value': 'Value', + 'page_index': 'PageIndex', + 'height': 'Height', + 'width': 'Width', + 'z_index': 'ZIndex', + 'is_group': 'IsGroup', + 'parent': 'Parent', + 'is_shared_field': 'IsSharedField', + 'flags': 'Flags', + 'color': 'Color', + 'contents': 'Contents', + 'margin': 'Margin', + 'highlighting': 'Highlighting', + 'horizontal_alignment': 'HorizontalAlignment', + 'vertical_alignment': 'VerticalAlignment', + 'signature': 'Signature' + } + + def __init__(self, links=None, partial_name=None, rect=None, value=None, page_index=None, height=None, width=None, z_index=None, is_group=None, parent=None, is_shared_field=None, flags=None, color=None, contents=None, margin=None, highlighting=None, horizontal_alignment=None, vertical_alignment=None, signature=None): + """ + SignatureField - a model defined in Swagger + """ + + self._links = None + self._partial_name = None + self._rect = None + self._value = None + self._page_index = None + self._height = None + self._width = None + self._z_index = None + self._is_group = None + self._parent = None + self._is_shared_field = None + self._flags = None + self._color = None + self._contents = None + self._margin = None + self._highlighting = None + self._horizontal_alignment = None + self._vertical_alignment = None + self._signature = None + + if links is not None: + self.links = links + if partial_name is not None: + self.partial_name = partial_name + if rect is not None: + self.rect = rect + if value is not None: + self.value = value + self.page_index = page_index + if height is not None: + self.height = height + if width is not None: + self.width = width + if z_index is not None: + self.z_index = z_index + self.is_group = is_group + if parent is not None: + self.parent = parent + if is_shared_field is not None: + self.is_shared_field = is_shared_field + if flags is not None: + self.flags = flags + if color is not None: + self.color = color + if contents is not None: + self.contents = contents + if margin is not None: + self.margin = margin + if highlighting is not None: + self.highlighting = highlighting + if horizontal_alignment is not None: + self.horizontal_alignment = horizontal_alignment + if vertical_alignment is not None: + self.vertical_alignment = vertical_alignment + if signature is not None: + self.signature = signature + + @property + def links(self): + """ + Gets the links of this SignatureField. + Link to the document. + + :return: The links of this SignatureField. + :rtype: list[Link] + """ + return self._links + + @links.setter + def links(self, links): + """ + Sets the links of this SignatureField. + Link to the document. + + :param links: The links of this SignatureField. + :type: list[Link] + """ + + self._links = links + + @property + def partial_name(self): + """ + Gets the partial_name of this SignatureField. + Field name. + + :return: The partial_name of this SignatureField. + :rtype: str + """ + return self._partial_name + + @partial_name.setter + def partial_name(self, partial_name): + """ + Sets the partial_name of this SignatureField. + Field name. + + :param partial_name: The partial_name of this SignatureField. + :type: str + """ + + self._partial_name = partial_name + + @property + def rect(self): + """ + Gets the rect of this SignatureField. + Field rectangle. + + :return: The rect of this SignatureField. + :rtype: Rectangle + """ + return self._rect + + @rect.setter + def rect(self, rect): + """ + Sets the rect of this SignatureField. + Field rectangle. + + :param rect: The rect of this SignatureField. + :type: Rectangle + """ + + self._rect = rect + + @property + def value(self): + """ + Gets the value of this SignatureField. + Field value. + + :return: The value of this SignatureField. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this SignatureField. + Field value. + + :param value: The value of this SignatureField. + :type: str + """ + + self._value = value + + @property + def page_index(self): + """ + Gets the page_index of this SignatureField. + Page index. + + :return: The page_index of this SignatureField. + :rtype: int + """ + return self._page_index + + @page_index.setter + def page_index(self, page_index): + """ + Sets the page_index of this SignatureField. + Page index. + + :param page_index: The page_index of this SignatureField. + :type: int + """ + if page_index is None: + raise ValueError("Invalid value for `page_index`, must not be `None`") + + self._page_index = page_index + + @property + def height(self): + """ + Gets the height of this SignatureField. + Gets or sets height of the field. + + :return: The height of this SignatureField. + :rtype: float + """ + return self._height + + @height.setter + def height(self, height): + """ + Sets the height of this SignatureField. + Gets or sets height of the field. + + :param height: The height of this SignatureField. + :type: float + """ + + self._height = height + + @property + def width(self): + """ + Gets the width of this SignatureField. + Gets or sets width of the field. + + :return: The width of this SignatureField. + :rtype: float + """ + return self._width + + @width.setter + def width(self, width): + """ + Sets the width of this SignatureField. + Gets or sets width of the field. + + :param width: The width of this SignatureField. + :type: float + """ + + self._width = width + + @property + def z_index(self): + """ + Gets the z_index of this SignatureField. + Z index. + + :return: The z_index of this SignatureField. + :rtype: int + """ + return self._z_index + + @z_index.setter + def z_index(self, z_index): + """ + Sets the z_index of this SignatureField. + Z index. + + :param z_index: The z_index of this SignatureField. + :type: int + """ + + self._z_index = z_index + + @property + def is_group(self): + """ + Gets the is_group of this SignatureField. + Is group. + + :return: The is_group of this SignatureField. + :rtype: bool + """ + return self._is_group + + @is_group.setter + def is_group(self, is_group): + """ + Sets the is_group of this SignatureField. + Is group. + + :param is_group: The is_group of this SignatureField. + :type: bool + """ + if is_group is None: + raise ValueError("Invalid value for `is_group`, must not be `None`") + + self._is_group = is_group + + @property + def parent(self): + """ + Gets the parent of this SignatureField. + Gets field parent. + + :return: The parent of this SignatureField. + :rtype: FormField + """ + return self._parent + + @parent.setter + def parent(self, parent): + """ + Sets the parent of this SignatureField. + Gets field parent. + + :param parent: The parent of this SignatureField. + :type: FormField + """ + + self._parent = parent + + @property + def is_shared_field(self): + """ + Gets the is_shared_field of this SignatureField. + Property for Generator support. Used when field is added to header or footer. If true, this field will created once and it's appearance will be visible on all pages of the document. If false, separated field will be created for every document page. + + :return: The is_shared_field of this SignatureField. + :rtype: bool + """ + return self._is_shared_field + + @is_shared_field.setter + def is_shared_field(self, is_shared_field): + """ + Sets the is_shared_field of this SignatureField. + Property for Generator support. Used when field is added to header or footer. If true, this field will created once and it's appearance will be visible on all pages of the document. If false, separated field will be created for every document page. + + :param is_shared_field: The is_shared_field of this SignatureField. + :type: bool + """ + + self._is_shared_field = is_shared_field + + @property + def flags(self): + """ + Gets the flags of this SignatureField. + Gets Flags of the field. + + :return: The flags of this SignatureField. + :rtype: list[AnnotationFlags] + """ + return self._flags + + @flags.setter + def flags(self, flags): + """ + Sets the flags of this SignatureField. + Gets Flags of the field. + + :param flags: The flags of this SignatureField. + :type: list[AnnotationFlags] + """ + + self._flags = flags + + @property + def color(self): + """ + Gets the color of this SignatureField. + Color of the annotation. + + :return: The color of this SignatureField. + :rtype: Color + """ + return self._color + + @color.setter + def color(self, color): + """ + Sets the color of this SignatureField. + Color of the annotation. + + :param color: The color of this SignatureField. + :type: Color + """ + + self._color = color + + @property + def contents(self): + """ + Gets the contents of this SignatureField. + Get the field content. + + :return: The contents of this SignatureField. + :rtype: str + """ + return self._contents + + @contents.setter + def contents(self, contents): + """ + Sets the contents of this SignatureField. + Get the field content. + + :param contents: The contents of this SignatureField. + :type: str + """ + + self._contents = contents + + @property + def margin(self): + """ + Gets the margin of this SignatureField. + Gets or sets a outer margin for paragraph (for pdf generation) + + :return: The margin of this SignatureField. + :rtype: MarginInfo + """ + return self._margin + + @margin.setter + def margin(self, margin): + """ + Sets the margin of this SignatureField. + Gets or sets a outer margin for paragraph (for pdf generation) + + :param margin: The margin of this SignatureField. + :type: MarginInfo + """ + + self._margin = margin + + @property + def highlighting(self): + """ + Gets the highlighting of this SignatureField. + Field highlighting mode. + + :return: The highlighting of this SignatureField. + :rtype: LinkHighlightingMode + """ + return self._highlighting + + @highlighting.setter + def highlighting(self, highlighting): + """ + Sets the highlighting of this SignatureField. + Field highlighting mode. + + :param highlighting: The highlighting of this SignatureField. + :type: LinkHighlightingMode + """ + + self._highlighting = highlighting + + @property + def horizontal_alignment(self): + """ + Gets the horizontal_alignment of this SignatureField. + Gets HorizontalAlignment of the field. + + :return: The horizontal_alignment of this SignatureField. + :rtype: HorizontalAlignment + """ + return self._horizontal_alignment + + @horizontal_alignment.setter + def horizontal_alignment(self, horizontal_alignment): + """ + Sets the horizontal_alignment of this SignatureField. + Gets HorizontalAlignment of the field. + + :param horizontal_alignment: The horizontal_alignment of this SignatureField. + :type: HorizontalAlignment + """ + + self._horizontal_alignment = horizontal_alignment + + @property + def vertical_alignment(self): + """ + Gets the vertical_alignment of this SignatureField. + Gets VerticalAlignment of the field. + + :return: The vertical_alignment of this SignatureField. + :rtype: VerticalAlignment + """ + return self._vertical_alignment + + @vertical_alignment.setter + def vertical_alignment(self, vertical_alignment): + """ + Sets the vertical_alignment of this SignatureField. + Gets VerticalAlignment of the field. + + :param vertical_alignment: The vertical_alignment of this SignatureField. + :type: VerticalAlignment + """ + + self._vertical_alignment = vertical_alignment + + @property + def signature(self): + """ + Gets the signature of this SignatureField. + Gets signature object. This object contains signature data regarding public-key cryptographic standards. Classes PKCS1, PKCS7 and PKCS7Detached represent all supported types of signature objects. + + :return: The signature of this SignatureField. + :rtype: Signature + """ + return self._signature + + @signature.setter + def signature(self, signature): + """ + Sets the signature of this SignatureField. + Gets signature object. This object contains signature data regarding public-key cryptographic standards. Classes PKCS1, PKCS7 and PKCS7Detached represent all supported types of signature objects. + + :param signature: The signature of this SignatureField. + :type: Signature + """ + + self._signature = signature + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in 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 + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return 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, SignatureField): + 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/asposepdfcloud/models/signature_field_response.py b/asposepdfcloud/models/signature_field_response.py new file mode 100644 index 0000000..5abb588 --- /dev/null +++ b/asposepdfcloud/models/signature_field_response.py @@ -0,0 +1,199 @@ +# coding: utf-8 + +""" + Aspose.PDF Cloud API Reference + + + Copyright (c) 2019 Aspose.PDF Cloud + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + + + OpenAPI spec version: 3.0 + +""" + + +from pprint import pformat +from six import iteritems +import re + + +class SignatureFieldResponse(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 = { + 'code': 'int', + 'status': 'str', + 'field': 'SignatureField' + } + + attribute_map = { + 'code': 'Code', + 'status': 'Status', + 'field': 'Field' + } + + def __init__(self, code=None, status=None, field=None): + """ + SignatureFieldResponse - a model defined in Swagger + """ + + self._code = None + self._status = None + self._field = None + + self.code = code + if status is not None: + self.status = status + if field is not None: + self.field = field + + @property + def code(self): + """ + Gets the code of this SignatureFieldResponse. + Response status code. + + :return: The code of this SignatureFieldResponse. + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """ + Sets the code of this SignatureFieldResponse. + Response status code. + + :param code: The code of this SignatureFieldResponse. + :type: int + """ + if code is None: + raise ValueError("Invalid value for `code`, must not be `None`") + + self._code = code + + @property + def status(self): + """ + Gets the status of this SignatureFieldResponse. + Response status. + + :return: The status of this SignatureFieldResponse. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this SignatureFieldResponse. + Response status. + + :param status: The status of this SignatureFieldResponse. + :type: str + """ + + self._status = status + + @property + def field(self): + """ + Gets the field of this SignatureFieldResponse. + Signature field object + + :return: The field of this SignatureFieldResponse. + :rtype: SignatureField + """ + return self._field + + @field.setter + def field(self, field): + """ + Sets the field of this SignatureFieldResponse. + Signature field object + + :param field: The field of this SignatureFieldResponse. + :type: SignatureField + """ + + self._field = field + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in 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 + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return 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, SignatureFieldResponse): + 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/asposepdfcloud/models/signature_fields.py b/asposepdfcloud/models/signature_fields.py new file mode 100644 index 0000000..76abdac --- /dev/null +++ b/asposepdfcloud/models/signature_fields.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + Aspose.PDF Cloud API Reference + + + Copyright (c) 2019 Aspose.PDF Cloud + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + + + OpenAPI spec version: 3.0 + +""" + + +from pprint import pformat +from six import iteritems +import re + + +class SignatureFields(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 = { + 'links': 'list[Link]', + 'list': 'list[SignatureField]' + } + + attribute_map = { + 'links': 'Links', + 'list': 'List' + } + + def __init__(self, links=None, list=None): + """ + SignatureFields - a model defined in Swagger + """ + + self._links = None + self._list = None + + if links is not None: + self.links = links + if list is not None: + self.list = list + + @property + def links(self): + """ + Gets the links of this SignatureFields. + Link to the document. + + :return: The links of this SignatureFields. + :rtype: list[Link] + """ + return self._links + + @links.setter + def links(self, links): + """ + Sets the links of this SignatureFields. + Link to the document. + + :param links: The links of this SignatureFields. + :type: list[Link] + """ + + self._links = links + + @property + def list(self): + """ + Gets the list of this SignatureFields. + List of signature fields. + + :return: The list of this SignatureFields. + :rtype: list[SignatureField] + """ + return self._list + + @list.setter + def list(self, list): + """ + Sets the list of this SignatureFields. + List of signature fields. + + :param list: The list of this SignatureFields. + :type: list[SignatureField] + """ + + self._list = list + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in 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 + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return 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, SignatureFields): + 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/asposepdfcloud/models/signature_fields_response.py b/asposepdfcloud/models/signature_fields_response.py new file mode 100644 index 0000000..5954423 --- /dev/null +++ b/asposepdfcloud/models/signature_fields_response.py @@ -0,0 +1,199 @@ +# coding: utf-8 + +""" + Aspose.PDF Cloud API Reference + + + Copyright (c) 2019 Aspose.PDF Cloud + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + + + OpenAPI spec version: 3.0 + +""" + + +from pprint import pformat +from six import iteritems +import re + + +class SignatureFieldsResponse(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 = { + 'code': 'int', + 'status': 'str', + 'fields': 'SignatureFields' + } + + attribute_map = { + 'code': 'Code', + 'status': 'Status', + 'fields': 'Fields' + } + + def __init__(self, code=None, status=None, fields=None): + """ + SignatureFieldsResponse - a model defined in Swagger + """ + + self._code = None + self._status = None + self._fields = None + + self.code = code + if status is not None: + self.status = status + if fields is not None: + self.fields = fields + + @property + def code(self): + """ + Gets the code of this SignatureFieldsResponse. + Response status code. + + :return: The code of this SignatureFieldsResponse. + :rtype: int + """ + return self._code + + @code.setter + def code(self, code): + """ + Sets the code of this SignatureFieldsResponse. + Response status code. + + :param code: The code of this SignatureFieldsResponse. + :type: int + """ + if code is None: + raise ValueError("Invalid value for `code`, must not be `None`") + + self._code = code + + @property + def status(self): + """ + Gets the status of this SignatureFieldsResponse. + Response status. + + :return: The status of this SignatureFieldsResponse. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this SignatureFieldsResponse. + Response status. + + :param status: The status of this SignatureFieldsResponse. + :type: str + """ + + self._status = status + + @property + def fields(self): + """ + Gets the fields of this SignatureFieldsResponse. + Signature fields object + + :return: The fields of this SignatureFieldsResponse. + :rtype: SignatureFields + """ + return self._fields + + @fields.setter + def fields(self, fields): + """ + Sets the fields of this SignatureFieldsResponse. + Signature fields object + + :param fields: The fields of this SignatureFieldsResponse. + :type: SignatureFields + """ + + self._fields = fields + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in 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 + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return 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, SignatureFieldsResponse): + 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/asposepdfcloud/models/timestamp_settings.py b/asposepdfcloud/models/timestamp_settings.py new file mode 100644 index 0000000..8bf386f --- /dev/null +++ b/asposepdfcloud/models/timestamp_settings.py @@ -0,0 +1,170 @@ +# coding: utf-8 + +""" + Aspose.PDF Cloud API Reference + + + Copyright (c) 2019 Aspose.PDF Cloud + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + + + + OpenAPI spec version: 3.0 + +""" + + +from pprint import pformat +from six import iteritems +import re + + +class TimestampSettings(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 = { + 'server_url': 'str', + 'basic_auth_credentials': 'str' + } + + attribute_map = { + 'server_url': 'ServerUrl', + 'basic_auth_credentials': 'BasicAuthCredentials' + } + + def __init__(self, server_url=None, basic_auth_credentials=None): + """ + TimestampSettings - a model defined in Swagger + """ + + self._server_url = None + self._basic_auth_credentials = None + + if server_url is not None: + self.server_url = server_url + if basic_auth_credentials is not None: + self.basic_auth_credentials = basic_auth_credentials + + @property + def server_url(self): + """ + Gets the server_url of this TimestampSettings. + Gets/sets the timestamp server url. + + :return: The server_url of this TimestampSettings. + :rtype: str + """ + return self._server_url + + @server_url.setter + def server_url(self, server_url): + """ + Sets the server_url of this TimestampSettings. + Gets/sets the timestamp server url. + + :param server_url: The server_url of this TimestampSettings. + :type: str + """ + + self._server_url = server_url + + @property + def basic_auth_credentials(self): + """ + Gets the basic_auth_credentials of this TimestampSettings. + Gets/sets the basic authentication credentials, Username and password are combined into a string \"username:password\". + + :return: The basic_auth_credentials of this TimestampSettings. + :rtype: str + """ + return self._basic_auth_credentials + + @basic_auth_credentials.setter + def basic_auth_credentials(self, basic_auth_credentials): + """ + Sets the basic_auth_credentials of this TimestampSettings. + Gets/sets the basic authentication credentials, Username and password are combined into a string \"username:password\". + + :param basic_auth_credentials: The basic_auth_credentials of this TimestampSettings. + :type: str + """ + + self._basic_auth_credentials = basic_auth_credentials + + def to_dict(self): + """ + Returns the model properties as a dict + """ + result = {} + + for attr, _ in 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 + + return result + + def to_str(self): + """ + Returns the string representation of the model + """ + return 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, TimestampSettings): + 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/DocMDPAccessPermissionType.md b/docs/DocMDPAccessPermissionType.md new file mode 100644 index 0000000..879e177 --- /dev/null +++ b/docs/DocMDPAccessPermissionType.md @@ -0,0 +1,18 @@ +# DocMDPAccessPermissionType +The access permissions granted for this document. +Valid values are: +1 - No changes to the document are permitted; any change to the document invalidates the signature. +2 - Permitted changes are filling in forms, instantiating page templates, and signing; other changes invalidate the signature. +3 - Permitted changes are the same as for 2, as well as annotation creation, deletion, and modification; other changes invalidate the signature. + +## Enum +Name | Type | Value | Description +------------ | ------------- | ------------- | ------------- +**NOCHANGES** | **str** | "NoChanges" | No changes to the document are permitted; any change to the document invalidates the signature. +**FILLINGINFORMS** | **str** | "FillingInForms" | Permitted changes are filling in forms, instantiating page templates, and signing; other changes invalidate the signature. +**ANNOTATIONMODIFICATION** | **str** | "AnnotationModification" | Permitted changes are the same as for 2, as well as annotation creation, deletion, and modification; other changes invalidate the signature. + + +[[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/FormField.md b/docs/FormField.md new file mode 100644 index 0000000..eb40043 --- /dev/null +++ b/docs/FormField.md @@ -0,0 +1,28 @@ +# FormField +Provides form field. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**list[Link]**](Link.md) | Link to the document. | [optional] +**partial_name** | **str** | Field name. | [optional] +**rect** | [**Rectangle**](Rectangle.md) | Field rectangle. | [optional] +**value** | **str** | Field value. | [optional] +**page_index** | **int** | Page index. | +**height** | **float** | Gets or sets height of the field. | [optional] +**width** | **float** | Gets or sets width of the field. | [optional] +**z_index** | **int** | Z index. | [optional] +**is_group** | **bool** | Is group. | +**parent** | [**FormField**](FormField.md) | Gets field parent. | [optional] +**is_shared_field** | **bool** | Property for Generator support. Used when field is added to header or footer. If true, this field will created once and it's appearance will be visible on all pages of the document. If false, separated field will be created for every document page. | [optional] +**flags** | [**list[AnnotationFlags]**](AnnotationFlags.md) | Gets Flags of the field. | [optional] +**color** | [**Color**](Color.md) | Color of the annotation. | [optional] +**contents** | **str** | Get the field content. | [optional] +**margin** | [**MarginInfo**](MarginInfo.md) | Gets or sets a outer margin for paragraph (for pdf generation) | [optional] +**highlighting** | [**LinkHighlightingMode**](LinkHighlightingMode.md) | Field highlighting mode. | [optional] +**horizontal_alignment** | [**HorizontalAlignment**](HorizontalAlignment.md) | Gets HorizontalAlignment of the field. | [optional] +**vertical_alignment** | [**VerticalAlignment**](VerticalAlignment.md) | Gets VerticalAlignment of the field. | [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/PdfApi.md b/docs/PdfApi.md index c27e4d6..7f40a15 100644 --- a/docs/PdfApi.md +++ b/docs/PdfApi.md @@ -55,6 +55,7 @@ Method | HTTP request | Description [**get_document_property**](PdfApi.md#get_document_property) | **GET** /pdf/\{name}/documentproperties/\{propertyName} | Read document property by name. [**get_document_redaction_annotations**](PdfApi.md#get_document_redaction_annotations) | **GET** /pdf/\{name}/annotations/redaction | Read document redaction annotations. [**get_document_screen_annotations**](PdfApi.md#get_document_screen_annotations) | **GET** /pdf/\{name}/annotations/screen | Read document screen annotations. +[**get_document_signature_fields**](PdfApi.md#get_document_signature_fields) | **GET** /pdf/\{name}/fields/signature | Read document signature fields. [**get_document_sound_annotations**](PdfApi.md#get_document_sound_annotations) | **GET** /pdf/\{name}/annotations/sound | Read document sound annotations. [**get_document_square_annotations**](PdfApi.md#get_document_square_annotations) | **GET** /pdf/\{name}/annotations/square | Read document square annotations. [**get_document_squiggly_annotations**](PdfApi.md#get_document_squiggly_annotations) | **GET** /pdf/\{name}/annotations/squiggly | Read document squiggly annotations. @@ -91,6 +92,7 @@ Method | HTTP request | Description [**get_la_te_x_in_storage_to_pdf**](PdfApi.md#get_la_te_x_in_storage_to_pdf) | **GET** /pdf/create/latex | Convert LaTeX file (located on storage) to PDF format and return resulting file in response. [**get_line_annotation**](PdfApi.md#get_line_annotation) | **GET** /pdf/\{name}/annotations/line/\{annotationId} | Read document page line annotation by ID. [**get_link_annotation**](PdfApi.md#get_link_annotation) | **GET** /pdf/\{name}/links/\{linkId} | Read document link annotation by ID. +[**get_markdown_in_storage_to_pdf**](PdfApi.md#get_markdown_in_storage_to_pdf) | **GET** /pdf/create/markdown | Convert MD file (located on storage) to PDF format and return resulting file in response. [**get_mht_in_storage_to_pdf**](PdfApi.md#get_mht_in_storage_to_pdf) | **GET** /pdf/create/mht | Convert MHT file (located on storage) to PDF format and return resulting file in response. [**get_movie_annotation**](PdfApi.md#get_movie_annotation) | **GET** /pdf/\{name}/annotations/movie/\{annotationId} | Read document page movie annotation by ID. [**get_page**](PdfApi.md#get_page) | **GET** /pdf/\{name}/pages/\{pageNumber} | Read document page info. @@ -116,6 +118,7 @@ Method | HTTP request | Description [**get_page_popup_annotations**](PdfApi.md#get_page_popup_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/popup | Read document page popup annotations. [**get_page_redaction_annotations**](PdfApi.md#get_page_redaction_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/redaction | Read document page redaction annotations. [**get_page_screen_annotations**](PdfApi.md#get_page_screen_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/screen | Read document page screen annotations. +[**get_page_signature_fields**](PdfApi.md#get_page_signature_fields) | **GET** /pdf/\{name}/page/\{pageNumber}/fields/signature | Read document page signature fields. [**get_page_sound_annotations**](PdfApi.md#get_page_sound_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/sound | Read document page sound annotations. [**get_page_square_annotations**](PdfApi.md#get_page_square_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/square | Read document page square annotations. [**get_page_squiggly_annotations**](PdfApi.md#get_page_squiggly_annotations) | **GET** /pdf/\{name}/pages/\{pageNumber}/annotations/squiggly | Read document page squiggly annotations. @@ -148,6 +151,7 @@ Method | HTTP request | Description [**get_redaction_annotation**](PdfApi.md#get_redaction_annotation) | **GET** /pdf/\{name}/annotations/redaction/\{annotationId} | Read document page redaction annotation by ID. [**get_screen_annotation**](PdfApi.md#get_screen_annotation) | **GET** /pdf/\{name}/annotations/screen/\{annotationId} | Read document page screen annotation by ID. [**get_screen_annotation_data**](PdfApi.md#get_screen_annotation_data) | **GET** /pdf/\{name}/annotations/screen/\{annotationId}/data | Read document page screen annotation by ID. +[**get_signature_field**](PdfApi.md#get_signature_field) | **GET** /pdf/\{name}/fields/signature/\{fieldName} | Read document signature field by name. [**get_sound_annotation**](PdfApi.md#get_sound_annotation) | **GET** /pdf/\{name}/annotations/sound/\{annotationId} | Read document page sound annotation by ID. [**get_sound_annotation_data**](PdfApi.md#get_sound_annotation_data) | **GET** /pdf/\{name}/annotations/sound/\{annotationId}/data | Read document page sound annotation by ID. [**get_square_annotation**](PdfApi.md#get_square_annotation) | **GET** /pdf/\{name}/annotations/square/\{annotationId} | Read document page square annotation by ID. @@ -190,6 +194,7 @@ Method | HTTP request | Description [**post_move_page**](PdfApi.md#post_move_page) | **POST** /pdf/\{name}/pages/\{pageNumber}/movePage | Move page to new position. [**post_optimize_document**](PdfApi.md#post_optimize_document) | **POST** /pdf/\{name}/optimize | Optimize document. [**post_page_caret_annotations**](PdfApi.md#post_page_caret_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/caret | Add document page caret annotations. +[**post_page_certify**](PdfApi.md#post_page_certify) | **POST** /pdf/\{name}/pages/\{pageNumber}/certify | Certify document page. [**post_page_circle_annotations**](PdfApi.md#post_page_circle_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/circle | Add document page circle annotations. [**post_page_file_attachment_annotations**](PdfApi.md#post_page_file_attachment_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/fileattachment | Add document page FileAttachment annotations. [**post_page_free_text_annotations**](PdfApi.md#post_page_free_text_annotations) | **POST** /pdf/\{name}/pages/\{pageNumber}/annotations/freetext | Add document page free text annotations. @@ -254,6 +259,7 @@ Method | HTTP request | Description [**put_la_te_x_in_storage_to_pdf**](PdfApi.md#put_la_te_x_in_storage_to_pdf) | **PUT** /pdf/\{name}/create/latex | Convert LaTeX file (located on storage) to PDF format and upload resulting file to storage. [**put_line_annotation**](PdfApi.md#put_line_annotation) | **PUT** /pdf/\{name}/annotations/line/\{annotationId} | Replace document line annotation [**put_link_annotation**](PdfApi.md#put_link_annotation) | **PUT** /pdf/\{name}/links/\{linkId} | Replace document page link annotations +[**put_markdown_in_storage_to_pdf**](PdfApi.md#put_markdown_in_storage_to_pdf) | **PUT** /pdf/\{name}/create/markdown | Convert MD file (located on storage) to PDF format and upload resulting file to storage. [**put_merge_documents**](PdfApi.md#put_merge_documents) | **PUT** /pdf/\{name}/merge | Merge a list of documents. [**put_mht_in_storage_to_pdf**](PdfApi.md#put_mht_in_storage_to_pdf) | **PUT** /pdf/\{name}/create/mht | Convert MHT file (located on storage) to PDF format and upload resulting file to storage. [**put_movie_annotation**](PdfApi.md#put_movie_annotation) | **PUT** /pdf/\{name}/annotations/movie/\{annotationId} | Replace document movie annotation @@ -1569,6 +1575,30 @@ 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) +# **get_document_signature_fields** +> SignatureFieldsResponse get_document_signature_fields(name, storage=storage, folder=folder) + +Read document signature fields. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The document name. | + **storage** | **str**| The document storage. | [optional] + **folder** | **str**| The document folder. | [optional] + +### Return type + +[**SignatureFieldsResponse**](SignatureFieldsResponse.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) + # **get_document_sound_annotations** > SoundAnnotationsResponse get_document_sound_annotations(name, storage=storage, folder=folder) @@ -2462,6 +2492,29 @@ 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) +# **get_markdown_in_storage_to_pdf** +> file get_markdown_in_storage_to_pdf(src_path, storage=storage) + +Convert MD file (located on storage) to PDF format and return resulting file in response. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **src_path** | **str**| Full source filename (ex. /folder1/folder2/template.md) | + **storage** | **str**| The document storage. | [optional] + +### Return type + +**file** + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: multipart/form-data + +[[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) + # **get_mht_in_storage_to_pdf** > file get_mht_in_storage_to_pdf(src_path, storage=storage) @@ -3098,6 +3151,31 @@ 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) +# **get_page_signature_fields** +> SignatureFieldsResponse get_page_signature_fields(name, page_number, storage=storage, folder=folder) + +Read document page signature fields. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The document name. | + **page_number** | **int**| The page number. | + **storage** | **str**| The document storage. | [optional] + **folder** | **str**| The document folder. | [optional] + +### Return type + +[**SignatureFieldsResponse**](SignatureFieldsResponse.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) + # **get_page_sound_annotations** > SoundAnnotationsResponse get_page_sound_annotations(name, page_number, storage=storage, folder=folder) @@ -3952,6 +4030,31 @@ 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) +# **get_signature_field** +> SignatureFieldResponse get_signature_field(name, field_name, storage=storage, folder=folder) + +Read document signature field by name. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The document name. | + **field_name** | **str**| The field name. | + **storage** | **str**| The document storage. | [optional] + **folder** | **str**| The document folder. | [optional] + +### Return type + +[**SignatureFieldResponse**](SignatureFieldResponse.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) + # **get_sound_annotation** > SoundAnnotationResponse get_sound_annotation(name, annotation_id, storage=storage, folder=folder) @@ -5042,6 +5145,33 @@ 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_page_certify** +> AsposeResponse post_page_certify(name, page_number, sign, doc_mdp_access_permission_type, storage=storage, folder=folder) + +Certify document page. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The document name. | + **page_number** | **int**| The page number. | + **sign** | [**Signature**](Signature.md)| Signature object containing signature data. | + **doc_mdp_access_permission_type** | **str**| The access permissions granted for this document. | + **storage** | **str**| The document storage. | [optional] + **folder** | **str**| The document folder. | [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_page_circle_annotations** > AsposeResponse post_page_circle_annotations(name, page_number, annotations, storage=storage, folder=folder) @@ -6718,6 +6848,31 @@ 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) +# **put_markdown_in_storage_to_pdf** +> AsposeResponse put_markdown_in_storage_to_pdf(name, src_path, storage=storage, dst_folder=dst_folder) + +Convert MD file (located on storage) to PDF format and upload resulting file to storage. + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **str**| The document name. | + **src_path** | **str**| Full source filename (ex. /folder1/folder2/template.md) | + **storage** | **str**| The document storage. | [optional] + **dst_folder** | **str**| The destination document folder. | [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) + # **put_merge_documents** > DocumentResponse put_merge_documents(name, merge_documents, storage=storage, folder=folder) diff --git a/docs/Signature.md b/docs/Signature.md index bed8176..d520680 100644 --- a/docs/Signature.md +++ b/docs/Signature.md @@ -17,6 +17,9 @@ Name | Type | Description | Notes **authority** | **str** | Gets or sets the name of the person or authority signing the document.. | [optional] **date** | **str** | Gets or sets the time of signing. | [optional] **show_properties** | **bool** | Gets or sets the showproperties in signature field | +**timestamp_settings** | [**TimestampSettings**](TimestampSettings.md) | Gets/sets timestamp settings. | [optional] +**is_valid** | **bool** | Verify the document regarding this signature and return true if document is valid or otherwise false. | [optional] +**custom_appearance** | [**SignatureCustomAppearance**](SignatureCustomAppearance.md) | Gets/sets the custom appearance. | [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/SignatureCustomAppearance.md b/docs/SignatureCustomAppearance.md new file mode 100644 index 0000000..4da7c41 --- /dev/null +++ b/docs/SignatureCustomAppearance.md @@ -0,0 +1,22 @@ +# SignatureCustomAppearance +An abstract class which represents signature custon appearance object. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**font_family_name** | **str** | Gets/sets font family name. It should be existed in the document. Default value: Arial. | [optional] +**font_size** | **float** | Gets/sets font size. Default value: 10. | +**show_contact_info** | **bool** | Gets/sets contact info visibility. Default value: true. | +**show_reason** | **bool** | Gets/sets reason visibility. Default value: true. | +**show_location** | **bool** | Gets/sets location visibility. Default value: true. | +**contact_info_label** | **str** | Gets/sets contact info label. Default value: "Contact". | [optional] +**reason_label** | **str** | Gets/sets reason label. Default value: "Reason". | [optional] +**location_label** | **str** | Gets/sets location label. Default value: "Location". | [optional] +**digital_signed_label** | **str** | Gets/sets digital signed label. Default value: "Digitally signed by". | [optional] +**date_signed_at_label** | **str** | Gets/sets date signed label. Default value: "Date". | [optional] +**date_time_local_format** | **str** | Gets/sets datetime local format. Default value: "yyyy.MM.dd HH:mm:ss zzz". | [optional] +**date_time_format** | **str** | Gets/sets datetime format. Default value: "yyyy.MM.dd HH:mm:ss". | [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/SignatureField.md b/docs/SignatureField.md new file mode 100644 index 0000000..5fb642e --- /dev/null +++ b/docs/SignatureField.md @@ -0,0 +1,29 @@ +# SignatureField +Provides SignatureField. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**list[Link]**](Link.md) | Link to the document. | [optional] +**partial_name** | **str** | Field name. | [optional] +**rect** | [**Rectangle**](Rectangle.md) | Field rectangle. | [optional] +**value** | **str** | Field value. | [optional] +**page_index** | **int** | Page index. | +**height** | **float** | Gets or sets height of the field. | [optional] +**width** | **float** | Gets or sets width of the field. | [optional] +**z_index** | **int** | Z index. | [optional] +**is_group** | **bool** | Is group. | +**parent** | [**FormField**](FormField.md) | Gets field parent. | [optional] +**is_shared_field** | **bool** | Property for Generator support. Used when field is added to header or footer. If true, this field will created once and it's appearance will be visible on all pages of the document. If false, separated field will be created for every document page. | [optional] +**flags** | [**list[AnnotationFlags]**](AnnotationFlags.md) | Gets Flags of the field. | [optional] +**color** | [**Color**](Color.md) | Color of the annotation. | [optional] +**contents** | **str** | Get the field content. | [optional] +**margin** | [**MarginInfo**](MarginInfo.md) | Gets or sets a outer margin for paragraph (for pdf generation) | [optional] +**highlighting** | [**LinkHighlightingMode**](LinkHighlightingMode.md) | Field highlighting mode. | [optional] +**horizontal_alignment** | [**HorizontalAlignment**](HorizontalAlignment.md) | Gets HorizontalAlignment of the field. | [optional] +**vertical_alignment** | [**VerticalAlignment**](VerticalAlignment.md) | Gets VerticalAlignment of the field. | [optional] +**signature** | [**Signature**](Signature.md) | Gets signature object. This object contains signature data regarding public-key cryptographic standards. Classes PKCS1, PKCS7 and PKCS7Detached represent all supported types of signature objects. | [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/SignatureFieldResponse.md b/docs/SignatureFieldResponse.md new file mode 100644 index 0000000..a2e351d --- /dev/null +++ b/docs/SignatureFieldResponse.md @@ -0,0 +1,13 @@ +# SignatureFieldResponse +Represents response containing single signature field object + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Response status code. | +**status** | **str** | Response status. | [optional] +**field** | [**SignatureField**](SignatureField.md) | Signature field object | [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/SignatureFields.md b/docs/SignatureFields.md new file mode 100644 index 0000000..d1cbeb6 --- /dev/null +++ b/docs/SignatureFields.md @@ -0,0 +1,12 @@ +# SignatureFields +Object representing a list of signature fields. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**list[Link]**](Link.md) | Link to the document. | [optional] +**list** | [**list[SignatureField]**](SignatureField.md) | List of signature fields. | [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/SignatureFieldsResponse.md b/docs/SignatureFieldsResponse.md new file mode 100644 index 0000000..20bc053 --- /dev/null +++ b/docs/SignatureFieldsResponse.md @@ -0,0 +1,13 @@ +# SignatureFieldsResponse +Represents response containing multiple signature field objects + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **int** | Response status code. | +**status** | **str** | Response status. | [optional] +**fields** | [**SignatureFields**](SignatureFields.md) | Signature fields object | [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/TimestampSettings.md b/docs/TimestampSettings.md new file mode 100644 index 0000000..a1f8b65 --- /dev/null +++ b/docs/TimestampSettings.md @@ -0,0 +1,12 @@ +# TimestampSettings +Represents the ocsp settings using during signing process. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**server_url** | **str** | Gets/sets the timestamp server url. | [optional] +**basic_auth_credentials** | **str** | Gets/sets the basic authentication credentials, Username and password are combined into a string "username:password". | [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/setup.py b/setup.py index 7ab8ce3..fe1fc59 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ from setuptools import setup, find_packages NAME = "asposepdfcloud" -VERSION = "19.7.0" +VERSION = "19.8.0" # To install the library, run the following # # python setup.py install diff --git a/test/pdf_tests.py b/test/pdf_tests.py index e1589d9..282d0bc 100644 --- a/test/pdf_tests.py +++ b/test/pdf_tests.py @@ -3096,7 +3096,27 @@ def testPutImageInStorageToPdf(self): response = self.pdf_api.put_image_in_storage_to_pdf(result_name, image_templates_request, **opts) self.assertEqual(response.code, 200) - + def testGetMarkdownInStorageToPdf(self): + file_name = 'mixed.md' + self.uploadFile(file_name) + + src_path = self.temp_folder + '/' + file_name + response = self.pdf_api.get_markdown_in_storage_to_pdf(src_path) + self.assertIsInstance(response, str) + + + def testPutMarkdownInStorageToPdf(self): + file_name = 'mixed.md' + self.uploadFile(file_name) + result_name = 'fromMd.pdf' + + src_path = self.temp_folder + '/' + file_name + opts = { + "dst_folder" : self.temp_folder + } + response = self.pdf_api.put_markdown_in_storage_to_pdf(result_name, src_path, **opts) + self.assertEqual(response.code, 200) + # Document Tests def testGetDocument(self): @@ -3281,6 +3301,39 @@ def testPutFieldsFlatten(self): response = self.pdf_api.put_fields_flatten(file_name, **opts) self.assertEqual(response.code, 200) + def testGetDocumentSignatureFields(self): + file_name = 'adbe.x509.rsa_sha1.valid.pdf' + self.uploadFile(file_name) + + opts = { + "folder" : self.temp_folder + } + + response = self.pdf_api.get_document_signature_fields(file_name, **opts) + self.assertEqual(response.code, 200) + + def testGetPageSignatureFields(self): + file_name = 'adbe.x509.rsa_sha1.valid.pdf' + self.uploadFile(file_name) + page_number = 1 + opts = { + "folder" : self.temp_folder + } + + response = self.pdf_api.get_page_signature_fields(file_name, page_number, **opts) + self.assertEqual(response.code, 200) + + def testGetSignatureField(self): + file_name = 'adbe.x509.rsa_sha1.valid.pdf' + self.uploadFile(file_name) + field_name = 'Signature1' + opts = { + "folder" : self.temp_folder + } + + response = self.pdf_api.get_signature_field(file_name, field_name, **opts) + self.assertEqual(response.code, 200) + # Images Tests def testGetImage(self): @@ -4223,6 +4276,36 @@ def testGetVerifySignature(self): response = self.pdf_api.get_verify_signature(file_name, signature.form_field_name, **opts) self.assertEqual(response.code, 200) + def testPostPageCertify(self): + file_name = '4pages.pdf' + self.uploadFile(file_name) + + signature_file_name = '33226.p12' + self.uploadFile(signature_file_name) + + page_number = 1 + permission_type = asposepdfcloud.models.DocMDPAccessPermissionType.NOCHANGES + rectangle = asposepdfcloud.models.Rectangle(100, 100, 500, 500) + + signature = asposepdfcloud.models.Signature( + signature_path=self.temp_folder + '/' + signature_file_name, + signature_type=asposepdfcloud.models.SignatureType.PKCS7, + password='sIikZSmz', + contact='testself.mail.ru', + location='Ukraine', + visible=True, + rectangle=rectangle, + form_field_name='Signature1', + authority='Sergey Smal', + date='08/01/2012 12:15:00.000 PM', + show_properties=False) + + opts = { + "folder" : self.temp_folder + } + + response = self.pdf_api.post_page_certify(file_name, page_number, signature, permission_type, **opts) + self.assertEqual(response.code, 200) # Encrypt Decrypt Tests diff --git a/test_data/33226.p12 b/test_data/33226.p12 new file mode 100644 index 0000000..59322b0 Binary files /dev/null and b/test_data/33226.p12 differ diff --git a/test_data/adbe.x509.rsa_sha1.valid.pdf b/test_data/adbe.x509.rsa_sha1.valid.pdf new file mode 100644 index 0000000..31ff5b5 Binary files /dev/null and b/test_data/adbe.x509.rsa_sha1.valid.pdf differ diff --git a/test_data/mixed.md b/test_data/mixed.md new file mode 100644 index 0000000..f4c75eb --- /dev/null +++ b/test_data/mixed.md @@ -0,0 +1,14 @@ +### *Lorem Ipsum* ### + +Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam eaque ipsa, quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt, explicabo. +>Nemo enim ipsam voluptatem, quia voluptas sit, aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos, +>>qui ratione voluptatem sequi nesciunt, neque porro quisquam est, qui dolorem ipsum, quia dolor sit, amet, consectetur, adipisci velit, sed quia non +numquam eius modi tempora incidunt, ut labore et dolore magnam aliquam quaerat voluptatem. +>Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? +---- +* *One* +* **Two** +* ***Three*** +**** +[ ![Microsoft](https://www.aspose.cloud/templates/aspose/App_Themes/V3/images/customers/microsoft.png) ](https://daringfireball.net/projects/markdown/syntax) +Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, `quam nihil molestiae consequatur,` vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur? At vero eos et accusamus et iusto odio dignissimos ducimus, qui blanditiis praesentium voluptatum deleniti atque corrupti, quos dolores et quas molestias excepturi sint, obcaecati cupiditate non provident, similique sunt in culpa, qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio, cumque nihil impedit, quo minus id, quod maxime placeat, facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet, ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. \ No newline at end of file