Changes Across Versions¶
This section summarizes the new features and changes introduced in Acrobat and earlier.
Acrobat XI changes¶
For more information on the following changes, see the JavaScript for Acrobat API Reference and Developing Acrobat Applications Using JavaScript.
Changes to PrintParams object¶
The colorOverride
property of the PrintParams
object is no longer supported.
Acrobat X changes¶
For more information on the following changes, see the JavaScript for Acrobat API Reference and Developing Acrobat Applications Using JavaScript.
New JavaScript version¶
This release supports JavaScript version 1.8.
New util method¶
The new readFileIntoStream
util method loads an external file into a JavaScript stream, optionally encodes it as base64, and returns the content as a base64 encoded stream.
Changes to search object¶
The following changes have been made to the “search” object properties
The
thesaurus
andsoundex
properties have been removedThe
legacySearch
property is now deprecated and always returns false.
Changes to SearchExecuteQuery¶
The following have been removed from nWordOptions
parameter of SearchExecuteQuery
:
kWordOptionSoundsLike
kWordOptionThesaurus
Function SearchIsLegacySearchAvailable deprecated¶
The function SearchIsLegacySearchAvailable
has been deprecated and will always return false.
Enhancements to PDFOptPDFVersion¶
The following have been added to PDFOptPDFVersion
:
kPDFOptAcrobat9
kPDFOptAcrobat10
Enhancements to Doc object¶
In this release, the following enhancements have been made to the Doc
object:
Enhancements to the getDataObjectContents method¶
A NotAllowedError
is thrown and the method fails if it attempts to access the content of an embedded file attachment for which any of the following conditions is true (all file name extension matching is case-insensitive):
The attachment’s file name extension is “.SWF”. If a legitimate .SWF application or module run as part of Acrobat’s Rich Media Annotation or PDF Portfolio navigator is allowed access to the content bytes of .SWF embedded file attachments, it is possible that the legitimate .SWF will load a malicious .SWF.
Note
If you use the Data.MIMEType
property to check whether a Data object represents a .SWF file, note that the MIME type for .SWF files is application/x-shockwave-flash
.
The attachment’s file name extension is “.GIF”, “.JPG”, “.JPEG”, or “.PNG” and the first three bytes of its content have the header signature of a .SWF file (“FWS” or “CWS”). The reason for this security restriction is that the same
ActionScriptflash.display.Loader class load()
method that can be used to load GIF, JPEG, and PNG images can also be used to load a SWF file. If a malicious SWF file’s extension has been altered to that of one of these image types, the SWF could be loaded.
Enhancements to the SaveAs Method¶
The following enhancements have been made to the SaveAs
method of the Doc
object:
New Values of cConvID¶
The following new values of cConvID have been added:
Value |
Valid Extension |
---|---|
|
|
|
|
Deprecated Values of cConvID¶
The conversion IDs listed below are deprecated in Acrobat X. They are not registered but (only when used with the JavaScript doc.saveAs
call) are internally mapped to valid, registered conversion IDs. Support for the deprecated conversion IDs will be fully removed in subsequent Acrobat releases.
Deprecated cConvID |
Equivalent Valid cConvID |
---|---|
|
|
|
|
New timestampSign and certifyInvisibleSign Doc methods¶
For more information on the new Doc methods timestampSign and certifyInvisibleSign
, see the next section, Signature support for Emerging PAdES ETSI ESI standard.
Signature support for Emerging PAdES ETSI ESI standard¶
The European Telecommunications Standards Institute (ETSI) has published a multi-part standard that defines a series of profiles for PAdES—Advanced Electronic Signatures for Portable Document Format (PDF) documents. For more information, see: http://www.etsi.org/website/newsandevents/200909_electronicsignature.aspx
The standard includes a new feature to “timestamp the document”, which adds an invisible timestamp signature to a document. This release provides a corresponding JavaScript Doc
method to do the same. Additionally, the release provides a Doc
method to apply an invisible certification (this is already available as a menu item in Acrobat and is now supported in JavaScript as well). Both these methods take the same parameters as field.signatureSign
, but are at the Doc
level. These methods can only be executed during a batch, console, or application initialization event.
Adding an invisible timestamp¶
The new timestampSign
Doc method adds an invisible timestamp to a document.
NOTE: This method is not available in Reader.
Adding an invisible Certification¶
The new certifyInvisibleSign
Doc method adds an invisible certification to a document.
For more information on these methods, see the description of the Doc
object in the JavaScript API reference.
ADBC Support Removed from Documentation¶
ADBC is not supported since the previous release of Acrobat. In this release, the section on ADBC support has been removed from Acrobat SDK documentation.
Acrobat 9.0 changes¶
Important: For the Mac OS, the location of the user JavaScript folder has changed. Developers may locate this folder by executing the command app.getPath("user",
"javascript")
in the JavaScript debugger console window. Any user folder JavaScript files need to be moved to the new location.
The util
. crackURL
method can now break a URL that uses IPv6 addressing into its components. A new property, nURLType
, is added to the return value object.
The two field properties display
and hidden
no longer require forms rights for them to function in Adobe Reader.
There are two new methods. The app. loadPolicyFile
method is used to specify a cross-domain policy file and the Doc. applyRedactions
method applies redaction marks.
Two new printing parameters were introduced with version 8, but were undocumented. The properties DuplexType
and NumCopies
of the PrintParams
object allow users to set the duplex mode and the number of copies to be printed. There is also a change of status of the printerName
, this property is now available for the Mac OS. The description of the choice of the printer when printerName
is set to the empty string has changed as well.
The property Doc. nocache
, introduced in version 7.0, is now undefined and is removed from the documentation. Beginning with version 8.0, within a browser, when a user navigates away from a page containing a PDF, Acrobat and Adobe Reader now exit very quickly and any temporary data is deleted. If the user navigates back to the PDF, any form data is gone.
There is a new Authors
property to the info
object. This property should be used with a semi-colon delimited list of multiple authors.
Acrobat 9 introduces JavaScript API in support of PDF portfolios (also called portable collections and PDF packages). These are list in the table below.
App object |
methods:
|
Doc object |
properties:
|
Data object |
methods:
|
|
properties:
methods:
|
|
properties:
|
Acrobat 6.0 (and Later) Compatible Media relies on the underlying operating system to locate and launch a multimedia player residing on the user’s system; however, Acrobat 9.0 natively supports Flash video (FLV) and Flash applications (SWF) which can be embedded in, or streamed to, a PDF document. Native support for Flash enables reliable cross-platform playback. No additional media player or specific codec is necessary.
Acrobat 6.0 (and Later) Compatible Media is superseded by the multimedia of Acrobat 9.0, which uses rich media annotations. Developers of PDFs with multimedia assets are, therefore, strongly encouraged to use the rich media annotations of Acrobat 9.
Below is a listing of the JavaScript API that support rich media annotations.
Doc object |
methods:
|
|
properties:
methods:
|
Acrobat 8.1 changes¶
There are new security restrictions for the search
object’s addIndex
, query
, and removeIndex
methods, as well as the spell
object’s removeWord
method. For more information, see those method descriptions.
Acrobat 8.0 changes¶
The JavaScript interpreter now supports E4X, ECMA-357. “EMCAScript for XML (E4X) Specification”, http://www.ecma-international/publications/standards/Ecma-357.htm , documents this specification. An example following metadata
illustrates E4X usage.
The JavaScript category in the Preferences dialog box (Ctrl + K) has a new security check box, “Enable global object security policy”.
When checked, the default, each time a global variable is written to, the origin which set it is remembered. Only origins that match can then access the variable. For files, this means only the file that set it, having the same path it had when the variable was set, can access the variable. For documents from URLs, it means only the web host which set it can access the variable.
There is an important exception to the restrictions described above. Global variables can be defined and accessed in a privileged context, in the console, in a batch sequence and in folder JavaScript.
When not checked, documents from different origins are permitted to access the variable; this is the behavior previous to version 8.0.
See the section on the global
object for additional details and examples.
There is a new restriction on the use of app.execMenuItem
to a list of safe menu items. See the security note.
The following properties and methods are introduced in Acrobat 8.0:
|
properties:
|
CertificateSpecifier Object |
properties:
|
|
properties:
|
|
properties:
methods:
|
|
properties:
methods:
* |
Net.HTTP object |
methods:
|
|
properties:
|
|
properties: Added 22 properties to the RDN object: |
|
properties: The following three properties were previously undocumented.
|
SeedValue Object |
|
|
properties: digestMethod |
The following properties and methods are modified in Acrobat 8.0:
|
methods:
|
|
methods:
|
FDF object |
methods:
|
|
methods:
|
|
properties:
|
LoginParameters Object |
Modified wording of the |
|
The |
Acrobat 7.0.5 changes¶
Columns 5 and 6 of the quick bars have been removed.
The following properties and methods were introduced in Acrobat 7.0.5:
|
methods:
|
|
properties:
|
|
properties:
methods:
|
Embedded PDF object |
properties:
method: |
|
properties:
methods:
|
|
methods:
|
The following properties and methods were modified in Acrobat 7.0.5:
|
methods:
|
Acrobat 7.0 changes¶
The Acrobat Multimedia JavaScript Reference , which appeared as a separate document in version 6.0.2, was merged into the Acrobat JavaScript Scripting Reference , now named JavaScript for Acrobat API Reference . See the section Introduced in Acrobat 6.0.2 for a listing of all multimedia JavaScript objects, properties and methods.
Execution of JavaScript through a menu event is no longer privileged. There is now support for executing privileged code in a non-privileged context.
In versions of Acrobat earlier than 7.0, the JavaScript files AForm.js
, ADBC.js
, Annots.js
, AnWizard.js
, media.js
, and SOAP.js
resided in the App JavaScript folder. Beginning with Acrobat 7.0, these files are not shipped with Acrobat Pro, Acrobat Standard or Adobe Reader. In their place, a precompiled bytecode is used to improve performance. The debugger.js
file in the App folder is not included in the bytecode.
Files in the User JavaScript folder are not included in the precompiled bytecode file.
It is recommended that users put their own .js
files in the user JavaScript folder, the same place where glob.js
resides. JavaScript code that sets up menu items (addMenuItem ) should be put in config.js
in the User JavaScript folder. The location of this folder can be found programmatically by executing app.getPath("user","javascript")
from the console.
Adobe Reader now has a console window. Under Edit > Preferences > JavaScript select Show Console on Errors and Messages. In addition to errors and exceptions, the console can also be opened programmatically with console.show()
. See the console
object for a few other details.
The debugging capability of the JavaScript Debugging window can be made available for Adobe Reader for the Windows and Mac OS platforms. To debug within Adobe Reader, the JavaScript file debugger.js
must be installed, and the Windows registry must be edited appropriately.
Introduced in Acrobat 7.0¶
The following properties and methods were introduced in Acrobat 7.0.
|
methods:
|
|
properties:
|
|
properties:
|
|
properties:
methods:
|
|
methods:
|
|
properties:
methods:
|
Doc.media object |
methods:
|
|
methods:
|
|
properties:
methods:
|
|
methods:
|
|
properties:
|
|
properties:
|
|
|
|
|
|
methods:
|
|
methods:
|
|
methods:
|
Modified in Acrobat 7.0¶
The following properties and methods were changed or enhanced:
|
methods:
|
|
The console window is now available in Adobe Reader. |
|
methods:
|
|
methods:
|
|
methods:
|
|
properties:
|
|
properties:
|
|
properties:
|
|
properties:
methods:
|
|
properties:
methods:
|
|
methods:
|
|
The methods:
|
|
methods:
|
Acrobat 6.0 changes¶
The notion of a safe path was introduced for this version of Acrobat.
Introduced in Acrobat 6.0¶
The following properties and methods were introduced in Acrobat 6:
ADBC object |
SQL types |
|
properties:
methods:
|
|
properties:
methods:
|
|
properties:
methods:
|
|
methods:
|
|
properties:
methods:
|
|
properties:
|
|
methods:
|
|
methods:
|
|
properties:
methods:
|
|
properties:
methods:
|
|
properties:
methods:
|
|
properties:
methods:
|
|
properties:
methods:
|
|
properties:
|
|
properties:
methods:
|
|
properties:
methods:
|
|
methods:
|
|
properties:
methods:
|
|
properties:
methods:
|
|
properties:
|
|
properties:
|
|
properties:
|
|
methods:
|
|
properties:
methods:
|
|
properties:
methods:
|
|
properties:
|
|
properties:
methods:
|
|
properties:
methods:
|
|
methods:
|
Modified in Acrobat 6.0¶
The following properties and methods were changed or enhanced:
|
methods:
|
|
properties:
methods:
|
|
properties:
|
|
properties:
methods:
|
|
Persistent global data only applies to variables of type Boolean, Number or String. Acrobat 6.0 has reduced the maximum size of global persistent variables from 32 KB to 2-4 KB. Any data added to the string after this limit is dropped. |
|
methods:
|
|
The following were introduced in Acrobat 5.0 as properties and methods of the PPKLite Signature Handler Object. In Acrobat 6.0, they are properties and methods of the
methods:
|
|
methods: |
Extended Methods
The Document .getField
method was extended in Acrobat 6.0 so that it retrieves the Field object of individual widgets. See the Field
object for a discussion of widgets and how to work with them.
Deprecated in Acrobat 6.0¶
|
properties: soundex thesaurus |
|
methods:
|
Introduced in Acrobat 6.0.2¶
The following table lists the objects, properties and methods of the Multimedia plug-in. In Acrobat 6.0.2, multimedia JavaScript was documented in a separate document called the “Acrobat Multimedia JavaScript Reference”.
|
properties:
|
app.media object |
properties:
methods:
|
|
properties:
|
Doc.media object |
properties:
methods:
|
|
A new Screen type used with Multimedia along with associated event names. |
|
methods:
|
|
methods:
|
|
properties:
|
|
properties:
methods:
|
|
properties:
|
|
properties:
methods:
|
|
properties:
|
|
properties:
|
|
properties:
|
|
properties:
|
|
methods:
|
|
properties:
methods:
|
|
methods:
|
|
properties:
methods:
|
|
properties:
methods:
|
Acrobat 5.0 changes¶
Introduced in Acrobat 5.0¶
ADBC object |
methods: getDataSourceList newConnection |
|
properties:
methods:
|
|
properties:
methods:
|
|
properties:
methods:
|
|
methods:
|
|
methods:
|
|
properties:
|
|
properties:
methods:
|
|
properties:
|
|
properties:
methods:
|
|
properties:
|
|
methods:
|
|
properties:
|
|
properties:
|
|
properties:
|
PPKLite Signature Handler Object (now listed under the| |
properties:
methods:
|
|
properties:
methods:
|
|
properties:
methods:
|
|
properties:
methods:
|
|
properties:
|
|
properties:
methods:
|
|
properties:
methods:
|
Modified in Acrobat 5.0¶
The console can act as an editor and can execute JavaScript code.
The following properties and methods have been changed or enhanced:
|
|
|
|
|
|
|
|
|
|
The section related to event
object has been greatly enhanced to facilitate better understanding of the Acrobat JavaScript Event model.
Deprecated in Acrobat 5.0¶
The following properties and methods have been deprecated:
|
|
|
|
|
|
|
|
Modified in Acrobat 5.05¶
A new symbol was added to the quick bar denoting which methods are missing from Acrobat Approval.
In the
Doc
object, the propertydisclosed
was added.
Modified in Adobe Reader 5.1¶
Access to the following properties and methods was changed for the Adobe 5.1 Reader:
|
properties:
methods:
|
|
properties:
methods:
|
|
methods:
|