GetPage

Description Returns with the base64 string of a document page with the specified Content-Engine.
Method Type POST
URL api/document/page
Parameters
Name Type Description
DocumentID Object

The specified document’s DocumentID.

The DocumentID can be any object, for example an absolute path of a file, or a database row ID. The specified Content-Engine will interpret the DocumentID and serve the document.

CE (Optional) String

The Specified Content-Engine.

Possible values:

0: Default Content-Engine (default)

1: FileEngine

2: DatabaseEngine

Page Int The page number of the document.
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