loadFromFile Method

Summary

Loads a document from a File object.

Syntax
TypeScript
JavaScript
loadFromFile = function( 
   file, 
   options 
) 
static loadFromFile( 
   file: File, 
   options: LoadDocumentOptions 
): AbortableJqueryPromise; 

Parameters

file

The JavaScript File object containing the document file data.

options

The LoadDocumentOptions object to create the LEADDocument with.

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, uploadDocument, and endUpload support.

Upon success, the resulting 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, use the annotations or 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.2019.4.11
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2019 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Document Assembly