loadFromFile Method

Summary

Loads a document from a Blob object.

Syntax
TypeScript
JavaScript
loadFromFile = function( 
   blob, 
   options 
) 
static loadFromFile( 
   blob: Blob, 
   options: LoadDocumentOptions 
): AbortableJqueryPromise; 

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 the 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.

Requirements

Target Platforms

Help Version 20.0.2020.4.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Document Assembly