Specifications
Note: After implementation, the scripting API should remove any PDF objects
associated as private data with removed or stripped sessions or with removed
certificates.
Returns a list of all sessions in the dataset, including the active session, in
order of occurrence (that is, the active session is the last session in the list).
getAllSessions( ) :
SessionList [R]
Returns a list of the sessions that were already in the backing file
before the dataset was created, that is, excluding the active session
getPreviousSessions( ) :
SessionList [R]
and any other automatically added sessions. The list is in order
of occurrence (that is, the most recent session is listed last). The
list may be empty.
Returns the active session; this is the only editable session.
getActiveSession( ) : Session
[R]
Notifies the dataset that the specified editing zone(s) have been
touched in the PDF file during the active session. This function
performs three actions:
touchZones( zones : String
| String[] ) : Boolean [W]
• Add the specified zone(s) to the editing zones of the active
session.
• Set the state of any certificate with overlapping zones and
residing in the active session to “Unknown”.
• Cause any certificate with overlapping zones and residing in
previous sessions to become dirty (there is no actual change
in the data structure, just in the internal caches for the
dataset).
The function returns true if any certificate was affected, false
otherwise.
Removes the session at the specified zero-based index (in the list
returned by getAllSessions) and all previous sessions. All certificates
removeSessionsIncluding(
index : Number ) [W]
associated with these sessions and any orphaned users are
removed as well.
Removes all optional information from the session at the specified
zero-based index (in the list returned by getAllSessions). If the
associated user becomes orphaned, it is removed as well.
stripSessionAt( index :
Number ) [W]
Certificates
A CP2 dataset can contain zero or more certificates. Each certificate references the session during
which it was created.
New certificates can be added to a writable dataset. A new
certificate is automatically associated with the active session.
Adding certificates
The class ID of a new certificate must be specified when the certificate
object is constructed which cannot be changed any time later. The
scripting API does not support access to class properties in certificates.
Certificate class
496
Enfocus Switch 10