Provides support for loading and creating Document objects as well as managing the global cache.
public static class DocumentFactory
Public NotInheritable Class DocumentFactory
public ref class DocumentFactory sealed abstract
public final class DocumentFactory
The main class used for the LEADTOOLS Document class library is LEADDocument. This class abstracts the internal implementation to provide unified properties and methods to access the internal document. Users can create a new document or load existing documents from disk file or a URL.
Documents cannot be created directly. Instead, use the static DocumentFactory methods to obtain a LEADDocument instance, as follows:
Member | Description |
---|---|
LoadFromFile |
Loads a document from existing data stored in a disk file. |
LoadFromUri |
Loads a document from existing data stored in a remote URI. |
LoadFromUriAsync |
Loads a document asynchronously from an existing data stored in remote URI. |
LoadFromStream |
Loads a document from existing data stored in a stream. |
Create |
Creates a new empty virtual document. |
MimeTypes |
MIME type whitelisting support. |
RasterCodecsTemplate |
Global template used when loading and saving raster and SVG images. |
Member | Description |
---|---|
Cache |
The global LEADTOOLS ObjectCache object responsible for managing cache items and expiration policies. The cache can be stored in this value (if the system requires the use of a single global cache) or a new instance is passed directly to the various uploading, loading and saving methods to use distinct or shared caches with each document. |
Create |
Creates a new empty document. |
LoadFromCache |
Loads a previously saved document from the cache. |
DocumentFactory |
Deletes a document from the cache. |
GetDocumentCacheInfo |
Retrieves information about a document in the cache. |
BeginUpload, UploadDocument, UploadAnnotations and AbortUploadDocument | Supports uploading a document to the cache system used by the factory. |
DownloadDocument and DownloadAnnotations | Supports uploading a document to the cache system used by the factory. |
CloneDocument | Clones (creates a copy) of an existing document in the cache. |
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Document.Writer;
using Leadtools.Svg;
using LeadtoolsExamples.Common;
using Leadtools.Document;
using Leadtools.Caching;
using Leadtools.Annotations.Engine;
using Leadtools.Ocr;
using Leadtools.Barcode;
using Leadtools.Document.Converter;
public static void DocumentFactoryExample()
{
var options = new LoadDocumentOptions();
using (var document = DocumentFactory.LoadFromFile(Path.Combine(ImagesPath.Path, "Leadtools.pdf"), options))
{
PrintOutDocumentInfo(document);
}
}
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.Document.Writer
Imports Leadtools.Svg
Imports Leadtools.Document
Imports Leadtools.Caching
Imports Leadtools.Annotations.Engine
Imports Leadtools.Barcode
Imports Leadtools.Ocr
Imports LeadtoolsDocumentExamples.LeadtoolsExamples.Common
Imports Leadtools.Document.Converter
Public Sub DocumentFactoryExample()
Dim options As New LoadDocumentOptions()
Using document As Leadtools.Document.LEADDocument = DocumentFactory.LoadFromFile(Path.Combine(ImagesPath.Path, "Leadtools.pdf"), options)
PrintOutDocumentInfo(document)
End Using
End Sub
Loading Using LEADTOOLS Document Library
Creating Documents with LEADTOOLS Document Library
Document Library Coordinate System
Loading Encrypted Files Using the Document Library
Parsing Text with the Document Library
Barcode processing with the Document Library
Using LEADTOOLS Document Viewer
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document