The .NET System.Net.WebClient object to use when downloading or uploading data from a remote URL.
public WebClient WebClient { get; set; }
public:
property System::Net::WebClient^ WebClient
{
System::Net::WebClient^ get()
void set(System::Net::WebClient^ value)
}
public IURIConnecter getURIConnecter()
public void setURIConnecter(IURIConnecter value)
WebClient # get and set (LoadDocumentOptions)
The .NET System.Net.WebClient object to use when downloading or uploading data from a remote URL. Default value is null.
LEADTOOLS uses a System.Net.WebClient object when downloading or uploading data from a remote URL. This object contain many options for handling the credentials and proxy settings. If this value is null, LEADTOOLS will create a new System.Net.WebClient object with default options, use it for the operation and then disposes it.
If the operation requires custom settings for the credentials and proxy, or to subscribe to the System.Net.WebClient events for debugging and logging purposes, then the user can create their own object and set it in this property. LEADTOOLS will then use this instance instead of creating a new one. In this mode, the user is responsible for disposing the object when it is no longer used.
Refer to Loading Documents using Leadtools.Document for detailed information.
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:\LEADTOOLS23\Resources\Images";
}
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.Calendar;
import org.junit.*;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;
import static org.junit.Assert.*;
import leadtools.*;
import leadtools.caching.*;
import leadtools.document.*;
public void documentFactoryLoadFromFileExample() {
final String LEAD_VARS_IMAGES_DIR = "C:\\LEADTOOLS23\\Resources\\Images";
LoadDocumentOptions options = new LoadDocumentOptions();
options.setAnnotationsUri(null);
options.setFirstPageNumber(1);
options.setLastPageNumber(-1);
options.setPassword(null);
options.setCachePolicy(new CacheItemPolicy());
LEADDocument document = DocumentFactory.loadFromFile(combine(LEAD_VARS_IMAGES_DIR, "Leadtools.pdf"), options);
printOutDocumentInfo(document);
assertTrue(document != null);
System.out.println("Document created successfully");
document.dispose();
}
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