« xDev 18.5 Issue | Home | Webservice vs. Plugin… »

DynaPDF vs. PDFDocument in Xojo


The DynaPDF plugin exists now for 13 years. DynaPDF itself is older and has been developed long before it's public release 17 years ago. It covers nearly all PDF features in an extensive library and you can use it in your Xojo applications!

As Xojo 2020r1 brought a brand new PDFDocument class, we got questions on how they compare.

The new PDFDocument class allows you to create a PDF in Xojo, draw with the graphics class into it and then save the file. You can use various fonts, draw vector graphics and text on the pages.

With the possibility to record drawing into a JSON block, this class provides an interesting new way to prepare PDF content as template and draw it later. This allows to serialize the drawing commands and reuse them several times. DynaPDF on the other side allows to use real PDF templates, which means you can draw PDF content in a template and then place it on several pages and still have it only once in the file.

Some things you may notice with PDFDocument are, that the class currently does only ANSI encoding and is not fully unicode capable. Fonts are embedded as a whole file, which makes PDF files bigger. Pictures are always RGB and stored as JPEG. Similar to DynaPDF the PDFDocument class may notice if the same picture is used on multiple pages and only store it one time in the file. There is no direct way to draw styled text. (see blog post about Styled Text in DynaPDF). Currently the graphics class integration for DynaPDF allows to draw 2D objects (see Object2D class) and we expect this to be added to the PDFDocument class in a future update.

Here is the DynaPDF feature table with an added column for the new PDFDocument class:


Feature Xojo Starter Lite Professional Enterprise
Available for macOS, Linux and Windows. checked checked checked checked checked
Color spaces DeviceGray, DeviceRGB, DeviceCMYK RGB only checked checked checked checked
Create and Edit JavaScript Functions / JavaScript Actions checked checked checked checked
Creation of Tagged PDF files checked checked checked checked
Create, modify, delete annotations (30+ types) checked checked checked checked
Add actions to annotations like JavaScript, GoToR and GoTo. checked checked checked checked
Custom Page Templates checked checked checked checked
File Attachments / File Attachment Annotations checked checked checked checked
Font Subsetting checked checked checked checked
Full access to content streams checked checked checked checked
JPEG 2000 Compression checked checked checked checked
More than 60 code pages, incl. 17 CJK character sets and Unicode ANSI only checked checked checked checked
Named Destinations checked checked checked checked
Native PDF Transparency for Images (Alpha channels) checked checked checked checked
No differentiation between client and server application checked checked checked checked checked
Royalty free Distribution checked checked checked checked checked
Support for multi-page TIFF's checked checked checked checked
Tables checked checked checked checked
Text formatting, multi-column text Partial checked checked checked checked
Vector graphics, line dash patterns, shadings, patterns Partial checked checked checked checked
Web links, File links, Page links, Bookmarks checked checked checked checked
40 Bit RC4, 128 Bit RC4/AES, 256 Bit AES Encryption checked checked checked
Conformance check for PDF/A creation checked checked checked
Create Interactive Forms checked checked checked
Creation of Layers (Optional Content) checked checked checked
Creation of PDF/A and PDF/X files checked checked checked
Creation of Portable Collections (PDF Packets) checked checked checked
Digital signatures (internal and external) checked checked checked
EMF Conversion checked checked checked
Extract images (except inline images) checked checked checked
Import of PDF files checked checked checked
Merge PDF Files checked checked checked
Output Intents (specifies the destination color space) checked checked checked
Text extraction checked checked checked
16 Blend Modes, ability to set the overprint mode checked checked
3D Annotations checked checked
Additional color spaces CalGray, CalRGB, Indexed, ICCBased, Lab, Separation, DeviceN checked checked
Convert inline color operators to gray checked checked
Extraction images and vector graphics checked checked
Flatten Interactive Forms (conversion to text and vector graphics) checked checked
Optimize PDF files (optimize content streams, scale images, re-compress images, hairline correction, flatten layers) checked checked
Rendering Engine, Print PDF checked checked
Single Page Import of external PDF Pages checked checked
Soft masks, Transparency Groups checked checked
Split PDF files checked checked
Support for external CMaps checked checked
Text Extraction, search and replace text checked checked
Including source codes for dynapdf library (not plugin) checked
Static Library for C/C++ available checked
Conversion of arbitrary imported PDF files to PDF/A optional optional

The conversion of arbitrary imported PDF files to PDF/A requires a separate license of the PDF/A Extension (extra purchase in addition to Pro license).

A DynaPDF Starter license is included in OmegaBundle 2020, which is available for a few more days.

Did we miss something? Comments? Please contact us if you like to point out a feature we missed.

02 09 20 - 09:23