Getting started with XFINIUM.PDF Viewer in WPF applications

This tutorial will show how to get started with XFINIUM.PDF Viewer in WPF applications.

1. Add XFINIUM.PDF Viewer to Visual Studio toolbox.

2. Open your window xaml in Visual Studio Designer.

Getting started with XFINIUM.PDF viewer in WPF applications

3. Drag a PdfCoreView control from the toolbox onto the form and name the control ‘documentView‘. References to xfinium.pdf.wpf.dll, xfinium.pdf.render.wpf.dll and xfinium.pdf.view.wpf.dll will be added automatically to your project.

4. Embed the documentView control in a ScrollViewer.

5. In your window’s Loaded event create a PdfVisualDocument object, set the documentView.Document property with the PdfVisualDocument object and load a file in the document.


Xfinium.Pdf.View.PdfVisualDocument document = new Xfinium.Pdf.View.PdfVisualDocument();
documentView.Document = document;
FileStream pdfStream = File.OpenRead("D:\Doc\xfinium.pdf");


Dim document As New Xfinium.Pdf.View.PdfVisualDocument()
documentView.Document = document
Dim pdfStream As FileStream = File.OpenRead("D:Docxfinium.pdf")

6. Run the application.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: