Articles in this section
Category / Section

How to use Pdfium rendering engine in WPF PDFViewer?

2 mins read

From 16.1.0.24 and higher versions of Essential Studio release, the PDF viewer control provides a robust rendering of PDF document using PDFium rendering engine. Use the following steps to use Pdfium rendering in Syncfusion WPF PDF viewer.

  1. Copy the Pdfium assembly’s folder to a local folder from the installation path. The folder name must be “Pdfium”.

 

The Pdfium assemblies will be available in

{$SystemDrive}:\Program Files (x86)\Syncfusion\Essential Studio\{Essential Studio version}\Pdfium

 

Copy PDFium assembly folder

Note:

The Pdfium folder contains two folders such as X86 and X64, and both folders contain pdfium.dll assembly for the respective architecture. The Syncfusion PDF viewer is designed to detect the architecture of the target machine where it is deployed and will pick corresponding pdfium.dll to use it.

 

Opened the PDFium folder

 

  1. The ReferencePath property of the PDF viewer should be set to locate the “Pdfium” folder.

 

The following code snippet illustrates this.

PdfViewerControl viewer = new PdfViewerControl();
//Set the reference path of Pdfium assemblies
viewer.ReferencePath = @"D:\Reference path";
//Set the rendering engine of PDF viewer to Pdfium
viewer.RenderingEngine =PdfRenderingEngine.Pdfium; 
//Load the PDF document in PDF viewer.
viewer.Load("Sample.pdf");

 

View sample in GitHub.

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments
Please sign in to leave a comment
Access denied
Access denied