|
An array containing the Doc object for each active document. If no documents are active, activeDocs returns nothing; that is, it has the same behavior as d = new Array(0) in core JavaScript.
In versions of
Note:You should be aware of the following version-related information:
In
In
Beginning with the
Beginning with
The array returned by app.activeDocs includes any documents opened by app.openDoc with the bHidden parameter set to true, subject to the security restrictions described above.
Array
R
This example searches among the open documents for the document with a title of myDoc, then inserts a button in that document using the Doc object addField method. Whether the documents must be disclosed depends on the version of
var d = app.activeDocs;
for (var i=0; i < d.length; i++)
if (d[i].info.Title == "myDoc") {
var f = d[i].addField("myButton", "button", 0 , [20, 100, 100, 20]);
f.setAction("MouseUp","app.beep(0)");
f.fillColor=color.gray;
}
If true (the default value), calculations can be performed. If false, calculations are not permitted.
The use of this property is discouraged; the Doc object property calculate is preferred.
Boolean
R/W
7.0 |
|
|
|
A wrapper object for holding various constant values. Currently, this property returns an object with a single property, align.
app.constants.align is an object that has the possible properties left, center, right, top, and bottom, indicating the type of alignment. These values can be used to specify alignment, such as when adding a watermark.
Object
R
See the Doc object methods addWatermarkFromFile and addWatermarkFromText for examples.
Turns the focus rectangle on and off. The focus rectangle is the faint dotted line around buttons, check boxes, radio buttons, and signatures to indicate that the form field has the keyboard focus. A value of true turns on the focus rectangle.
Boolean
R/W
Turn off the focus rectangle.
app.focusRect = false;
4.0 |
|
|
|
The version number of the viewer forms software. Check this property to determine whether objects, properties, or methods in newer versions of the software are available if you want to maintain backward compatibility in your scripts.
Number
R
Toggle fullscreen mode.
if (typeof app.formsVersion != "undefined" && app.formsVersion >= 5.0) {
app.fs.defaultTransition = "";
app.fs.isFullScreen = !app.fs.isFullScreen;
}
else app.fullscreen = !app.fullscreen;
6.0 |
|
|
|
An array of file type conversion ID strings. A conversion ID string can be passed to the Doc object saveAs method.
Array
R
List all currently supported conversion ID strings.
for ( var i = 0; i < app.fromPDFConverters.length; i++)
console.println(app.fromPDFConverters[i]);
5.0 |
|
|
|
A FullScreen object, which can be used to access the fullscreen properties.
Object
R
// This code puts the viewer into fullscreen (presentation) mode.
app.fs.isFullScreen = true;
See also fullScreenObject.isFullScreen.
The use of this property is discouraged; it has been superseded by the FullScreen object property isFullScreen. The fs method returns a FullScreen object that can be used to access the fullscreen properties.
Controls whether the viewer is in full screen mode or regular viewing mode.
Note:A PDF document being viewed from within a web browser cannot be put into full screen mode. Full screen mode can be initiated from within the browser, but applies only to a document open in the
Boolean
R/W
3.01 |
|
|
|
The language of the running
String |
Language |
---|---|
CHS |
Chinese Simplified |
CHT |
Chinese Traditional |
DAN |
Danish |
DEU |
German |
ENU |
English |
ESP |
Spanish |
FRA |
French |
ITA |
Italian |
KOR |
Korean |
JPN |
Japanese |
NLD |
Dutch |
NOR |
Norwegian |
PTB |
Brazilian Portuguese |
SUO |
Finnish |
SVE |
Swedish |
String
R
6.0 |
|
|
|
Defines an extensive number of properties and methods useful for setting up and controlling a multimedia player.
See the app.media object for a listing of the properties and methods of this object, as well as numerous examples of use.
Object
R
6.0 |
|
|
|
A Monitors object, which is an array containing one or more Monitor objects representing each of the display monitors connected to the user’s system. Each access to app.monitors returns a new, up-to-date copy of this array.
A Monitors object also has several methods that can be used to select a display monitor. Alternatively, JavaScript code can look through the array explicitly.
Monitors object
R
Count the number of display monitors connected to the user’s system.
var monitors = app.monitors;
console.println("There are " + monitors.length
+ " monitor(s) connected to this system.");
Note:This method has been superseded by the plugIns property.
Indicates the number of plug-ins that have been loaded by
Number
R
4.0 |
|
|
Specifies whether cross-document links are opened in the same window or opened in a new window.
Boolean
R/W
Open cross-document links in the same window.
app.openInPlace = true;
4.0 |
|
|
|
The platform that the script is currently executing on. There are three valid values:
WIN
MAC
UNIX
String
R
5.0 |
|
|
|
An array of PlugIn objects representing the plug-ins that are currently installed in the viewer.
Array
R
// Get array of PlugIn objects
var aPlugins = app.plugIns;
// Get number of plug-ins
var nPlugins = aPlugins.length;
// Enumerate names of all plug-ins
for ( var i = 0; i < nPlugins; i++)
console.println("Plugin \#"+i+" is " + aPlugins[i].name);
A list of available printer color spaces. Each of these values is suitable to use as the value of the colorProfile property of a PrintParams object.
Array of Strings
R
Print out a listing of available printer color spaces:
var l = app.printColorProfiles.length
for ( var i = 0; i < l; i++)
console.println("(" + (i+1) + ") " + app.printColorProfiles[i]);
6.0 |
|
|
|
A list of available printers. Each of these values is suitable to use in the printerName property of the PrintParams object. If no printers are installed on the system, an empty array is returned.
Array of Strings
R
Print out a listing of available printers:
var l = app.printerNames.length
for ( var i = 0; i < l; i++)
console.println("(" + (i+1) + ") " + app.printerNames[i]);
If true, the background color and hover color for form fields are shown.
Boolean
R/W
If run-time highlighting is off (false), do nothing, otherwise change the preferences.
if (!app.runtimeHighlight)
{
app.runtimeHighlight = true;
app.runtimeHighlightColor = color.red;
}
Sets the color for runtime highlighting of form fields.
The value of this property is a color array. (See Color arrays for details.)
Color array
R/W
See the runtimeHighlight property.
6.0 |
|
|
|
A Thermometer object, which is a combined status window/progress bar that indicates to the user that a lengthy operation is in progress.
Object
R
See the Thermometer object.
Allows a script to show or hide both the horizontal and vertical
Boolean
R/W
Hide the toolbar.
app.toolbar = false;
Note:This property has been deprecated in
Allows a script to show or hide the
Boolean
R/W
Note:This property has been deprecated in
Allows a script to show or hide the
Boolean
R/W
3.01 |
|
|
|
A string that indicates which viewer application is running. It can be one of these values.
Value |
Description |
---|---|
Reader |
|
Exchange |
Adobe |
Exchange-Pro |
|
String
R
5.0 |
|
|
|
Indicates the packaging of the running viewer application. It can be one of these values:
Reader
Fill-In
Business Tools
Full
String
R
4.0 |
|
|
|
Indicates the version number of the current viewer application.
Number
R