windowsforms-devexpress-dot-xtrapdfviewer-dot-pdfviewer-48f0dd11.md
Closes the current document.
Namespace : DevExpress.XtraPdfViewer
Assembly : DevExpress.XtraPdfViewer.v25.2.dll
NuGet Package : DevExpress.Win.PdfViewer
public void CloseDocument()
Public Sub CloseDocument
The following code snippets (auto-collected from DevExpress Examples) contain references to the CloseDocument() method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
how-to-custom-draw-in-pdf-viewer/CS/PDF_Viewer/Form1.cs#L211
string fileName = pdfViewer.DocumentFilePath;
pdfViewer.CloseDocument();
using (PdfDocumentProcessor processor = new PdfDocumentProcessor())
how-to-show-a-pdf-file-in-the-pdfviewer-winforms/CS/PdfViewerSample/Form1.cs#L28
{
pdfViewer1.CloseDocument();
}
how-to-custom-draw-in-pdf-viewer/VB/PDF_Viewer/Form1.vb#L204
Dim fileName As String = pdfViewer.DocumentFilePath
pdfViewer.CloseDocument()
Using processor As PdfDocumentProcessor = New PdfDocumentProcessor()
how-to-show-a-pdf-file-in-the-pdfviewer-winforms/VB/PdfViewerSample/Form1.vb#L25
Private Sub btnClose_ItemClick(ByVal sender As Object, ByVal e As ItemClickEventArgs)
pdfViewer1.CloseDocument()
End Sub
See Also