Specifications
It is perfectly valid however to access any other XMP metadata (i.e. unrelated
to Certified PDF 2) using the regular XMP access functions on the CP2 dataset,
even intermixed with the use of functions specific for the CP2 data model.
Note: This requires the CP2 data model implementation to update the
Certified PDF 2 information independent of the rest of the XMP packet or –
Other XMP
Metadata
if this is not possible – to detect any regular XMP updates and synchronize
when needed.
File level operations
The CP2 data model offers functions to determine whether the underlying
file has a valid Certified PDF 2 signature, and whether it contains a valid
Certified PDF 2 data structure even if the signature is invalid.
Validity
Converting a regular PDF file to a Certified PDF 2 file requires no extra
functions; it can be accomplished as follows:
Creating a Certified
PDF 2 file
• Obtain a writable CP2 dataset for the PDF file.
• Add any relevant Certified PDF 2 metadata information to the dataset
using the CP2 data model functions described later.
• Explicitly finish writing on the dataset or exit the entry point.
Converting a Certified PDF 2 file to a regular PDF file can be accomplished
as follows:
Removing Certified
PDF 2 information
• Obtain a writable CP2 dataset for the Certified PDF 2 file.
• Call the removeCertifiedPDF() function on the CP2 dataset.
• Explicitly finish writing on the dataset or exit the entry point.
The scripting API does not offer any functions to update portions of a PDF
file other than the changes directly related to the Certified PDF 2 data
structures (including the XMP packet and the Certified PDF 2 signature).
Also, in an entry point that obtains a writable CP2 dataset on the incoming
PDF file, it is not allowed to invoke an external application that changes
Changing the PDF
file
that PDF file (or keeps it open for update without actually modifying it).
This is because:
• A writable CP2 dataset keeps the underlying PDF file open for update.
• The process of writing the changes back to a temporary copy of the file
is not under the script programmer’s control. Thus cannot be
coordinated with the external application.
File level validity
Returns true if the backing file for which this dataset was created has
a valid Certified PDF 2 signature; returns false if the file has no
hasValidSignature( ) :
Boolean [R]
conforming signature or if the signature is no longer valid because the
file was modified.
Returns true if the backing file for which this dataset was created
contains a valid Certified PDF 2 data structure with at least one session
hasPreviousSessions( )
: Boolean [R]
494
Enfocus Switch 10










