LoadFromFile Method (original) (raw)

Summary

Loads a document from existing data stored in a disk file.

Syntax

public static Document loadFromFile(String fileName, LoadDocumentOptions options) 

Parameters

fileName

Path to the file name containing the original document data. This value cannot be null.

options

Options to use when loading the document. This value cannot be null.

Return Value

The newly created document object.

Example

using Leadtools; using Leadtools.Caching; using Leadtools.Document; public void DocumentFactoryLoadFromFileExample() { var options = new LoadDocumentOptions(); options.AnnotationsUri = null; options.FirstPageNumber = 1; options.LastPageNumber = -1; options.Password = null; options.WebClient = null; options.CachePolicy = new CacheItemPolicy(); using (var document = DocumentFactory.LoadFromFile(Path.Combine(LEAD_VARS.ImagesDir, "Leadtools.pdf"), options)) { PrintOutDocumentInfo(document); } } static class LEAD_VARS { public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images"; }