ADaxer.Pdf.Wpf 1.2.0

dotnet add package ADaxer.Pdf.Wpf --version 1.2.0
                    
NuGet\Install-Package ADaxer.Pdf.Wpf -Version 1.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ADaxer.Pdf.Wpf" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ADaxer.Pdf.Wpf" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="ADaxer.Pdf.Wpf" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ADaxer.Pdf.Wpf --version 1.2.0
                    
#r "nuget: ADaxer.Pdf.Wpf, 1.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ADaxer.Pdf.Wpf@1.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ADaxer.Pdf.Wpf&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=ADaxer.Pdf.Wpf&version=1.2.0
                    
Install as a Cake Tool

ADaxer.Pdf.Wpf

A free, reusable PDF viewer control for WPF applications.

Note

To the best of my knowledge, there is currently no freely available, easy-to-use WPF PDF viewer control that supports modern PDF rendering and integrates naturally into WPF applications. This project was created to fill that gap.

If you know of a comparable open-source alternative, I'd be happy to hear about it.

Overview

ADaxer.Pdf.Wpf is a lightweight WPF control for displaying PDF documents directly from a byte[].

Features

  • Display PDF documents directly from memory (byte[])
  • Single Page, Double Page and Scrolling view modes
  • Zoom In / Zoom Out
  • Fit to Width / Fit to Height
  • Page navigation
  • Lazy page rendering
  • Optimized rendering and memory management
  • Direct rendering to WPF BitmapSource
  • Minimal external dependencies

Demo

A demo application is included in the repository and demonstrates all supported view modes, zooming and page navigation.

Getting Started

Install the NuGet package:

dotnet add package ADaxer.Pdf.Wpf

Reference the control:

<pdf:PdfView PdfBytes="{Binding PdfBytes}" />

Load a document:

PdfBytes = File.ReadAllBytes("Sample.pdf");

Bind the properties (PdfBytes, Zoom, ViewMode, CurrentPage) to your view model or code-behind as needed.

Use the commands provided by the control to navigate and interact with the PDF.

// Zoom in
pdfViewer.ZoomInCommand.Execute(null);

// Move to the next page
pdfViewer.NextPageCommand.Execute(null);

External dependencies

Rendering is performed using PDFiumCore.

Starting with Version 1.2.0, the dependency on ImageSharp has been removed. PDF pages are rendered directly to WPF BitmapSource objects, reducing both dependencies and memory usage.

Changelog

See CHANGELOG.md for a complete history of changes.

Contributing

Contributions, bug reports and feature requests are welcome.

If you encounter a problem or have an idea for an improvement, please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.0 563 7/8/2026
1.1.2 682 3/17/2025
1.1.1 296 3/12/2025
1.1.0 285 3/12/2025
1.0.0 369 8/21/2024

Version 1.2.0 removes the ImageSharp dependency, renders directly to WPF BitmapSource, and improves PDFium resource handling and memory usage.