« Feedback Reports you … | Home | New ChartDirector Con… »

DynaPDF 2.5 Features

This document describes improvements and new features which were added in DynaPDF 2.5. Changes which affect backward compatibility are described in the file compatibility_notes.pdf.

Color spaces
All PDF color spaces can now also be used with images. Most color spaces were already available in DynaPDF 2.0 but the corresponding handling for images was not implemented.
It is also possible to import the image color space as is. This can be very useful if the image is defined in a device independent color space such as Lab or any ICC based color space. See SetGStateFlags() for further information. The section "Color Spaces" in the help file provides detailed information about color spaces and the corresponding image handling.

Content Parser
The function ParseContent() is now fully documented (as well as all other functions) and easier to understand examples were added to the package. It is now also allowed to write contents to the page while the parser is executed.

EMF Conversion
Spool fonts are now automatically loaded when converting spool EMF files. It is no longer required to add the user's temp directory to the list of font search paths. Existing applications should be changed to avoid unnecessary calls of AddFontSearchPath() / ClearHostFonts(). AddFontSearchPath() does no longer consider fonts with the extension tmp.
The EMF converter produces a warning if a spool font cannot be loaded.

Reverse mapping for glyph indexes
DynaPDF applies now a reverse mapping when glyph indexes are used to output text. This enables the extraction of human readable text from the resulting PDF file. Note that

The new encryption flag rsEmbFilesOnly can be used to encrypt embedded files only. This flag can be used in combination with 128 or 256 bit AES encryption.

External Signatures
PDF files can now be signed with an external signature handler like the Windows CryptAPI. This enables also the usage of hardware or software certificates of the system's certificate store. The signature handler must only be able to create DER encoded PKCS# 7 objects because CER encoded PKCS# 7 objects are not supported by Adobe's Acrobat or Reader. See CloseAndSignFileExt() in the help file for further information.

Font handling
DynaPDF supports now OpenType fonts with Postscript outlines as well as external CMaps. External CMaps are very important when creating PDF files for Asian locales because this technology enables the usage of non-embedded OpenType or TrueType based CID fonts in combination with arbitrary CJK encodings. Due to the large number of characters which are typically used in Asian scripts it is often not possible or wished to embed all fonts in the PDF file. The usage of non-embedded CID fonts can greatly reduce the size of the resulting PDF file.
Support for external CMaps is also required to extract human readable text from such documents. See SetCIDFont(), SetCMapDir(), GetPageText(), and ParseContent() for further information.

Font Selection
The font selection algorithm has been improved to enable the selection of arbitrary font weights from 100 (Thin) through 1000 (UltraBlack) in combination with the family name. Prior versions supported the font weights regular and bold only and due to this limitation it was impossible to select other weights with the family name if more weights were installed.
It is now possible to select all font weights from 100 through 1000. If a specific font weight is not available, DynaPDF selects the next thinner weight end emulates the missing weight if necessary (the emulation can also be disabled with SetFontWeight()).
In addition, one font can be installed in up to three different formats (OpenType, TrueType, or Type1) and all these formats are selectable. It is also possible to explicitly disable certain font formats from selection (see SetFontSearchOrder() for further information).
The default font search order has been changed to TrueType, OpenType, Type1, StdFonts. The 14 PDF standard fonts had the highest search priority in prior versions. Also if a standard font was installed on the system it was impossible to select it unless standard fonts were explicitly disabled. This handling was not optimal. System fonts should have a higher priority than standard fonts.

Missing Glyphs
All functions to output text produce now a warning if one or more glyphs could not be found. The warning is passed to the error callback function if set. The return value of the used text function is still true in such a case. This is required to preserve backward compatibility. If no error callback function is used the application can call pdfGetMissingGlyphs() or GetErrorMessage() to determine whether certain glyphs are absent.

Interactive Forms
The new function GetFieldEx() offers much easier access to practically all field properties. It is now also possible to access the children of a group field or radio button directly. The creation of field appearances has been revoked to archive identical results in comparison to Acrobat 9.

Template handling
Placing an imported page on a destination page could be rather difficult with DynaPDF 2.0 especially if the original page was rotated and if it contained a non-normalized media or crop box.
The new function PlaceTemplateEx() considers all the painful things like a maybe existing crop box, original page orientation, clipping, and so on automatically when placing an imported page on a destination page. This function simplifies the handling of such templates a lot.

List of new functions
Many functions in the following list were already available in DynaPDF 2.0 but not documented.

Font API:

BuildFamilyNameAndStyleReturns the family or postscript name
TranslateRawCodeConverts a byte sequence to Unicode


AddDeviceNProcessColorantsDefines used process colorants
AddDeviceNSeparationsDefines used spot colorants
AddImageHelper function to extract images
CloseAndSignFileExtExternal signatures
CloseImageHelper function to extract images
CloseTagTagged PDF
ComputeBBoxComputes the visible area of a page
ConvertColorsConverts inline color operators
CreateAnnotAPCustom appearance for stamps
CreateDeviceNColorSpaceCreates a DeviceN color space
CreateImageHelper function to extract images
CreateStructureTreeTagged PDF
DeleteAcroFormDeletes an Interactive Form
DeleteEmbeddedFileDeletes an embedded file
DeleteJavaScriptsDeletes all global JavaScripts
DeleteXFAFormDeletes an existing XFA form
FinishSignatureFinishes an external signature
FlattenAnnotsFlattens annotations
FreeImageBufferHelper function to extract images
GetAnnotExExtended version of GetAnnot()
GetCheckBoxCharExReturns the character of a check box
GetCMapProperties of an external CMap
GetCMapCountNumber of available external CMaps
GetColorSpaceCountNumber of color space objects
GetColorSpaceObjProperties of a color space
GetColorSpaceObjExProperties of a color space
GetDeviceNAttributesAttributes of a DeviceN color space
GetFieldExExtended version of GetField()
GetFieldEx2Version to access children of a field
GetFontCountNumber of fonts in the document
GetFontExProperties of a font object
GetFontSearchOrderReturns the font search order

Original PDF: dynapdf_2.5_features.pdf
27 04 10 - 10:25