Loads images or documents to DcsBuffer.


- (void) loadFile: (NSString *) file
mode: DcsModeEnum mode


file:NSString The file to be loaded. It must be a full path jpg, png or pdf file defined by users.
mode:DcsModeEnum The format for loading images. The values represent whether it's an image or a document.

Return value



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.


Circumstance Exception thrown
License verification failed. DcsLicenseVerificationFailedException
There is an error reading the file. DcsFileReadException
The content of the file can't be decoded. DcsDataFormatInvalidException
File is nil DcsValueNotValidException
Mode is not DME_DOCUMENT nor DME_IMAGE. DcsValueOutOfRangeException


Is this page helpful?

Leave a Reply

Your email address will not be published.