@@ -25105,6 +25105,253 @@ def post_optimize_document_with_http_info(self, name, options, **kwargs):
2510525105 _request_timeout=params.get('_request_timeout'),
2510625106 collection_formats=collection_formats)
2510725107
25108+ def post_organize_document(self, name, pages, out_path, **kwargs):
25109+ """
25110+ Merge selected pages of a document.
25111+ This method makes a synchronous HTTP request by default. To make an
25112+ asynchronous HTTP request, please define a `callback` function
25113+ to be invoked when receiving the response.
25114+ >>> def callback_function(response):
25115+ >>> pprint(response)
25116+ >>>
25117+ >>> thread = api.post_organize_document(name, pages, out_path, callback=callback_function)
25118+
25119+ :param callback function: The callback function
25120+ for asynchronous request. (optional)
25121+ :param str name: The original document name. (required)
25122+ :param str pages: 1-based page numbers of the source document that make up the resulting document. (required)
25123+ :param str out_path: Full filename of the resulting document. (required)
25124+ :param str storage: The documents storage.
25125+ :param str folder: The source document folder.
25126+ :return: AsposeResponse
25127+ If the method is called asynchronously,
25128+ returns the request thread.
25129+ """
25130+ kwargs['_return_http_data_only'] = True
25131+ if kwargs.get('callback'):
25132+ return self.post_organize_document_with_http_info(name, pages, out_path, **kwargs)
25133+ else:
25134+ (data) = self.post_organize_document_with_http_info(name, pages, out_path, **kwargs)
25135+ return data
25136+
25137+ def post_organize_document_with_http_info(self, name, pages, out_path, **kwargs):
25138+ """
25139+ Merge selected pages of a document.
25140+ This method makes a synchronous HTTP request by default. To make an
25141+ asynchronous HTTP request, please define a `callback` function
25142+ to be invoked when receiving the response.
25143+ >>> def callback_function(response):
25144+ >>> pprint(response)
25145+ >>>
25146+ >>> thread = api.post_organize_document_with_http_info(name, pages, out_path, callback=callback_function)
25147+
25148+ :param callback function: The callback function
25149+ for asynchronous request. (optional)
25150+ :param str name: The original document name. (required)
25151+ :param str pages: 1-based page numbers of the source document that make up the resulting document. (required)
25152+ :param str out_path: Full filename of the resulting document. (required)
25153+ :param str storage: The documents storage.
25154+ :param str folder: The source document folder.
25155+ :return: AsposeResponse
25156+ If the method is called asynchronously,
25157+ returns the request thread.
25158+ """
25159+
25160+ all_params = ['name', 'pages', 'out_path', 'storage', 'folder']
25161+ all_params.append('callback')
25162+ all_params.append('_return_http_data_only')
25163+ all_params.append('_preload_content')
25164+ all_params.append('_request_timeout')
25165+
25166+ params = locals()
25167+ for key, val in iteritems(params['kwargs']):
25168+ if key not in all_params:
25169+ raise TypeError(
25170+ "Got an unexpected keyword argument '%s'"
25171+ " to method post_organize_document" % key
25172+ )
25173+ params[key] = val
25174+ del params['kwargs']
25175+ # verify the required parameter 'name' is set
25176+ if ('name' not in params) or (params['name'] is None):
25177+ raise ValueError("Missing the required parameter `name` when calling `post_organize_document`")
25178+ # verify the required parameter 'pages' is set
25179+ if ('pages' not in params) or (params['pages'] is None):
25180+ raise ValueError("Missing the required parameter `pages` when calling `post_organize_document`")
25181+ # verify the required parameter 'out_path' is set
25182+ if ('out_path' not in params) or (params['out_path'] is None):
25183+ raise ValueError("Missing the required parameter `out_path` when calling `post_organize_document`")
25184+
25185+ if 'pages' in params and len(params['pages']) < 1:
25186+ raise ValueError("Invalid value for parameter `pages` when calling `post_organize_document`, length must be greater than or equal to `1`")
25187+ if 'out_path' in params and len(params['out_path']) < 1:
25188+ raise ValueError("Invalid value for parameter `out_path` when calling `post_organize_document`, length must be greater than or equal to `1`")
25189+
25190+ collection_formats = {}
25191+
25192+ path_params = {}
25193+ if 'name' in params:
25194+ path_params['name'] = params['name']
25195+
25196+ query_params = []
25197+ if 'pages' in params:
25198+ query_params.append(('pages', params['pages']))
25199+ if 'out_path' in params:
25200+ query_params.append(('outPath', params['out_path']))
25201+ if 'storage' in params:
25202+ query_params.append(('storage', params['storage']))
25203+ if 'folder' in params:
25204+ query_params.append(('folder', params['folder']))
25205+
25206+ header_params = {}
25207+
25208+ form_params = []
25209+ local_var_files = {}
25210+
25211+ body_params = None
25212+ # HTTP header `Accept`
25213+ header_params['Accept'] = self.api_client.\
25214+ select_header_accept(['application/json'])
25215+
25216+ # HTTP header `Content-Type`
25217+ header_params['Content-Type'] = self.api_client.\
25218+ select_header_content_type(['application/json'])
25219+
25220+ # Authentication setting
25221+ auth_settings = ['JWT']
25222+
25223+ return self.api_client.call_api('/pdf/{name}/organize', 'POST',
25224+ path_params,
25225+ query_params,
25226+ header_params,
25227+ body=body_params,
25228+ post_params=form_params,
25229+ files=local_var_files,
25230+ response_type='AsposeResponse',
25231+ auth_settings=auth_settings,
25232+ callback=params.get('callback'),
25233+ _return_http_data_only=params.get('_return_http_data_only'),
25234+ _preload_content=params.get('_preload_content', True),
25235+ _request_timeout=params.get('_request_timeout'),
25236+ collection_formats=collection_formats)
25237+
25238+ def post_organize_documents(self, organize_documents, out_path, **kwargs):
25239+ """
25240+ Merge selected pages of different documents.
25241+ This method makes a synchronous HTTP request by default. To make an
25242+ asynchronous HTTP request, please define a `callback` function
25243+ to be invoked when receiving the response.
25244+ >>> def callback_function(response):
25245+ >>> pprint(response)
25246+ >>>
25247+ >>> thread = api.post_organize_documents(organize_documents, out_path, callback=callback_function)
25248+
25249+ :param callback function: The callback function
25250+ for asynchronous request. (optional)
25251+ :param OrganizeDocumentRequest organize_documents: Array of OrganizeDocumentData to make up the resulting document. (required)
25252+ :param str out_path: Full filename of the resulting document. (required)
25253+ :param str storage: The documents storage.
25254+ :return: AsposeResponse
25255+ If the method is called asynchronously,
25256+ returns the request thread.
25257+ """
25258+ kwargs['_return_http_data_only'] = True
25259+ if kwargs.get('callback'):
25260+ return self.post_organize_documents_with_http_info(organize_documents, out_path, **kwargs)
25261+ else:
25262+ (data) = self.post_organize_documents_with_http_info(organize_documents, out_path, **kwargs)
25263+ return data
25264+
25265+ def post_organize_documents_with_http_info(self, organize_documents, out_path, **kwargs):
25266+ """
25267+ Merge selected pages of different documents.
25268+ This method makes a synchronous HTTP request by default. To make an
25269+ asynchronous HTTP request, please define a `callback` function
25270+ to be invoked when receiving the response.
25271+ >>> def callback_function(response):
25272+ >>> pprint(response)
25273+ >>>
25274+ >>> thread = api.post_organize_documents_with_http_info(organize_documents, out_path, callback=callback_function)
25275+
25276+ :param callback function: The callback function
25277+ for asynchronous request. (optional)
25278+ :param OrganizeDocumentRequest organize_documents: Array of OrganizeDocumentData to make up the resulting document. (required)
25279+ :param str out_path: Full filename of the resulting document. (required)
25280+ :param str storage: The documents storage.
25281+ :return: AsposeResponse
25282+ If the method is called asynchronously,
25283+ returns the request thread.
25284+ """
25285+
25286+ all_params = ['organize_documents', 'out_path', 'storage']
25287+ all_params.append('callback')
25288+ all_params.append('_return_http_data_only')
25289+ all_params.append('_preload_content')
25290+ all_params.append('_request_timeout')
25291+
25292+ params = locals()
25293+ for key, val in iteritems(params['kwargs']):
25294+ if key not in all_params:
25295+ raise TypeError(
25296+ "Got an unexpected keyword argument '%s'"
25297+ " to method post_organize_documents" % key
25298+ )
25299+ params[key] = val
25300+ del params['kwargs']
25301+ # verify the required parameter 'organize_documents' is set
25302+ if ('organize_documents' not in params) or (params['organize_documents'] is None):
25303+ raise ValueError("Missing the required parameter `organize_documents` when calling `post_organize_documents`")
25304+ # verify the required parameter 'out_path' is set
25305+ if ('out_path' not in params) or (params['out_path'] is None):
25306+ raise ValueError("Missing the required parameter `out_path` when calling `post_organize_documents`")
25307+
25308+ if 'out_path' in params and len(params['out_path']) < 1:
25309+ raise ValueError("Invalid value for parameter `out_path` when calling `post_organize_documents`, length must be greater than or equal to `1`")
25310+
25311+ collection_formats = {}
25312+
25313+ path_params = {}
25314+
25315+ query_params = []
25316+ if 'out_path' in params:
25317+ query_params.append(('outPath', params['out_path']))
25318+ if 'storage' in params:
25319+ query_params.append(('storage', params['storage']))
25320+
25321+ header_params = {}
25322+
25323+ form_params = []
25324+ local_var_files = {}
25325+
25326+ body_params = None
25327+ if 'organize_documents' in params:
25328+ body_params = params['organize_documents']
25329+ # HTTP header `Accept`
25330+ header_params['Accept'] = self.api_client.\
25331+ select_header_accept(['application/json'])
25332+
25333+ # HTTP header `Content-Type`
25334+ header_params['Content-Type'] = self.api_client.\
25335+ select_header_content_type(['application/json'])
25336+
25337+ # Authentication setting
25338+ auth_settings = ['JWT']
25339+
25340+ return self.api_client.call_api('/pdf/organize', 'POST',
25341+ path_params,
25342+ query_params,
25343+ header_params,
25344+ body=body_params,
25345+ post_params=form_params,
25346+ files=local_var_files,
25347+ response_type='AsposeResponse',
25348+ auth_settings=auth_settings,
25349+ callback=params.get('callback'),
25350+ _return_http_data_only=params.get('_return_http_data_only'),
25351+ _preload_content=params.get('_preload_content', True),
25352+ _request_timeout=params.get('_request_timeout'),
25353+ collection_formats=collection_formats)
25354+
2510825355 def post_page_caret_annotations(self, name, page_number, annotations, **kwargs):
2510925356 """
2511025357 Add document page caret annotations.
0 commit comments