Back to Devexpress

PdfViewer.CloseDocument() Method

windowsforms-devexpress-dot-xtrapdfviewer-dot-pdfviewer-48f0dd11.md

latest2.8 KB
Original Source

PdfViewer.CloseDocument() Method

Closes the current document.

Namespace : DevExpress.XtraPdfViewer

Assembly : DevExpress.XtraPdfViewer.v25.2.dll

NuGet Package : DevExpress.Win.PdfViewer

Declaration

csharp
public void CloseDocument()
vb
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

csharp
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

csharp
{
    pdfViewer1.CloseDocument();
}

how-to-custom-draw-in-pdf-viewer/VB/PDF_Viewer/Form1.vb#L204

vb
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

vb
Private Sub btnClose_ItemClick(ByVal sender As Object, ByVal e As ItemClickEventArgs)
    pdfViewer1.CloseDocument()
End Sub

See Also

PdfViewer Class

PdfViewer Members

DevExpress.XtraPdfViewer Namespace