DynaPDF Manual - Page 210

Previous Page 209   Index   Next Page 211

Function Reference
Page 210 of 860
The PDF/A Extension represents in fact the unrestricted version of this and related functions
(ReplaceFont() and so on) which are required to convert arbitrary PDF files to PDF/A.
If the parameter Type is set to ctNormalize the function checks the PDF file for errors, rebuilds all
embedded fonts, optionally embeds non-embedded fonts, and repairs potential file errors if
possible. The resulting PDF file is easy to read and should not produce any printing error.
Normalization is useful in print workflows to detect potential errors before the file will be printed.
This feature can be used to check imported PDF files or pages. It is not meaningful when creating
new PDF files with DynaPDF.
Note that the flag if2Normalize must be set with SetImportFlags2() when importing external PDF
files. This flag enables additional error checks during import.
Note also that CheckConformance() is no preflight function! It is possible to check whether a PDF
file can be converted to PDF/A but it is not possible to check whether a file is already a valid PDF/A
file!
This is a big difference since a preflight function must apply many additional checks, e.g. if PDF
objects are formatted as described in the PDF/A standard, as well as all other requirements are meet.
Such checks are not required in a converter since the file structure and most objects will be rebuild
when the file is stored. It is not planned to extend the function with preflight capabilities in the near
future.
The function supports a large set of processing options but most of them are only meaningful if
imported PDF files or imported pages should be converted to PDF/A.
Notice
CheckConformance() cannot check glyph outlines of simple TrueType fonts because the required
overhead would be too large. However, the function makes sure that outlines will be checked when
CloseFile() is called. Therefore, be aware that CloseFile() can fail also if CheckConformance()
succeeds.
Important callback functions
OnFontNotFound
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.
OnReplaceICCProfile
The OnReplaceICCProfile callback function is optional too, but mostly required! The callback function
is called whenever a device color space is used and if no corresponding output intent or default ICC
 

Previous topic: ChangeSeparationColor, CheckCollection, CheckConformance

Next topic: General requirements when creating PDF/A files: