WinForms PDF Viewer and Document API - DirectX Rendering (v18.1, Beta)

The DevExpress WinForms PDF Viewer and PDF Document API will soon ship with DirectX rendering support.

If you’ve followed our blogs over the last few months, you already know the performance benefits DirectX rendering brings to the table (see our blog posts regarding our WinForms Grid for more information on DirectX). By moving from GDI/GDI+ to DirectX, we’ve radically improved the capabilities of our PDF Viewer and PDF Document API.

Text Quality

In previous versions of our PDF product line, text rendering quality was not as sharp as that available in products from Adobe (especially when scale was small because GDI uses integer coordinates for glyph positioning).

Thanks to DirectX, our upcoming release improves text rendering and text antialiasing. Frankly speaking, the improvement is remarkable: 

Graphics Quality

DirectX also allows us to support antialiased clipping. This feature was not available in previous versions because of GDI related limitations.

Text Rendering Modes

With our upcoming release, our PDF Viewer and PDF Document API will support all six text rendering modes. In addition to previously supported Fill, Fill then Stroke and Invisible modes, DirectX allows us to support Stroke and two Clip rendering modes. These latter modes are used to achieve advanced visual effects, as shown below.


Transparency and Blend Modes

GDI+ uses color values consisting of four components (Red, Green, Blue and Alpha) and provides alpha-blending calculations to mix colors. The PDF standard describes a complex transparency model, which not only supports this standard blend mode, but extends it to a wide set of advanced blend modes. Here are a few examples:

With the new DirectX engine, you will be able to use the power of this transparency model within your documents. 

How to enable it?

Note: Our new DirectX rendering engine is currently in beta. To use it, activate one of the following options:

  • WinForms PDF Viewer: enable the PdfViewer.RenderPageContentWithDirectX option;
  • PDF Document API: enable the PdfDocumentProcessor.RenderPageContentWithDirectX option.

Our DirectX rendering engine will be used by default when it officially ships in our v18.2 release cycle.

Compatibility and Limitations

DirectX support requires the Platform Update for Windows 7 or Windows 8.

Known Issues

The following are known issues – items you need to consider before using DirectX rendering: 

  • Document content is printed as an image.  This leads to a decrease in printing performance.
  • Very large images can be rendered slowly.

to say, we’re working to address these issues before the official release.

We’d love to get your feedback on this new capability. If you are an active Universal Subscriber, make certain to download our most recent beta today.

7 comment(s)
Christopher Jay
Christopher Jay

It's great that you are continuing to update WinForms and adding DirectX support.  Keep it up.  I don't use the PDF Viewer in my app personally, but it's good to see the work being done.

24 April, 2018
Mark Bissett 2
Mark Bissett 2

Regarding the move to DirectX... Any chance on supporting the XtraGridBlending on the GridControl. Currently, if you have these linked to grids and DirectX mode is on, the grid doesn't paint correctly (17.2 tested)...

25 April, 2018
Dmitry Babich (DevExpress)
Dmitry Babich (DevExpress)

@Mark Yes, XtraGridBlending is an outdated component, which doesn't support the DirectX mode. Do you use it to create some transparency effects in your application? If so, would you please share a screenshot illustrating the desired XtraGrid appearance? Probably it can be achieved using another approach. You can post your screenshot in our Support Center if you wish:

www.devexpress.com/ask

25 April, 2018
Sven H
Sven H

Short question: do you also plan to change printing to not use an image that is printed?

I had some issues with quality and printer drivers in the past which is the reason I do not use the pdf preview yet.

30 May, 2018
Office Products Team
Office Products Team

@Sven: We plan to avoid using images for the most common use cases before the official release. However, it will still be required to use images for complex graphics with the advanced transparency model due to the limitations of the rendering context for print devices.

31 May, 2018
HSB
HSB

Some of our users were getting an System.ArgumentException on the Print() method of the PdfDocumentProcessor instance. Setting RenderPageContentWithDirectX to false for the PdfDocumentProcessor instance fixed it.

These were all Windows 7 machines, so they were probably missing the DirectX platform update mentioned in the article.

28 November, 2018
Damon (DevExpress)
Damon (DevExpress)

@HSB: It looks strange. We should automatically detect platform update presence and switch to legacy engine. What version of our components are you using? Can you provide stack trace? Please submit a new ticket in our Support Center, and we will do our best to fix the issue.

28 November, 2018

Please login or register to post comments.