This repository contains a sample WPF application that demonstrates how to export images from a PDF document using the Syncfusion WPF PDF Viewer control. The sample helps developers understand how to load a PDF file, access its pages, and extract images programmatically using the APIs provided by Syncfusion.
The Syncfusion WPF PDF Viewer supports exporting PDF pages as images, offering control over page selection and image output.
A single PDF page can be exported by specifying its page index. This approach is commonly used when only one page, such as the first page or a cover page, needs to be converted into an image. Page indexing starts from zero, where index 0 represents the first page of the document.
The PDF Viewer also supports exporting a specific range of pages. By defining a starting page index and an ending page index, multiple pages can be exported in a single operation. Each page within the selected range is converted into a separate image, making this option suitable for exporting sections or specific portions of a PDF document.
Images can also be exported using a custom image size. By specifying the width and height, the output image dimensions can be adjusted instead of using the default PDF page size. This is useful for creating uniform thumbnail images or ensuring images fit within fixed layout requirements.
In addition, the PDF Viewer supports exporting images with a custom image resolution by specifying DPI values. Higher DPI settings produce clearer and more detailed images suitable for high‑quality viewing or printing, while lower DPI settings help reduce file size and memory usage.
These export options provide flexibility and precision when converting PDF pages into images, making the Syncfusion WPF PDF Viewer suitable for a wide range of document visualization and processing scenarios.
Documentation: https://help.syncfusion.com/document-processing/pdf/pdf-viewer/wpf/exporting-pdf
To run this application, ensure that the following requirements are installed on the system:
*Visual Studio 2010 or later *Syncfusion WPF PDF Viewer package, which can be installed via NuGet NuGet package: https://www.nuget.org/packages/Syncfusion.PdfViewer.WPF
*Installing the Syncfusion.PdfViewer.WPF NuGet package automatically adds the required dependent assemblies, including:
- Syncfusion.Pdf.Base
- Syncfusion.Compression.Base
- Syncfusion.PdfToImageConverter.Base
- Syncfusion.Shared.WPF
A valid Syncfusion license is required to use the PDF Viewer without evaluation warnings. Syncfusion also provides a free community license for eligible users.
You can install the Pdf Viewer Assemblies from Syncfusion nuget packages. Follow the below steps to install assemblies from nuget
- Go to the References option in the project.
- Right-click the References option and choose Manage NuGet Packages option from the menu that will display a window.
- Now search for Syncfusion.PdfViewer.WPF nuget and install .