Specifications

Places a private data item of storage type “base64” or “ref” in the
collection with the specified tag and contents. If an item with the
put( tag : String,
contents : ByteArray,
asPDFObject : Boolean )
same tag already existed, it is replaced by this new item. If
asPDFObject is false, the item is of storage type “base64” and the
binary data is encoded as Base64 before being stored in the XMP
packet. If asPDFObject is true, the item is of storage type “ref” and
the binary data is stored as a PDF stream object, using one or more
lossless encodings as determined by the implementation.
Note: The intention is to avoid introducing new types of stream
encodings to the PDF file which could trigger preflight errors; refer
to the implementation of Certified PDF 1 in this respect.
Removes the private data item with the specified tag from the
collection. If there is no such item, this function does nothing.
remove( tag : String )
AltText class
An AltText object represents a collection of language alternates for a localized property of a
session, certificate or user stored in a CP2 dataset. Each AltText object retains a reference to its
underlying data structure, so it can be used for both reading and writing.
Getters [R]
Returns true if the collection of alternates is empty, false
otherwise. The collection is empty if the underlying property is
absent or if no alternates are listed for the property.
isEmpty( ) : Boolean
Returns one of the collection’s alternates according to the rules
described for the getLocalizedText() function in the XMP data
model.
getLocalizedText( genericLang
: String, specificLang: String )
: String
Returns one of the collection’s alternates, selected by preference
in the following order: the English language string, the default
getText( ) : String
string, or any other language string. The getter returns a
non-empty string as long as there is at least one alternate string.
Setters [W]
These functions may be invoked only on AltText objects associated with the active session or with
a certificate in the active session. Invoking them on any other AltText object is a programming
error and has unpredictable results.
Adds or replaces one of the collection’s alternates according
to the rules described for the setLocalizedText() function in
the XMP data model.
setLocalizedText( value : String,
genericLang : String, specificLang:
String )
Sets the specified string as the English language string and
erases all other alternates from the collection (to avoid
setText( value : String )
discrepancies between the meaning of existing alternates
and the new string).
List classes
Due to limitations in implementation, the scripting API is unable to return an array of sessions,
users, certificates, or AltText objects. Instead, it returns a helper object of the corresponding list
class, that is, SessionList, UserList, CertificateList, or AltTextList respectively.
511
Enfocus Switch 10