DynaPDF Manual - Page 178

Previous Page 177   Index   Next Page 179

Function Reference
Page 178 of 787
CheckConformance() cannot check glyph outlines of simple TrueType fonts because the required
overhead would be too large. However, the function makes sure that the outlines will be checked
when CloseFile() is called. Therefore, be aware that CloseFile() can fail when CheckConformance()
Important callback functions
The callback function OnFontNotFound is not required to check newly created PDF files but it should
be set when converting imported PDF files. As shown in the example code, a default font like Arial
can be loaded whenever a PDF font cannot be found on the system. The function checks whether the
font metrics of the replacement font are compatible with the original PDF font.
The OnReplaceICCProfile callback function is optional too, but strongly required! The callback
function is called whenever a device color space is used and if no corresponding output intent or
default ICC 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).

Previous topic: CheckCollection, CheckConformance

Next topic: Type3 font conversion

Start Chat