Error processing SSI file
LEADTOOLS Leadtools.Documents.UI (Leadtools.Documents.UI assembly)

Show in webframe

SetDocument Method






Document object to view. Use null to remove the current document from the viewer.
Sets a new document in the viewer.
Syntax
public virtual void SetDocument( 
   Document document
)
'Declaration
 
Public Overridable Sub SetDocument( _
   ByVal document As Document _
) 
'Usage
 
Dim instance As DocumentViewer
Dim document As Document
 
instance.SetDocument(document)
public:
virtual void SetDocument( 
   Document^ document
) 

Parameters

document
Document object to view. Use null to remove the current document from the viewer.
Remarks

If the value of document is null, then the current document is removed from the viewer.

If the viewer has a previous Document object set and this method was sucessful, then the existing Document object will be disposed if the value of AutoDisposeDocument is true.

The viewer will check if the value of document is the same as the existing one in the viewer. If so, it will not dispose the old document. The application can set the same document in the viewer as a "reset" or "reload" operation.

Encrypted document's must be decrypted prior to setting them in the viewer. Refer to Loading Encrypted Files Using the Documents Library for more information.

This method performs the following:

  1. ViewThe Operation is invoked with DocumentViewerOperation.SetDocument, Data1 set to document and IsPostOperation set to false.

  2. View, Thumbnails, Bookmarks and Annotations all may have background threads working to parse the existing document data. The document viewer will notify each object to abandon the work and exit the threads. This is performed in a graceful manner to preserve system resources and prevent memory leaks. Therefore, a slight delay might occur while the viewer waits on the threads to exit.

  3. If the existing Document is not null, not the same as document and the value of AutoDisposeDocument is true; then the Document object is disposed.

  4. View, Thumbnails, Bookmarks and Annotations will be notified that a new document is set and to start new background threads if needed or populate the UI elements from the document pages and data.

  5. ViewFinally, the Operation is invoked again with DocumentViewerOperation.SetDocument, Data1 set to document and IsPostOperation set to true this time.

Example

For an example, refer to DocumentViewer.

Requirements

Target Platforms

See Also

Reference

DocumentViewer Class
DocumentViewer Members
DocumentViewer
Using LEADTOOLS Document Viewer
Document Viewer Commands
Document Viewer Operations
Documents Library Features
Loading Using LEADTOOLS Documents Library
Uploading Using the Documents Library
Documents Library Coordinate System
Parsing Text with the Documents Library
Barcode processing with the Documents Library
Loading Encrypted Files Using the Documents Library
Using LEADTOOLS Document Viewer
Using LEADTOOLS Document Converters

Error processing SSI file
Leadtools.Documents.UI requires a Document or Medical toolkit license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features