loadData()

Description

Loads the buffer data to DcsBuffer in image or document format.

Syntax

(void)loadData: (NSData *)data
mode: DcsModeEnum mode

Parameters

data:Data The data in the buffer in jpg, png or pdf formats.
mode:DcsModeEnum The format for loading images. The values represent whether it's an image or a document.

Return value

Void

Remarks

When the value of mode is DME_IMAGE, a new DcsImage object will be loaded into DcsBuffer.
When the value of mode is DME_DOCUMENT, a new DcsDocument object will be loaded into DcsBuffer.
If there are multiple images in one PDF file, multiple objects will be created.

Exceptions

Circumstance Exception thrown
License verification failed. DcsLicenseVerificationFailedException
There is error decoding the data DcsDataFormatInvalidException
Data is nil DcsValueNotValidException
Mode is not DME_DOCUMENT nor DME_IMAGE. DcsValueOutOfRangeException