app properties

activeDocs

media

runtimeHighlightColor

calculate

monitors

thermometer

constants

numPlugIns

toolbar

focusRect

openInPlace

toolbarHorizontal

formsVersion

platform

toolbarVertical

fromPDFConverters

plugIns

viewerType

fs

printColorProfiles

viewerVariation

fullscreen

printerNames

viewerVersion

language

runtimeHighlight

 

activeDocs

5.0

 

S 

 

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 Acrobat earlier than 7.0, executing the script d = app.activeDocs in the console returned [object Global] to the console. Beginning with Acrobat 7.0, no toString() value is output to the console.

Note:You should be aware of the following version-related information:

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.

Type

Array

Access

R

Example

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 Acrobat executing this code and on the placement of the code (for example, console versus mouse-up action).

   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;

   }

calculate

X 

 

 

 

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.

Type

Boolean

Access

R/W

constants

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.

Type

Object

Access

R

Example

See the Doc object methods addWatermarkFromFile and addWatermarkFromText for examples.

focusRect

4.05

P 

 

 

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.

Type

Boolean

Access

R/W

Example

Turn off the focus rectangle.

   app.focusRect = false;

formsVersion

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.

Type

Number

Access

R

Example

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;

fromPDFConverters

6.0

 

 

 

An array of file type conversion ID strings. A conversion ID string can be passed to the Doc object saveAs method.

Type

Array

Access

R

Example

List all currently supported conversion ID strings.

   for ( var i = 0; i < app.fromPDFConverters.length; i++)

      console.println(app.fromPDFConverters[i]);

fs

5.0

 

 

 

A FullScreen object, which can be used to access the fullscreen properties.

Type

Object

Access

R

Example

   // This code puts the viewer into fullscreen (presentation) mode.

   app.fs.isFullScreen = true;

See also fullScreenObject.isFullScreen.

fullscreen

X 

 

 

 

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 Acrobat viewer application, if any, not to the browser itself.

Type

Boolean

Access

R/W

language

3.01

 

 

 

The language of the running Acrobat viewer. It can be one of the following strings.

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

Type

String

Access

R

media

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.

Type

Object

Access

R

monitors

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.

Type

Monitors object

Access

R

Example

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.");

numPlugIns

X 

 

 

 

Note:This method has been superseded by the plugIns property.

Indicates the number of plug-ins that have been loaded by Acrobat.

Type

Number

Access

R

openInPlace

4.0

P 

 

 

Specifies whether cross-document links are opened in the same window or opened in a new window.

Type

Boolean

Access

R/W

Example

Open cross-document links in the same window.

   app.openInPlace = true;

platform

4.0

 

 

 

The platform that the script is currently executing on. There are three valid values:

   WIN

   MAC

   UNIX

Type

String

Access

R

plugIns

5.0

 

 

 

An array of PlugIn objects representing the plug-ins that are currently installed in the viewer.

Type

Array

Access

R

Example

   // 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);

printColorProfiles

6.0

 

 

X 

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.

Type

Array of Strings

Access

R

Example

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]);

printerNames

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.

Type

Array of Strings

Access

R

Example

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]);

runtimeHighlight

6.0

P 

 

 

If true, the background color and hover color for form fields are shown.

Type

Boolean

Access

R/W

Example

If run-time highlighting is off (false), do nothing, otherwise change the preferences.

   if (!app.runtimeHighlight)

   {

      app.runtimeHighlight = true;

      app.runtimeHighlightColor = color.red;

   }

runtimeHighlightColor

6.0

P 

 

 

Sets the color for runtime highlighting of form fields.

The value of this property is a color array. (See Color arrays for details.)

Type

Color array

Access

R/W

Example

See the runtimeHighlight property.

thermometer

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.

Type

Object

Access

R

Example

See the Thermometer object.

toolbar

3.01

P 

 

 

Allows a script to show or hide both the horizontal and vertical Acrobat toolbars of Acrobat 9 or earlier. In Acrobat X, allows a script to show or hide the Plugin Addon Tools panel on the right side of the display area. It does not hide the toolbar (Acrobat 9 or earlier) or the tools panel (Acrobat X), in external windows (that is, in an Acrobat window within a web browser).

Type

Boolean

Access

R/W

Example

Hide the toolbar.

   app.toolbar = false;

toolbarHorizontal

X 

P 

 

 

Note:This property has been deprecated in Acrobat 5.0 and later. If accessed, it acts like toolbar.

Allows a script to show or hide the Acrobat horizontal toolbar. It does not hide the toolbar in external windows (that is, in an Acrobat window within a web browser).

Type

Boolean

Access

R/W

toolbarVertical

X 

P 

 

 

Note:This property has been deprecated in Acrobat 5.0 and later. If accessed, it acts like toolbar.

Allows a script to show or hide the Acrobat vertical toolbar. It does not hide the toolbar in external windows (that is, in an Acrobat window within a web browser).

Type

Boolean

Access

R/W

viewerType

3.01

 

 

 

A string that indicates which viewer application is running. It can be one of these values.

Value

Description

Reader 

Acrobat Reader version 5.0 or earlier / Adobe Reader version 5.1 or later

Exchange 

Adobe Acrobat earlier than version 6.0 / Acrobat Standard version 6.0 or later

Exchange-Pro 

Acrobat Pro version 6.0 or later

Type

String

Access

R

viewerVariation

5.0

 

 

 

Indicates the packaging of the running viewer application. It can be one of these values:

   Reader

   Fill-In

   Business Tools

   Full

Type

String

Access

R

viewerVersion

4.0

 

 

 

Indicates the version number of the current viewer application.

Type

Number

Access

R