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

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

Leadtools.Document Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.