Author Archives: DebenuLabs

New PDF rendering engine for Debenu Quick PDF Library

Please note that the information and files shared in this blog post are private and confidential and should not be discussed on any public forums until otherwise stated by Debenu.

We’re really excited to share with you a new rendering engine that we’ve been working on for Debenu Quick PDF Library. This new rendering engine no longer relies on GDI+ and has major improvements in the following areas:

  • Full transparency support (transparency groups, soft masks, including all supported blend modes)
  • Shading patterns support (function-based shadings, axial shadings, radial shadings, triangle meshes, coons patch meshes, tensor-product patch meshes)
  • Tiling patterns support (colored, uncolored)
  • Line dash pattern support
  • Image handling improvements (images can now be passed to DPLR as a pure data, new image transformation tool)
  • Additional image rendering filters (bilinear, bicubic) to improve image antialiasing
  • PDF functions bug fixes

This new rendering engine will be part of the standard Debenu Quick PDF Library although it will be a separate DLL which will need to be called from within the main library binary file.

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


  1. Download and install Debenu Quick PDF Library 10.12 from the product updates page (if you haven’t already got it installed. You will need version 10.12 in order to use the new rendering engine.
  2. Download the new Debenu PDF Renderer (DebenuPDFRendererDLL1012.dll is 32-bit and DebenuPDFRenderer64DLL1012.dll is 64-bit) binaries.
  3. In your code call the SetDPLRFileName function to specify the location of the DebenuPDFRenderer.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 Renderer.
  4. Now call either the RenderPageToDC or DARenderPageToDC functions to see the results of the new rendering engine. Currently only rendering to DC (device context) is supported but support will also be added for functions such as RenderPageToFile shortly.

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.

DPL.LoadFromFile("Test.PDF", "");
double pw, ph;
double scale, sx, sy;
if ((DPL.PageRotation() % 180) == 0)
    pw = DPL.GetPageBox(2, 2);  // Width
    ph = DPL.GetPageBox(2, 3);  // Height
    pw = DPL.GetPageBox(2, 3);  // Rotated Height
    ph = DPL.GetPageBox(2, 2);  // Rotated Width
sx = pictureBox1.Width / pw;
sy = pictureBox1.Height / ph;
scale = Math.Min(sx, sy);
int page = 1;
Bitmap b = new Bitmap((int)pictureBox1.Width, (int)pictureBox1.Height, PixelFormat.Format32bppArgb);
using (Graphics g = Graphics.FromImage(b))
    IntPtr dc = g.GetHdc();
	// Point to the new DPLR DLL
    int SetDPLRVal = DPL.SetDPLRFileName(@"C:\Temp\RenderAGG\DebenuPDFRendererDLL1012.dll");
	// Select the new DPLR engine
    int SelectRendVal = DPL.SelectRenderer(3);
	// Render to DC
    DPL.RenderPageToDC(72 * scale, page, (int)dc);
    pictureBox1.Image = b;


Do you like what you see with the new rendering engine? Leave a comment either way, we’d love to hear from you.

Welcome to Debenu Labs

On behalf of the development team at Debenu I would like to introduce you to Debenu Labs.

What is Debenu Labs, I hear you ask? Debenu Labs is where software engineers at Debenu can share prerelease software with Debenu customers and also share prototypes of potential new products and technology with customers as well. Read our mission statement for more details on how we intend to use this site.

The success of Debenu Labs will depend on its usefulness to Debenu’s customers, so as a customer, we would really like to hear your feedback on our beta releases and prototypes. Leave a comment, make a suggestion and get involved.