Xojo Conferences
MBSOct2019CologneDE
XDCMarch2020NashvilleUS

DynaPDF Manual - Page 173

Previous Page 172   Index   Next Page 174

Function Reference
Page 173 of 770
const void* Data,
// Pointer UserData of CheckConformance
TICCProfileType Type, // Required ICC profile type to be embedded
SI32 ColorSpace);
// Color space handle
typedef enum
{
ictGray = 0,
ictRGB
= 1,
ictCMYK = 2,
ictLab
= 3
}TICCProfileType;
The function converts a PDF file to a specific PDF standard according to the parameter Type.
The regular DynaPDF versions contain a restricted version of CheckConformance() which cannot be
used if one or more pages from external PDF files were imported.
The conversion of arbitrary imported PDF files requires a separate license of the PDF/A Extension.
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 whether all other requirements
are already 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 the outlines will be checked
when CloseFile() is called. Therefore, be aware that CloseFile() can fail when CheckConformance()
succeeds.
 

Previous topic: CheckCollection, CheckConformance

Next topic: Important callback functions, OnFontNotFound, OnReplaceICCProfile, General requirements when creating PDF/A files: