Specifications
For a CP2 dataset, the “cp2” prefix (with corresponding namespace)
is always included in the map, even if the underlying XMP does not
createDefaultMap( ) : Map
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.
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.
finishWriting( )
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”.
Classes
Changing CP2 metadata
The functions described in this chapter are marked as presented in the
following table.
AvailabilityDescriptionMarker
Function
availability
The function is available
for both read-only and
writable datasets
Indicates a function that reads
from the CP2 dataset but never
changes it
[R]
The function is available
only for writable
datasets
Indicates a function that changes
(or may change) the CP2 dataset
[W]
Invoking a function marked with [W] on a read-only dataset is a programming
error and has unpredictable results.
The objects (sessions, certificates, users, data maps and AltText objects)
represent references to the corresponding objects in the dataset. Any change
Objects are
references
to an object immediately affects the dataset – assuming the change is allowed
according to the rules set forth for each function.
Note: The scripting API is constructed such that all objects – even new ones
– are stored in the dataset before being returned to the script. There are no
constructors, only factory methods that preserve this rule.
Localized text
The Certified PDF 2 specification supports localization by allowing several text properties to contain
alternate text strings in multiple languages. The scripting API offers two ways to handle the
values of such localized properties.
501
Enfocus Switch 10