GetPage
| Description | Returns with the base64 string of a document page with the specified Content-Engine. | ||||||||||||
| Method Type | POST | ||||||||||||
| URL | api/document/page | ||||||||||||
| Parameters |
|
||||||||||||
| Response Type | JSON (JsonResult) | ||||||||||||
| Return values |
{ base64 (String) [Base64 image of page] annotations (String) [Serialized Object] settings (PageInfo Class) } |
Programming notes
None
Example
| JavaScript Example |
|
function LoadPages(page, path) { return new Promise((resolve, reject) => { $.ajax({ type: "POST", url: API_GetPage, cache: false, data: { DocumentID: path, CE: _getContentEngine(), Page: page }, success: function (result) { var res = result.base64; if (result.settings != undefined) { if (page == 0) { PageInf = {}; PageInf.DPIX = result.settings.DPIX; PageInf.DPIY = result.settings.DPIY; PageInf.Width = result.settings.Width; PageInf.Height = result.settings.Height; PageInf.Compression = result.settings.Compression; PageInf.FillOrder = result.settings.FillOrder; PageInf.BitsPerPixel = result.settings.BitsPerPixel; PageInf.ColorDepth = result.settings.ColorDepth; PageInf.Rotation = 0; PageInformation.push(PageInf); } } if (result.annotations != undefined) { //Processing annotations if needed } resolve(true); }, error: function (xhr, textStatus, message) { resolve(false); } }); }); } |
Requirements
