PDF viewer control v10.0.0

PDF Viewer for .NET

ExpertPdf PDF Viewer adds PDF viewing to Windows Forms, WPF, ASP.NET Web Forms and ASP.NET Core applications. Display PDF documents from a file, a URL or memory, page through them, search their text and print them, with a light or dark theme and the toolbar buttons you choose.

Version 10 is built on PDF.js: no Adobe Reader and no plug-in. Two controls, licensed separately: the PDF Viewer for Windows Forms and WPF, and the PDF Viewer for ASP.NET.

NuGet · ExpertPdf.PdfViewer.WinForms · ExpertPdf.PdfViewer.AspNet C# & VB.NET samples included
Hosts WinForms · WPF · ASP.NET
Built on PDF.js · no Adobe Reader
Runtimes .NET Framework 4.6.2 · .NET 8+ .NET 11: fully tested and supported

Two controls, licensed separately.

Display PDF documents in a desktop application or in a web page. Each control is a separate product with its own license.

Windows Forms & WPF

Display PDFs inside your windows.

The PDF Viewer for Windows Forms and WPF, from $250 for a developer license.

Windows Forms and WPF controls

Drag the PdfViewer control onto a form, or use the WPF control in XAML with its Source property. Both can run in the same application.

File, stream or bytes

Load a document with LoadFile, LoadStream or LoadBytes, for example a PDF made in memory by the HTML to PDF Converter, and close it with CloseDocument.

Navigate and search

Go to any page from code, and search the text with Find, FindNext and FindPrevious; SearchCompleted reports the matches.

Print

Print with the print dialog, or silently to a chosen printer and page range with PrintAsync.

Passwords

Open password-protected documents: supply the password in the PasswordRequired event, or let the viewer ask the user.

Theme and toolbar

Light, dark or system theme with ViewerTheme, and show or hide single buttons: open, sidebar, find, page navigation, zoom, print, download, presentation mode, document properties.

WebView2 runtime

The Microsoft Edge WebView2 Runtime comes with Windows 10 and 11. Elsewhere the control can install it (InstallWebView2RuntimeIfMissing), or use a fixed version you ship. 32-bit, 64-bit and ARM64 processes.

Events

DocumentLoaded, CurrentPageChanged and LoadError keep your application in step with the viewer.

ASP.NET

Display PDFs inside a web page.

The PDF Viewer for ASP.NET, from $250 for a developer license.

ASP.NET Core tag helper

Add <expertpdf-viewer> to a Razor page or view, with app.UseExpertPdfViewer() in Program.cs.

Web Forms control

Drag the PdfViewer control onto a Web Form. It serves its own files: nothing to add to web.config.

From a URL or from bytes

Show a document from an address with PdfSourceURL (src), or from memory with PdfSourceBytes (source-bytes), with no temporary file.

Any modern browser

The documents are shown by a bundled PDF.js viewer: no Adobe Reader and no plug-in on the user's computer.

Print and download control

Allow or block printing and downloading, choose the theme and the toolbar buttons.

JavaScript API

ExpertPdfViewer.get(id) controls the viewer from the page: go to a page, zoom, search, highlight, print, and events such as loaded and pagechange.

Samples & licensing

What comes in the download.

The controls, samples and API documentation, for .NET Framework 4.6.2 and .NET 8 or later.

C# and VB.NET samples

Windows Forms, WPF, ASP.NET Web Forms and ASP.NET Core samples, for .NET Framework and .NET 10.

Royalty free

Royalty free development libraries and samples.

Upgrading from version 9

Version 9 code keeps building. Documents now load asynchronously: wait for DocumentLoaded before working with a document.

License key

Set the LicenseKey property with the key you receive after the purchase. Version 10 needs a version 10 key.

Four hosts. A few lines each.

Load a PDF file in the Windows Forms or WPF control, or show one in a Razor page or a Web Form, from a URL or from bytes.

MainForm.cs · Windows Forms · C#
using PdfViewer4WinNet;

// pdfViewer was dropped on the form from the toolbox
private void MainForm_Load(object sender, EventArgs e)
{
    pdfViewer.LicenseKey = "your license key";
    pdfViewer.DocumentLoaded += (s, a) => Text = pdfViewer.PageCount + " pages";
    pdfViewer.LoadFile(@"C:\Docs\report.pdf");
}

private void btnFind_Click(object sender, EventArgs e)
{
    pdfViewer.Find(txtSearch.Text, false, true);
}

private void btnPrint_Click(object sender, EventArgs e)
{
    pdfViewer.PrintWithDialog();
}

Windows Forms and WPF: dotnet add package ExpertPdf.PdfViewer.WinForms.ASP.NET: dotnet add package ExpertPdf.PdfViewer.AspNet. Or reference PdfViewerWinNet.dll or PdfViewerAspNet.dll from the download. The viewer includes PDF.js, licensed under the Apache License 2.0.

Viewer questions, answered.

Common questions about hosting, requirements and licensing.

What does the PDF Viewer do?
It displays PDF documents inside your Windows Forms, WPF, ASP.NET Web Forms or ASP.NET Core application. Your users page through the document, zoom, search its text and print it, and your code controls all of it.
Is Adobe Acrobat Reader required?
No. Version 10 shows the documents with a bundled PDF.js viewer, so no Adobe Reader and no plug-in is needed. The Windows Forms and WPF controls use the Microsoft Edge WebView2 Runtime, which comes with Windows 10 and Windows 11; on Windows Server or older systems the control can install it for you, or you can ship a fixed version with your application.
Which .NET versions are supported?
Windows Forms and WPF: .NET Framework 4.6.2 and newer and .NET 8 or later on Windows. ASP.NET: Web Forms on .NET Framework 4.6.2 and newer, and ASP.NET Core on .NET 8 or later, with the <expertpdf-viewer> tag helper.
Can I search the text and handle password-protected documents?
Yes. Find, FindNext and FindPrevious search from code and SearchCompleted reports the matches. For a protected document, the PasswordRequired event lets your code supply the password; without a handler the viewer asks the user.
Can I change how the viewer looks?
Yes. Choose a light or dark theme (or follow the system) with ViewerTheme, and show or hide single toolbar buttons such as print, download, open and find. In ASP.NET, AllowPrint and AllowDownload control printing and downloading.
Is one license enough for both controls?
No. The PDF Viewer for Windows Forms and WPF and the PDF Viewer for ASP.NET are separate products, each licensed on its own, from $250 and $250 for a developer license. The ExpertPdf Toolkit and the ExpertComponents Toolkit Total include the PDF Viewer. See the pricing page.
Does code written for version 9 still work?
Yes, it keeps building. Documents now load asynchronously, so code that works with a document right after loading it should wait for the DocumentLoaded event. In ASP.NET, the PdfSourceBytes handler in web.config is no longer needed.
Can I try it before buying?
Yes. Download the free trial of either control with the C# and VB.NET samples, and license it on the pricing page when you are ready.

Display PDF documents in your .NET application.

Download the free trial of the Windows Forms and WPF or the ASP.NET control, with C# and VB.NET samples. When you are ready, license the control you need on the pricing page.

Targets.NET Framework 4.6.2+ · .NET 8+ · Windows Forms · WPF · ASP.NET
Versionv10.0.0