Skip to main content
A newer version of this page is available. .

PdfViewer.DetachStreamAfterLoadComplete Property

Specifies whether or not the PDF Viewer allows closing the input stream after loading a PDF file.

Namespace: DevExpress.XtraPdfViewer

Assembly: DevExpress.XtraPdfViewer.v19.2.dll

Declaration

[DefaultValue(false)]
public bool DetachStreamAfterLoadComplete { get; set; }

Property Value

Type Default Description
Boolean **false**

true to close the input stream after loading a file; otherwise false.

Remarks

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;
See Also