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