26.07.2012 Views

Nitro PDF Professional User Guide

Nitro PDF Professional User Guide

Nitro PDF Professional User Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

12.12.9.3 color object<br />

© 2008 <strong>Nitro</strong> <strong>PDF</strong> Software<br />

An object that can be used when setting a color in other JavaScript methods and properties.<br />

Example: Sets the text color in the form field “First Name” to red.<br />

this.getField("First Name").textColor = color.red;<br />

Properties & Methods<br />

The color object supports all properties and methods included in the Acrobat JavaScript specification.<br />

12.12.9.4 console object<br />

Forms 87<br />

All JavaScript scripts are executed as the result of a particular event occurring. For each of these events,<br />

JavaScript will create an event object that can be used to get and update information about the current<br />

state of the event.<br />

Example: Executing this JavaScript on the keystroke event will change any input from the user to<br />

uppercase.<br />

event.change = event.change.toUpperCase();<br />

Properties & Methods<br />

The console object supports all properties and methods included in the Acrobat JavaScript specification.<br />

12.12.9.5 event object<br />

Represents a <strong>PDF</strong> form field, and this object contains methods and properties that provide a way to modify<br />

form fields (like you would visually with the form field tools) via JavaScript code.<br />

Example: Changes a hidden field to be visible.<br />

var oField = this.getField("hiddenFieldName");<br />

oField.display = display.visible;<br />

Properties<br />

change<br />

changeEx<br />

commitKey<br />

fieldFull<br />

keyDown<br />

modifier<br />

name<br />

rc

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!