PDFTron SilverDox SDK |
LocalPartRetriever Constructor |
LocalPartRetriever Class Example See Also Send Feedback |
Constructs a new LocalPartRetriever.
Namespace: PDFTron.SilverDox.IO
Assembly: SilverDox (in SilverDox.dll) Version: 1.2.4413.29010
Syntax
C# |
---|
public LocalPartRetriever( Stream stream, bool backgroundLoadDocument ) |
Visual Basic |
---|
Public Sub New ( _ stream As Stream, _ backgroundLoadDocument As Boolean _ ) |
Visual C++ |
---|
public: LocalPartRetriever( Stream^ stream, bool backgroundLoadDocument ) |
Parameters
- stream
- Type: System.IO..::..Stream
A stream to a .xod file, typically acquired from a local file using an open file dialog.
- backgroundLoadDocument
- Type: System..::..Boolean
[Missing <param name="backgroundLoadDocument"/> documentation for "M:PDFTron.SilverDox.IO.LocalPartRetriever.#ctor(System.IO.Stream,System.Boolean)"]
Remarks
Note that while this part retriever is intended for use with a local file system, it will work with a stream acquired from any source. The stream must be seekable.
Examples
CopyC#
//Shows using an open dialog box to acquire a stream to //a local .xod file, and using it to construct a LocalPartRetriver. private LocalPartRetriever MyRetriever; public void LoadLocalDocument() { OpenFileDialog dlg = new OpenFileDialog(); dlg.Multiselect = false; dlg.Filter = "XOD Files (*.xod)|*.xod"; // open dialog bool ok = (bool)dlg.ShowDialog(); if (ok) { if (MyRetriever as LocalPartRetriever != null) ((LocalPartRetriever) MyRetriever).Dispose(); FileStream fileStream = dlg.File.OpenRead(); MyRetriever = new LocalPartRetriever(fileStream); MyDocumentViewer.LoadAsync(MyRetriever, OnLoadAsyncCallback); } }