DynaPDF Manual - Page 197

Previous Page 196   Index   Next Page 198

Function Reference
Page 197 of 839
based color space is available. It is also called if an embedded ICC profile must be replaced due to
damages or if an unsupported profile version is used.
The conversion capabilities are very limited if this callback function is not set! If you get an error like
" File uses multiple device color spaces!" then please set this callback function so that ICC profiles
can be loaded if necessary.
General requirements when creating PDF/A files:
When importing PDF files or pages, the flag ifPrepareForPDFA must be set with
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, 3b, 4, 4e, and 4f.
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.

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

Next topic: Type3 font conversion, Summay, Normalization