Specifications
For each localized property the scripting API offers a getter and a setter working
with a single string value:
Work with a
single value
• The getter returns one of the available alternates, selected by preference
in the following order: the English language string, the default string, or
any other language string. The getter returns a non-empty string as long
as there is at least one alternate string.
• The setter sets the specified string as the English language string and erases
all other alternates (to avoid discrepancies between the meaning of existing
alternates and the new string).
This is the preferred mechanism for script programs running in an environment
where localization in languages other than English is not relevant.
For each localized property the scripting API also offers a getter that returns
an AltText object, representing the complete set of alternate strings. The AltText
Work with all
alternates
class offers methods to access any language alternate, both for reading and
writing. An AltText object serves as a reference to its underlying localized
property, so it can be used to update the property. Consequently there are no
setters accepting an AltText object. This is the preferred mechanism for script
programs running in an environment that needs localization in languages
other than English.
Session class
A Session object represents a session stored in a CP2 dataset.
Getters [R]
Returns the time when this session was started
(CP2:start_time), or null if the property is absent.
getStartTime( ) : Date
Returns the time when this session was ended
(CP2:end_time), or null if the property is absent.
getEndTime( ) : Date
Returns an unordered list of the editing zone strings
specifying the areas of the PDF file that were changed
getZones( ) : String[]
during this session (CP2:zones), or an empty list if the
property is absent.
Returns the user-supplied comment that describes the
changes to the PDF file during this session (CP2:comment).
getComment( ) : String
This function returns the English language alternate, or the
empty string if the property is absent.
Returns the user-supplied comment that describes the
changes to the PDF file during this session (CP2:comment).
getCommentLocalized( ) : AltText
This function returns the complete set of language
alternates, which is empty if the property is absent. For
the active session, the returned AltText object is writable.
Returns an ordered list of descriptions of the changes to
the PDF file during this session (CP2:change_desc), or an
getChangeDescriptions( ) : String[]
empty list if the property is absent. This function returns
the English language alternate for each item.
Returns an ordered list of descriptions of the changes to
the PDF file during this session (CP2:change_desc), or an
getChangeDescriptionsLocalized( )
: AltTextList
empty list if the property is absent. This function returns
502
Enfocus Switch 10