loadFromFile Method (original) (raw)
Summary
Loads a document from a Blob
object.
Syntax
TypeScript
JavaScript
loadFromFile = function(
_blob_,
_options_
)
static loadFromFile(
_blob_: Blob,
_options_: [LoadDocumentOptions](loaddocumentoptions.html)
): [AbortableJqueryPromise](abortablejquerypromise.html);
Parameters
blob
The JavaScript Blob
object containing the document file data.
options
The LoadDocumentOptions object used when creating the LEADDocument.
Return Value
A Promise object that may resolve successfully to a LEADDocument object, or fail if the LEADDocument cannot be created from the uri.
Remarks
loadFromFile first uploads the data to the cache and then calls loadFromUri. This is performed using the existing beginUploadDocument/uploaddocumentblob, uploadDocument, and endUpload support.
Upon success, the result is a LEADDocument object from any supported image or document file format stored in a disk file or remote URL. The returned object can then be used to retrieve any page as image or SVG, to obtain the text using SVG or OCR, to use with annotations, or to use the document structure such as links and bookmarks.
Refer to Loading Using LEADTOOLS Document Library for detailed information on how to use this method and the various options used.