windowsforms-devexpress-dot-xtrapdfviewer-dot-pdfviewer-dbd7199c.md
Specifies whether the PDF Viewer component completes all input operations after loading a document.
Namespace : DevExpress.XtraPdfViewer
Assembly : DevExpress.XtraPdfViewer.v25.2.dll
NuGet Package : DevExpress.Win.PdfViewer
[DefaultValue(false)]
public bool DetachStreamAfterLoadComplete { get; set; }
<DefaultValue(False)>
Public Property DetachStreamAfterLoadComplete As Boolean
| Type | Default | Description |
|---|---|---|
| Boolean | false |
true if the PDF Viewer completes all input operations after loading a document; false if the stream should not be closed or modified until the PDF Viewer finishes using a document.
|
The PDF Viewer expects that the input stream is not modified or closed before the component finishes using a document. Set true as the DetachStreamAfterLoadComplete property value to force the PDF Viewer to complete all input operations after loading a document. Set this property to false to lock files by the input stream (i.e., make it impossible to edit or delete the document until it is opened in the PDF Viewer) and render large PDF files faster.
FileStream stream = new FileStream("..\\..\\Demo.pdf", FileMode.Open);
pdfViewer.LoadDocument(stream);
pdfViewer.DetachStreamAfterLoadComplete = true;
Dim stream As FileStream = New FileStream("..\..\Demo.pdf", FileMode.Open)
pdfViewer.LoadDocument(stream)
pdfViewer.DetachStreamAfterLoadComplete = True
See Also