How to Start Tutorials Troubleshooting Main Operations Convert PDF Read PDF Edit PDF PDF Report Generator Work with PDF Modules PDF Document PDF Pages Text Image Graph & Path Annotation, Markup & Drawing Redaction Security Digital Signature Forms Watermark Bookmark Link File Attachment File Metadata Printing Work with Other SDKs Barcode read Barcode create OCR Twain

WPF PDF C# Library
How to create a new PDF view, edit, convert WPF Windows application using C#?

Complete step by step tutorial to create a new WPF app, download and install XDoc.PDF C# library to read, view, edit, convert PDF document.

XDoc.PDF for C# library is an easy to use PDF C# library to open, view, manipulate PDF in WPF (.NET Core and .NET Framework) Windows application.

In this C# tutorial will guide you how to create a new WPF project, install XDoc.PDF into your WPF app using Visual Studio 2022.

Here we will:

  • Create a WPF (.NET Core) project
  • Download and install all dependant Nuget packages
  • Add XDoc.PDF dlls into the new WPF project

Download and Install XDoc.PDF WPF C# library

  1. Download XDoc.PDF WPF C# library
  2. Install C# library to read, process, convert PDFs in .NET Core WPF projects
  3. Step by Step Tutorial

How to create a new WPF (.NET Core) project to process PDF document using C#?

1. Start Visual Studio 2022 and select "Create a new project".

Select "WPF Application" in the dialog, and then press "Next".

Create a new project with name "RasterEdgePDFWPFDemo".

Select .NET 6.0 (Long-term support), and then press "Create".

Now, all auto-generated files could be found in the solution explorer.

2. Right-click "Dependencies" in the Solution Explorer, and select "Manage NuGet Packages".

Required packages:

  • System.Drawing.Common (>= Version 6.0.0)
  • System.IO.Packaging (>= Version 6.0.0)
  • Newtonsoft.Json (>= Version 11.0.2)
  • WaterTrans.GlyphLoader (>= Version 1.0.0)

Check "Packages" in the Solution Explorer to ensure the installation is success.

3. Add RasterEdge XDoc.PDF DLLs

Add all RasterEdge DLL references (add repired DLLs with prefix "RasterEdge" in file name).

Minimum Required DLLs

  • RasterEdge.Imaging.Basic
  • RasterEdge.Imaging.Basic.Codec
  • RasterEdge.Imaging.Processing
  • RasterEdge.Imaging.Drawing
  • RasterEdge.XImage.Raster
  • RasterEdge.XDoc.PDF

Please go to download package "/Bin", and choose .NET Standard 2.0 DLLs.

Copy all VC++ DLLs (both x86 and x64 versions) manually to the root of the project.

Note: these two folders locate in the folder "/Bin/NetStandard2.0/" of the download package.

Required VC++ DLLs

Folder: x86 (VC++ DLLs for Win32)

  • ./x86/RasterEdge.Imaging.Font.Native.dll
  • ./x86/RasterEdge.XImage.Raster.Native.dll
  • ./x86/RasterEdge.XImage.AdvancedCleanup.Native.dll
  • ./x86/RasterEdge.XImage.OCR.Tesseract.Native.dll

Folder: x64 (VC++ DLLs for x64)

  • ./x64/RasterEdge.Imaging.Font.Native.dll
  • ./x64/RasterEdge.XImage.Raster.Native.dll
  • ./x64/RasterEdge.XImage.AdvancedCleanup.Native.dll
  • ./x64/RasterEdge.XImage.OCR.Tesseract.Native.dll

Set property "Copy to Output Directory" to "Copy Always" for ALL 8 VC++ DLLs.


Now you have created a new WPF Windows application with XDoc.PDF C# library installed. You can start to read, view, edit, convert, print PDF files in your WPF app.

We have provided more PDF on WPF tutorials, view herre: