Back to Devexpress

PdfViewer.DocumentFilePath Property

windowsforms-devexpress-dot-xtrapdfviewer-dot-pdfviewer-890d404f.md

latest3.5 KB
Original Source

PdfViewer.DocumentFilePath Property

Gets or sets the path to the PDF file, which is currently opened in the PdfViewer control.

Namespace : DevExpress.XtraPdfViewer

Assembly : DevExpress.XtraPdfViewer.v25.2.dll

NuGet Package : DevExpress.Win.PdfViewer

Declaration

csharp
[DefaultValue("")]
public string DocumentFilePath { get; set; }
vb
<DefaultValue("")>
Public Property DocumentFilePath As String

Property Value

TypeDefaultDescription
StringString.Empty

A string value containing the file path.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the DocumentFilePath property.

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.

winforms-pdf-viewer-operate-pdf-content-at-runtime/CS/WindowsFormsApplication1/MainForm.cs#L54

csharp
private void barButtonItem1_ItemClick(object sender, ItemClickEventArgs e) {
    string path = pdfViewer1.DocumentFilePath;
    TextViewerForm textViewer = new TextViewerForm();

how-to-custom-draw-in-pdf-viewer/CS/PDF_Viewer/Form1.cs#L41

csharp
{
    processor.LoadDocument(Control.DocumentFilePath);
    foreach (var rect in rectangles)

winforms-pdf-viewer-operate-pdf-content-at-runtime/VB/WindowsFormsApplication1/MainForm.vb#L57

vb
Private Sub barButtonItem1_ItemClick(ByVal sender As Object, ByVal e As ItemClickEventArgs)
    Dim path As String = pdfViewer1.DocumentFilePath
    Dim textViewer As TextViewerForm = New TextViewerForm()

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

vb
Using processor As PdfDocumentProcessor = New PdfDocumentProcessor()
    processor.LoadDocument(Control.DocumentFilePath)
    For Each rect In rectangles

See Also

PdfViewer Class

PdfViewer Members

DevExpress.XtraPdfViewer Namespace