Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.4.3
|
Leadtools.Documents Namespace > DocumentFactory Class : LoadFromUri Method |
public static Document LoadFromUri( Uri uri, LoadDocumentOptions options )
'Declaration
Public Shared Function LoadFromUri( _ ByVal uri As Uri, _ ByVal options As LoadDocumentOptions _ ) As Document
'Usage
Dim uri As Uri Dim options As LoadDocumentOptions Dim value As Document value = DocumentFactory.LoadFromUri(uri, options)
public static Document loadFromUri(URI uri, LoadDocumentOptions options)
public: static Document^ LoadFromUri( Uri^ uri, LoadDocumentOptions^ options )
This method might use the cache and will throw an exception if neither LoadDocumentOptions.Cache nor Cache was setup with a valid cache object if certain options are used.
Note that uri can point to a document stored in HTTP, HTTPS, FTP, or Disk file (using the file protocol).
LoadFromFile, LoadFromUri, LoadFromUriAsync and LoadFromStream creates a Document class from any supported image or document file format stored in a disk file, remote URL or stream. 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.
After the document is obtained, InternalObject will be to the internal LEADTOOLS object used with the document.
Refer to Loading Using LEADTOOLS Documents Library for detailed information on how to use this method and the various options used.
Imports Leadtools Imports Leadtools.Codecs Imports Leadtools.Forms.DocumentWriters Imports Leadtools.Svg Imports Leadtools.Documents Imports Leadtools.Caching Imports Leadtools.Annotations.Core Imports Leadtools.Barcode Imports Leadtools.Forms.Ocr <TestMethod()> _ Public Sub DocumentFactoryLoadFromUriExample() Dim options As New LoadDocumentOptions() options.UseCache = False Using document As Leadtools.Documents.Document = DocumentFactory.LoadFromUri(New Uri("http://localhost/Leadtools.pdf"), options) PrintOutDocumentInfo(document) End Using End Sub
using Leadtools; using Leadtools.Codecs; using Leadtools.Forms.DocumentWriters; using Leadtools.Svg; using Leadtools.Documents; using Leadtools.Caching; using Leadtools.Annotations.Core; using Leadtools.Forms.Ocr; using Leadtools.Barcode; [TestMethod] public void DocumentFactoryLoadFromUriExample() { var options = new LoadDocumentOptions(); options.UseCache = false; using (var document = DocumentFactory.LoadFromUri(new Uri("http://demo.leadtools.com/images/pdf/leadtools.pdf"), options)) { PrintOutDocumentInfo(document); } }