|
|
|
6.0 |
|
|
|
References the document's AlternatePresentation object. If the functionality needed to display alternate presentations is not available, this property is undefined.
The AlternatePresentation object provides access to the document's alternate presentations. The PDF language extension specifies that each document can potentially have many named alternate presentations. Each alternate presentation with a known type will have a corresponding alternatePresentations property in the document. This property should have the same name as its alternate presentation and should reference its alternate presentation's AlternatePresentation object. If there are no recognized alternate presentations in the document, this object is empty (does not have any properties).
The
Note:For compatibility with the current implementation, the alternate presentation name must be an ASCII string. The only alternate presentation type currently implemented is “SlideShow”.
See the AlternatePresentation object for properties and methods that can be used to control an alternate presentation.
Object | undefined
R
Test whether the AlternatePresentation object is present:
if( typeof this.alternatePresentations != "undefined" )
{
// Assume AlternatePresentations are present
// List the names of all alternate presentations in the doc
for ( var ap in this.alternatePresentations ) console.println(ap);
}
Get the slide show named MySlideShow and start the show.
// oMySlideShow is an AlternatePresentation object
oMySlideShow = this.alternatePresentations["MySlideShow"];
oMySlideShow.start();
Note:This property has been superseded by the info property.
The author of the document.
String
R/W (
The base URL for the document is used to resolve relative web links within the document. See also URL.
String
R/W
Sets the base URL and creates a link to go to a page relative to the base URL.
console.println("Base URL was " + this.baseURL);
this.baseURL = "http://www.example.com/products/";
console.println("Base URL is " + this.baseURL);
// Add a link to the first page
var link = this.addLink(0, [200,200, 400, 300])
// Set an action that goes to the Example Reader page on the Example website.
link.setAction("this.getURL('reader',false)")
5.0 |
|
|
|
The root bookmark for the bookmark tree. This bookmark is not displayed to the user but is a programmatic construct used to access the tree and the child bookmarks.
Object
R
See the Bookmark object for an example.
4.0 |
|
|
|
If true (the default value), calculations can be performed for this document. If false, calculations cannot be performed for this document. This property supersedes the app.calculate property, whose use is now discouraged.
Boolean
R/W
9.0 |
|
|
|
The value of the collection property is a Collection object of the collection in this PDF. Properties of the collection may be changed through the Collection object.
Note:A PDF file cannot be converted into a PDF collection. The attribute of a document as a PDF collection cannot be removed.
If a new collection is desired, use app.newCollection.
Collection object or a null object if there is no collection in this PDF.
R
if (this.collection) {
var collection = this.collection;
// Do something with the collection...
}
Note:This property has been superseded by the info property.
The document’s creation date.
Date
R
Note:This property has been superseded by the info property.
The creator of the document (for example, “Adobe FrameMaker” or “Adobe PageMaker”).
String
R
5.0 |
|
|
|
An array containing all the named Data objects in the document.
Related properties and methods are openDataObject, getDataObject, createDataObject, importDataObject, removeDataObject, getDataObjectContents, and setDataObjectContents.
Array
R
List all embedded files in the document.
var d = this.dataObjects;
for (var i = 0; i < d.length; i++)
console.println("Data Object[" + i + "]=" + d[i].name);
4.0 |
|
|
|
This property can delay the redrawing of any appearance changes to every field in the document. It is generally used to buffer a series of changes to fields before requesting that the fields regenerate their appearance. If true, all changes are queued until delay is reset to false, at which time all the fields on the page are redrawn.
See also the Field object delay property.
Boolean
R/W
Specifies whether the document needs to be saved as the result of a changes to the document. It is useful to reset the dirty flag when performing changes that do not warrant saving, such as updating a status field.
Note:If the document is temporary or newly created, setting dirty to false has no effect. That is, the user is still asked to save changes before closing the document. See requiresFullSave.
Boolean
R/W
Reset a form and sets dirty to false. After the reset, the user can close the document without having to dismiss a Save dialog box.
var f = this.getField("MsgField");
f.value = "You have made too many mistakes, I’m resetting the form. "
+ "Start over, this time follow the directions!";
this.resetForm();
this.dirty = false;
Fill a text field to instruct the user to complete the form. The script is constructed so that populating the field does not change the save state of the document.
var f = this.getField("MsgField");
var b = this.dirty;
f.value = "Please fill in the fields below.";
this.dirty = b;
Specifies whether the document should be accessible to JavaScript scripts in other documents.
The app.openDoc and app.activeDocs methods check the disclosed property of the document before returning its Doc.
Note:The disclosed property can only be set during batch, console, Page/Open and Doc/Open events. See the event object for a discussion of JavaScript events. See also Privileged versus non-privileged context.
Boolean
R/W
A document can be disclosed to others by placing the code at the document level (or as a page open action) at the top level:
this.disclosed = true;
The following code can be used in an Execute JavaScript Batch Sequence to disclose all selected documents.
this.addScript("Disclosed", "this.disclosed = true;");
6.0 |
|
|
|
An array of two strings in hex-encoded binary format. The first string is a permanent identifier based on the contents of the file at the time it was originally created; it does not change when the file is incrementally updated. The second string is a changing identifier based on the file’s contents at the time it was last updated. These identifiers are defined by the optional ID entry in a PDF file’s trailer dictionary. (See the
Array
R
See Example 6 (Acrobat 7.0) for an example of usage.
6.0 |
|
|
|
The base file name, with extension, of the document referenced by the Doc. The device-independent path is not returned. See also the path and URL properties. The file size of the document can be obtained from the filesize property.
String
R
Get the document file name.
console.println('"The file name of this document is '
+ this.documentFileName +'."');
Executing the script on this document, the
"The file name of this document is js_api_reference.pdf"
7.0 |
|
|
|
Returns true if the document is a dynamic XFA form and false otherwise.
A dynamic XFA form is one in which some of the fields can grow or shrink in size to accommodate the values they contain.
Boolean
R
See the XFA object for an example of usage.
4.0 |
|
|
|
Specifies whether the current document is being viewed in the
Boolean
R
Detect whether this document is in a browser or not.
if ( this.external )
{
// Viewing from a browser
}
else
{
// Viewing in the Acrobat application.
}
3.01 |
|
|
|
The file size of the document in bytes.
Integer
R
Get a readout of the difference in file sizes before and after saving a document:
// Add the following code to the "Document Will Save" section
var filesizeBeforeSave = this.filesize
console.println("File size before saving is " + filesizeBeforeSave);
// Add the following code to the "Document Did Save" section
var filesizeAfterSave = this.filesize
console.println("File size after saving is " + filesizeAfterSave);
var difference = filesizeAfterSave - filesizeBeforeSave;
console.println("The difference is " + difference );
if ( difference < 0 )
console.println("Reduced filesize!");
else
console.println("Increased filesize!");
7.0 |
|
|
|
This property is true if the document’s window is hidden. A window may be hidden, for example, because it is being operated on in batch mode or if it was explicitly opened hidden. The openDataObject and app.openDoc methods can be used to open a document with a hidden window.
Boolean
R
Open a document and verify its hidden status.
oDoc = app.openDoc({
cPath:"/C/myDocs/myHidden.pdf",
bHidden: true
});
console.println("It is " + oDoc.hidden + " that this document hidden.");
oDoc.closeDoc();
7.0.5 |
|
|
|
An instance of the HostContainer object if the PDF document is embedded in another container such as a web browser, otherwise undefined.
Note:This property is not implemented on the Mac OS platform.
Object
R/W
5.0 |
|
|
|
An array of named Icon objects that are present in the document-level named icons tree. If there are no named icons in the document, the property has a value of null.
See also addIcon, getIcon, importIcon, removeIcon, the Field object properties buttonGetIcon, buttonImportIcon, buttonSetIcon, and the Icon object.
Array | null
R
Report the number of named icons in the current document.
if (this.icons == null)
console.println("No named icons in this doc");
else
console.println("There are " + this.icons.length
+ " named icons in this doc");
List all named icons the current document.
for (var i = 0; i < this.icons.length; i++) {
console.println("icon[" + i + "]=" + this.icons[i].name);
}
Specifies an object with properties from the document information dictionary in the PDF file. (See the
Title
Author
Authors (Acrobat 9.0)
Subject
Keywords
Creator
Producer
CreationDate
ModDate
Trapped
For
In
Note:Standard entries are case insensitive, that is, info.Keywords is the same as info.keywords.
Acrobat 9.0 intoduces the Authors (authors) property of the info object. Use Authors to retrieve a seim-colon delimited list of authors. Author information is saved in the XMP metadata, and Doc.info.Authors retrieves the information from the metadata as an array. Individual authors can be accessed. See Example 3 (Acrobat 9.0) below.
Object
R/W (
Get the title of the current document.
var docTitle = this.info.Title;
Get information about the document.
this.info.Title = "JavaScript, The Definitive Guide";
this.info.ISBN = "1-56592-234-4";
this.info.PublishDate = new Date();
for (var i in this.info)
console.println(i + ": "+ this.info[i]);
The above script could produce the following output:
CreationDate: Mon Jun 12 14:54:09 GMT-0500 (Central Daylight Time) 2000
Producer: Acrobat Distiller 4.05 for Windows
Title: JavaScript, The Definitive Guide
Creator: FrameMaker 5.5.6p145
ModDate: Wed Jun 21 17:07:22 GMT-0500 (Central Daylight Time) 2000
SavedBy: Adobe Acrobat 4.0 Jun 19 2000
PublishDate: Tue Aug 8 10:49:44 GMT-0500 (Central Daylight Time) 2000
ISBN: 1-56592-234-4
This example demonstrates how to set and to get multiple authors. Multiple authors may also be entered through the Description tab of the Document Properties dialog box.
Set three authors for this document.
this.info.Authors=["Robat, A. C.", "Obe, A. D.","Torys, D. P."];
Execute this.info.Authors in the JavaScript Debugger Console window, the result is given below.
Robat, A. C.,Obe, A. D.,Torys, D. P.
Get each of the authors.
for (var i=0; i<this.info.Authors.length; i++)
console.println((i+1) + ": " + this.info.Authors[i]);
The result ,as reported in the Console window, is given below.
1: Robat, A. C.
2: Obe, A. D.
3: Torys, D. P.
6.0 |
|
|
|
This property returns an array of screen coordinates (a rectangle) for the
Array of Numbers
R
Read back to the console the
var coords = this.innerAppWindowRect;
console.println(coords.toSource())
// Possible output: [115, 154, 1307, 990]
See also innerDocWindowRect, outerAppWindowRect and outerDocWindowRect.
6.0 |
|
|
|
This property returns an array of screen coordinates (a rectangle) for the
The document and application rectangles may differ on different platforms. For example, on Windows, the document window is always inside the application window; on Mac OS, they are the same.
Array of Numbers
R
See also innerAppWindowRect, outerAppWindowRect, outerDocWindowRect, and pageWindowRect.
7.0.5 |
|
|
|
A Boolean value indicating whether the document is currently in a modal state (for example, displaying a modal dialog box using app.execDialog).
Object
R
Note:This property has been superseded by the info property.
The keywords that describe the document (for example, “forms”, “taxes”, “government”).
Object
R/W (
5.0 |
|
|
|
Changes the page layout of the current document. Valid values are:
SinglePage
OneColumn
TwoColumnLeft
TwoColumnRight
In
TwoPageLeft
TwoPageRight
String
R/W
Put the document into a continuous facing layout where the first page of the document appears in the left column:
this.layout = "TwoColumnLeft";
6.0 |
|
|
|
An object that contains multimedia properties and methods for the document. The properties and methods are described under the Doc.media object.
Doc.media object
R/W
Allows you to access the XMP metadata embedded in a PDF document. Returns a string containing the metadata as XML. For information on embedded XMP metadata, see the
String
R/W
RaiseError is thrown if setting metadata to a string not in XMP format.
Try to create metadata not in XMP format.
this.metadata = "this is my metadata";
RaiseError: The given metadata was not in the XMP format
Global.metadata:1:Console undefined:Exec
===> The given metadata was not in the XMP format
Create a PDF report file with metadata from a document.
var r = new Report();
r.writeText(this.metadata);
r.open("myMetadataReportFile");
(
var CopyrightStatus = "True";
var CopyrightNotice = "Copyright(C) 2006, Example Systems, Inc."
var CopyrightInfoURL = "http://www.example.com"
var meta = this.metadata;
var myXMPData = new XML(meta);
myx = new Namespace("adobe:ns:meta/");
myrdf = new Namespace("http://www.w3.org/1999/02/22-rdf-syntax-ns#");
mypdf = new Namespace("http://ns.adobe.com/pdf/1.3/");
myxap = new Namespace("http://ns.adobe.com/xap/1.0/");
mydc = new Namespace("http://purl.org/dc/elements/1.1/");
myxapRights = new Namespace("http://ns.adobe.com/xap/1.0/rights/");
var p = myXMPData.myrdf::RDF.myrdf::Description;
/*
We test whether this element has a value already, if no, we assign it a
value, otherwise we assign it another value.
*/
if (p.mydc::rights.myrdf::Alt.myrdf::li.toString() == "") {
p[0] += <rdf:Description rdf:about=""
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<dc:rights>
<rdf:Alt>
<rdf:li xml:lang="x-default">
{CopyrightNotice}
</rdf:li>
</rdf:Alt>
</dc:rights>
</rdf:Description>
} else
p.mydc::rights.myrdf::Alt.myrdf::li = CopyrightNotice;
/*
Some elements are converted into attributes, so we need to first test
whether the xapRights:Marked attribute is present, if not, we add it in as an
element; otherwise, if the attribute is present, we update the attribute.
Acrobat changes certain elements into attributes; the xapRights:Marked and
xapRights:WebStatement are two such examples, but dc:rights above is one
that is not changed into an attribute.
*/
if (p.@myxapRights::Marked.toString() == "" ) {
p[0] += <rdf:Description rdf:about=""
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xapRights="http://ns.adobe.com/xap/1.0/rights/">
<xapRights:Marked>{CopyrightStatus}</xapRights:Marked>
<xapRights:WebStatement> {CopyrightInfoURL} </xapRights:WebStatement>
</rdf:Description>
} else {
p.@myxapRights::Marked = CopyrightStatus;
p.@myxapRights::WebStatement = CopyrightInfoURL;
}
// Convert myXMPData into a string
myNewXMPStr=myXMPData.toXMLString();
// and assign it to the document metadata
this.metadata = myNewXMPStr;
Note:This property has been superseded by the info property.
The date the document was last modified.
Date
R
7.0 |
|
|
|
Gets the x coordinate of the mouse coordinates in default user space in relation to the current page.
Number
R
Get the coordinates of the mouse as the user moves it around the viewer.
function getMouseCoor() {
console.println( "("+this.mouseX+","+ this.mouseY+")" );
}
var ckMouse = app.setInterval("getMouseCoor()", 100);
var timeout = app.setTimeOut(
"app.clearInterval(ckMouse); app.clearTimeOut(timeout)",2000);
7.0 |
|
|
|
Gets the y coordinate of the mouse coordinates in default user space in relation to the current page.
Number
R
7.0 |
|
|
|
This property can be used to turn off the auto-complete feature of
If true, no suggestions are made as the user enters data into a field.
If false, auto-complete respects the user preference Forms > Auto-Complete.
Setting this property does not change the user’s auto-complete preferences.
Initially, this property has a value of undefined.
Boolean
R/W
The following script could be executed from an open page action or as a top-level document JavaScript. It turns off the auto-complete feature:
this.noautocomplete = true;
4.0 |
|
|
|
The total number of fields in the document. See also getNthFieldName.
Integer
R
console.println("There are " + this.numFields + " in this document");
This script uses the numFields property and getNthFieldName method to loop through all fields in the document. All button fields are changed so that they have a beveled appearance (other modifications to the buttons of the document can also be made).
for ( var i = 0; i < this.numFields; i++) {
var fname = this.getNthFieldName(i);
if ( fname.type = "button" ) f.borderStyle = border.b;
}
3.01 |
|
|
|
The number of pages in the document.
Integer
R
console.println("There are " + this.numPages + " in this document");
Delete the last page from the document. The (0-based) page number of the last page in the document is this.numPages - 1.
this.deletePages({ nStart: this.numPages - 1 });
Note:This property has been superseded by templates.
The number of templates in the document.
Integer
R
3.01 |
|
|
|
The device-independent path of the document, for example:
/c/Program Files/Adobe/Acrobat 5.0/Help/AcroHelp.pdf
String
R
The file name of the document can be acquired by the documentFileName property. See also the URL property.
6.0 |
|
|
|
This property returns an array of screen coordinates (a rectangle) for the
Array of Numbers
R
See also innerAppWindowRect, outerDocWindowRect, outerDocWindowRect, and pageWindowRect.
6.0 |
|
|
|
This property returns an array of screen coordinates (a rectangle) for the
The application and document rectangles may differ on different platforms. For example, on Windows, the document window is always inside the application window. In Mac OS, the windows are the same.
Array of Numbers
R
See also innerAppWindowRect, outerDocWindowRect, outerAppWindowRect, and pageWindowRect.
3.01 |
|
|
|
Gets or sets the current page of the document. When setting pageNum to a specific page, remember that the values are 0-based.
Integer
R/W
Go to the first page of the document.
this.pageNum = 0;
Advance the document to the next page.
this.pageNum++;
6.0 |
|
|
|
An array of screen coordinates (a rectangle) for the
Array of Numbers
R
See also innerAppWindowRect, outerDocWindowRect, outerAppWindowRect, and outerDocWindowRect.
6.0 |
|
|
|
A Boolean value specifying whether the permissions for this document have been resolved.
When downloading over a network connection, false can indicate that the document is not available, in the case where permissions must be determined based on an certification signature that covers the entire document.
Boolean
R
Note:This property has been superseded by the info property.
The producer of the document (for example, “
String
R
7.0 |
|
|
|
This property is true if the document requires a full save because it is temporary or newly created. Otherwise, it is false.
Boolean
R
var oDoc = app.newDoc();
console.println("It is " + oDoc.requiresFullSave
+ " that this document requires a full save.");
5.0 |
|
|
|
The name of the security handler used to encrypt the document. Returns null if there is no security handler (for example, the document is not encrypted).
String
R
console.println(this.securityHandler != null ?
"This document is encrypted with " + this.securityHandler
+ " security." : "This document is unencrypted.");
This script could print the following if the document was encrypted with the standard security handler.
This document is encrypted with Standard security.
An array of Annotation objects corresponding to all currently selected markup annotations.
See also getAnnot and getAnnots.
Array
R
Show all the comments of selected annotations in the console.
var aAnnots = this.selectedAnnots;
for (var i=0; i < aAnnots.length; i++)
console.println(aAnnots[i].contents);
5.0 |
|
|
|
An array containing all of the named Sound objects in the document.
See also getSound, importSound, deleteSound, and the Sound object.
Array
R
var s = this.sounds;
for (i = 0; i < s.length; i++)
console.println("Sound[" + i + "]=" + s[i].name);
5.0 |
|
|
|
An array specifying the dictionary search order for this document. For example, the form designer of a medical form may want to specify a medical dictionary to be searched first before searching the user’s preferred order.
The Spelling plug-in first searches for words in this array, then searches the dictionaries the user has selected on the Spelling Preference panel. The user’s preferred order is available from spell.dictionaryOrder. An array of the currently installed dictionaries can be obtained using spell.dictionaryNames.
Note:When setting this property, an exception is thrown if any of the elements in the array is not a valid dictionary name.
Array
R/W
An array specifying the language array search order for this document. The Spelling plug-in first searches for words in this array, then it searches the languages the user has selected on the Spelling Preferences panel. The user’s preferred order is available from spell.languageOrder. An array of currently installed languages can be obtained using the spell.languages property.
Array
R/W
Note:This property has been superseded by the info property.
The document’s subject. This property is read-only in
String
R/W
5.0 |
|
|
|
An array of all of the Template objects in the document. See also createTemplate, getTemplate, and removeTemplate.
Array
R
List all templates in the document.
var t = this.templates
for ( var i=0; i < t.length; i++)
{
var state = (t[i].hidden) ? "visible" : "hidden"
console.println("Template: \"" + t[i].name
+ "\", current state: " + state);
}
|
Note:This property has been superseded by the info property.
The title of the document.
String
R/W (
5.0 |
|
|
|
The document’s URL. If the document is local, it returns a URL with a file:/// scheme for Windows and UNIX and file://localhost/ for Mac OS. This may be different from the baseURL.
String
R
See also the path and documentFileName properties.
7.0.5 |
|
|
|
An opaque object representing the current view state of the document. The state includes, at minimum, information about the current page number, scroll position, zoom level, and field focus.
To set this value, you must use what was previously returned from a read of the value. It can be used to restore the view state of a document.
Note:The object is only defined within an embedded PDF.
Object
R/W
This example gets the view state and sends it to the host application, which can store it and pass it back to the viewer later to restore the view to the original state. This code may be executed by a button in the PDF document. The first entry in the array signals the nature of the message to the host.
if(this.hostContainer)
{
cVState = this.viewState.toSource();
aMsg = new Array( "viewState", cVState );
this.hostContainer.postMessage(aMsg);
}
In the host application, the message handler might have this form:
var cViewState=""; // Variable to save the viewState
function onMessageFunc( stringArray )
{
var PDFObject = document.getElementById( PDFObjectID );
if ( this != PDFObject.messageHandler )
alert( "Incorrect this value in onMessage handler" );
// The first entry in the encoming array is the signal
var signal = stringArray[0];
switch ( signal ) {
case "Msg":
var msgStr = "";
for ( var i = 1; i < stringArray.length; i++ )
msgStr += (stringArray[ i ] + "<br>");
writeMsg( msgStr ); // A function to write to the document.
break;
case "viewState":
// View state, let's save this
cViewState = stringArray[1];
break;
}
}
You can post the value of cViewState back to the embedded PDF using a button. Within the document level JavaScript of the PDF, you might have,
if ( this.hostContainer )
{
myHostContainer = this.hostContainer;
myHostContainer.messageHandler = {
onMessage: function(aMessage) {
var f = this.doc.getField("msg4pdf");
var strValue = "";
var signal = aMessage[0];
switch ( signal ) {
case "Msg":
for(var i = 1; i < aMessage.length; i++)
strValue += aMessage[i] + "\r";
f.value = strValue;
break;
case "viewState":
var restoreViewState = eval( aMessage[1] );
// Reset the viewState, begin sure to acquire the correct
// Doc as the doc property of this.
this.doc.viewState = restoreViewState;
break;
}
},
onError: function(error, aMessage) {
console.println("error: "+ error.toString())
},
onDisclose: HostContainerDisclosurePolicy.SameOriginPolicy,
allowDeliverWhileDocIsModel: true
};
// The this object will be the messageHandler instance that the
// method is being called on, so we save the Doc as a doc
// property of the messageHandler instance.
myHostContainer.messageHandler.doc = this;
}
6.0.2 |
|
|
|
The property is defined only if the document is an XML form, that is, if the document was created in LiveCycle Designer. When defined, xfa is a static XFAObject, which is the root node of the underlying xfa model, and gives access to the xfa scripting object model (SOM).
Refer to the document Adobe XML Form Object Model Reference for details on the xfa SOM. The document Converting
Note:When executing this property from a folder level script, pass the Doc object from the document so that xfa will be executed in the proper context. See Example 2.
XFAObject
R
Suppose this document is an XML form, and that there is a text field named EmployeeName. This example uses the xfa object to access and change the value of this field.
var eN = this.xfa.form.form1.EmployeeName;
console.println("\nEmployeeName: " + eN.rawValue);
The output to the console is
EmployeeName: A. C. Robat
Now change the value of the EmployeeName.
eN.rawValue = "Robat, A. C."
console.println("\nEmployeeName: " + eN.rawValue);
The output to the console is
EmployeeName: Robat, A. C.
The value of the field is changed.
Call a function, defined in a folder level script file, that uses the xfa property, by passing the Doc object.
function isXFA(doc) {
var wasWasNot = (typeof doc.xfa == "undefined") ? "not" : "";
console.println("This document was "+wasWasNot+"created by Designer.");
}
From within the document, or from the console, the function is called is by isXFA(this).
8.0 |
|
|
|
Returns true if the document is an XFA Foreground type of form and false otherwise.
Beginning with version 8.0, a PDF file can be imported as artwork into LiveCycle Designer. The possibly rich graphical content of the PDF is used as a background on which form fields can be placed using LiveCycle Designer. The XFAForeground property reports back whether the PDF was created in this way, a value of true means the PDF was imported into LiveCycle Designer as artwork, then saved by LiveCycle Designer.
Boolean
R
This script determines whether the current document is an XFA Foreground type of form, that is, whether it was created by importing a PDF into LiveCycle Designer and saved.
if ( this.XFAForeground )
console.println("This is an XFA Foreground form.");
3.01 |
|
|
|
The current page zoom level. Allowed values are between 8.33% and 6400%, specified as a percentage number. For example, a zoom value of 100 specifies 100%.
Number
R/W
Zoom to twice the current zoom level.
this.zoom *= 2;
Set the zoom to 200%.
this.zoom = 200;
3.01 |
|
|
|
The current zoom type of the document. The table below lists the valid zoom types.
The convenience zoomtype object defines all the valid zoom types and is used to access all zoom types.
Zoom type |
Keyword |
Version |
---|---|---|
NoVary |
zoomtype.none |
|
FitPage |
zoomtype.fitP |
|
FitWidth |
zoomtype.fitW |
|
FitHeight |
zoomtype.fitH |
|
FitVisibleWidth |
zoomtype.fitV |
|
Preferred |
zoomtype.pref |
|
ReflowWidth |
zoomtype.refW |
6.0 |
String
R/W
Set the zoom type of the document to fit the width.
this.zoomType = zoomtype.fitW;