Specifications

class properties). Such a class may need to be implemented within the
toolkit (so that special hacks can be applied).
Removes the certificate at the specified zero-based index (in the list
returned by getAllCertificates).
After completion of this function, the indexes for the remaining certificates
may have shifted and references to the removed certificate may have
removeCertificateAt(
index : Number )
[W]
become invalid. Using such invalid references is a programming error and
has unpredictable results.
Users
A CP2 dataset can contain zero or more user objects. Each session can reference a user; multiple
sessions can share the same user.
There is a function to create a user object for the active session. If the specified
user turns out to have the same properties as one of the users already present
Active user
in the CP2 dataset, the active session is updated to reference that existing user.
Otherwise a new user object is automatically added to the dataset.
Only active users can be updated. When a user is no longer referenced by any
session (because the referencing sessions have been stripped or removed), the
“orphaned” user object is automatically removed from the dataset.
Note: The C++ toolkit deals with users in a slightly different way; the scripting
API implementation will have to cache the user object and associate either the
Updating users
new object or an existing user object with the active session when the session
is finalized.
Returns a list of all users in the dataset, including the active
user if any, in arbitrary order. The list may be empty.
getAllUsers( ) : UserList [R]
If the active session has an associated user, this function returns
it. If the active session has no associated user, this function
addActiveUser( ) : User [W]
creates a new user object, associates it with the active session
and returns a reference to it.
Removes the active user from the dataset and dissociates the
active session from any user.
removeActiveUser( ) : User [W]
Required and automatic properties
Session, user and certificate objects have optional and required properties, as stated in the
Certified PDF 2 file format specification.
The scripting API automatically generates appropriate values for most (but not
all) required properties and for some optional properties. Some of these
Automatic
properties
automatic properties are not even exposed to the script programmer. Others
are available for reading but can’t be changed under the script programmer’s
control. The following table lists the automatic properties and corresponding
details.
498
Enfocus Switch 10