Preprocess
| Description | Returns essential information about the document, that needed to proceed with opening. This API is designed to optimize opening documents, and to get all the required information of the document with a single call. | |||||||||
| Method Type | POST | |||||||||
| URL | api/document/preprocess | |||||||||
| Parameters |
|
|||||||||
| Response Type | JSON (JsonResult) | |||||||||
| Return values |
{ exists (Bool ) type ( FileType ) pages ( Int ) [Number of pages] } |
Programming notes
None
Example
| JavaScript Example |
|
function PreProcess(documentID) { return new Promise((resolve, reject) => { $.ajax({ type: "POST", url: API_Preprocess, cache: false, data: { DocumentID: documentID, CE: _getContentEngine() }, success: function (result) { resolve(result); }, error: function (xhr, textStatus, message) { resolve(false); } }); }); } PreProcess(documentID).then(result => { if (!result.exists) { // document does not exist, optionally display an error resolve(false); return; } let type = result.type; let numOfPages = result.pages; }) |
Requirements
