DynaPDF Manual - Page 190

Previous Page 189   Index   Next Page 191

Function Reference
Page 190 of 818
General requirements when creating PDF/A files:
When importing PDF files or pages, the flag ifPrepareForPDFA must be set with
SetImportFlags().
Fonts must be embedded.
Images must not contain an alpha channel (PDF/A 1b only).
The flag gfUseImageColorSpace should be set when inserting images. This flag makes sure that
embedded ICC profiles will be considered. See SetGStateFlags() for further information.
PDF/A 1a files are tagged PDF files. That means the entire PDF file must be tagged and the
file must be created in the logical reading order. CheckConformance() does not validate the
structure tree and it does not check whether untagged elements are used on a page. See
CreateStructureTree(), OpenTag(), and so on for further information.
PDF/A files require an Ouptut Intent. The output intent represents the destination color
space for which the file was created. The output intent must be added after
CheckConformance() was executed. The required ICC profile must be attached depending
on the return value of the function (see Return Values below).
With CheckConformance() you can check whether prohibited features were used. Once the right
settings are found, it is normally no longer required to call this function when creating new PDF
files. The parameter CheckOptions should be set to coDefault or to zero so that prohibited features
raise an exception.
If you have a license of the PDF/A Extension for DynaPDF, then you can also convert arbitrary
imported PDF files to PDF/A 1b, 2b, or 3b.
In this case, a few additional notes should be considered:
External CMaps should be loaded delayed with SetCMapDir() if possible. The CMaps are
sometimes required, especially for Asian PDF files.
It is strongly recommendet to set an error callback function before CheckConformance() is
executed. The function passes warnings and error messages to the callback function if set.
These messages should be stored in an error log so that the user can check whether changes
were made. Errors are always fatal; the return value is ignored in this case. When a warning
is passed to the error callback function (this is the case when something must be changed),
then the return value can be either 0 to accept the change or -1 to break processing. In the
latter case no PDF file will be produced.
It is also possible to redirect all error messages and warnings into the error log of DynaPDF.
See SetErrorMode() for further information.
The OnFontNotFont callback function is called when a non-embedded font is not available
and if no alternative font could be found on the system (DynaPDF uses already a mapping
table to find good alternative fonts for many common fonts). Note that many PDF files
 

Previous topic: Notice, Important callback functions, OnFontNotFound, OnReplaceICCProfile

Next topic: Type3 font conversion, Summay, Normalization


Start Chat