Foxit Quick PDF Library

How to use rendering and printing add-on with Foxit Quick PDF Library

Foxit Quick PDF Library has a new rendering and printing add-on which provides much improved support for transparency, shading patterns and tiling patterns when rendering and printing PDF files.

This new rendering engine is part of Foxit Quick PDF Library. It is a separate DLL which will need to be copied, loaded and then called from within your program. The version of the new rendering engine (DebenuPDFRendererDLL11xx.dll) will need to match the version of Foxit Quick PDF Library (DebenuPDFLibraryDLL11xx.dll) that you are using. The new rendering DLL works with the DLL, Delphi, ActiveX and LIB editions of Foxit Quick PDF Library. It is recommended that you keep the libraries binary files in the same folder when possible.

The steps for installing and using this new rendering engine are provided below.

Steps

  1. Download and install the latest version of Foxit Quick PDF Library (if you haven’t already got it installed).
  2. Locate the Debenu PDF Library Renderer add-on (DebenuPDFRendererDLL1114.dll is 32-bit and DebenuPDFRenderer64DLL1114.dll is 64-bit). Typically located here: C:\Program Files (x86)\Debenu\PDF Library\Rendering and Printing Add-On
  3. In your code call the SetDPLRFileName function to specify the location of the DebenuPDFRendererDLL1114.dll binary file on your machine. Then call the SelectRenderer function and specify 3 as the value for the RendererID parameter to select the new Debenu PDF Library Renderer (DPLR).
  4. Now call one of the rendering functions such as RenderPageToFile as shown below or PrintDocument. All rendering and printing functions can be used with the new rendering and printing add-on.

Sample Code

Here’s some sample code in C# which demonstrates how to choose the new rendering engine and then render each page as an image. It also shows you how to print the PDF.

// Start by loading and selecting the new rendering engine
int SetDPLRVal = DPL.SetDPLRFileName(@"C:\Temp\RenderAGG\DebenuPDFRendererDLL1114.dll"); 
int SelectRendVal = DPL.SelectRenderer(3); 

if (SelectRendVal != 3) 
{
MessageBox.Show("DPLR Renderer not loaded");
}

// Load your test file
DPL.LoadFromFile("Test.pdf", ""); 

// Render your test file to a JPEG image
DPL.RenderPageToFile(300, 1, 1, "Test.jpg"); // 300 dpi, JPEG, page 1 

// At the same time you could print
// the test file to a printer

// Configure print options
int iPrintOptions = DPL.PrintOptions(0, 0, "Printing Sample");

// Print the current document to the default 
// printing using the options as configured above

DPL.PrintDocument(DPL.GetDefaultPrinterName(), 1, 1, iPrintOptions);

This article refers to a deprecated product. If you are looking for support for Foxit PDF SDK, please click here.

Updated on May 16, 2022

Was this article helpful?
Thanks for your feedback. If you have a comment on how to improve the article, you can write it here: