Job class
The getEmbeddedDataset() function offers an additional optional argument and additional
semantics related to Certified PDF 2.
- getEmbeddedDataset( writable: Boolean, cp2 : Boolean ) : Dataset
- If the cp2 argument is false or missing, the function behaves as before. If the cp2
argument is true, the function returns a CP2 dataset if the backing file is a PDF
file, otherwise it returns an XMP dataset. The behavior is summarized in the table
below. A returned CP2 dataset adheres to all semantics of an XMP dataset. For example
metadata fields from multiple sources are synchronized into a unified XMP data
model.
When the getEmbeddedDataset() function is invoked on a job for the first time in a certain
entry point, it returns a dataset of the type listed in the table below. If the function is
called again on the same job in the same entry point, it returns the embedded dataset object
that was created in the first call, ignoring the value of the "writable" and "cp2" arguments
in the repeat calls.
CP2 |
Writable |
File format |
Type of dataset returned |
False |
False |
Any |
Read-only XMP |
False |
True |
Supported for update Not supported for update
|
Writable XMP Read-only XMP
|
True |
False |
PDF Other than PDF
|
Read-only CP2 Read-only XMP
|
True |
True |
PDF Other supported for update
Not supported for update
|
Writable CP2 Writable XMP
Read-only XMP
|
Dataset class
The following functions offer slightly expanded semantics.
- getModel( ) : String
- Returns "CP2" for a CP2 dataset; otherwise behaves as before.
- createDefaultMap( ) : Map
- For a CP2 dataset, the "cp2" prefix (with corresponding namespace) is always included
in the map, even if the underlying XMP does not define it (because if does not contain
Certified PDF 2 metadata or because it uses another prefix). Otherwise the function
behaves as before.
XMP data model
The following functions offer slightly expanded semantics.
- finishWriting( )
- For a CP2 dataset, an appropriate Certified PDF 2 signature is written to the backing
file, in addition to updating the XMP and CP2 data structures. These changes are
affected through incremental save. Otherwise, the function behaves as before.
External datasets
Since external datasets can never have the "CP2" data
model, functions applying solely to external datasets are not affected by this specification.
Specifically, the model arguments in the Job.createDataset() and Job.sendToLog() functions do
not support "CP2".