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

PdfViewer() Constructor

Initializes a new instance of the PdfViewer class with default settings.

Namespace: DevExpress.XtraPdfViewer

Assembly: DevExpress.XtraPdfViewer.v18.2.dll

Declaration

public PdfViewer()

Example

The following example illustrates how to load an existing PDF file into the PdfViewer control. To do this, it’s necessary to drop the PdfViewer control onto the form, create a Ribbon via the PdfViewer’s smart tag and call the PdfViewer.LoadDocument method.

using System;
using System.Windows.Forms;

namespace PdfViewerSample {
    public partial class Form1 : Form {
        public Form1() {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e) {
            this.pdfViewer1.LoadDocument(@"..\..\Report.pdf");
        }
    }
}
See Also