Javascript Samples Scripts
Javascript Samples Scripts
Follow us on Twitter
Acrobat Javascript Samples Scripts
Introduction:
Sample Scripts:
Q&A
What is Acrobat JavaScript?
Acrobat JavaScript enables you to perform calculations in form fields, respond to user actions, validate user data,
modify appearance of Acrobat application, control the behavior of PDF documents, dynamically modify document's
appearance and functions, process multiple PDF documents with batch sequences, dynamically create new pages
based on template, interface to a database. Acrobat JavaScript code can be executed:
- as an action to respond to user input in the document.
- as document-level script to respond to actions like printing.
- as part of a batch processing sequence that can be applied to multiple files.
Acrobat JavaScript enables you to do a wide variety of things within a PDF document. The Adobe Solutions
Network (ASN) has an Adobe Acrobat JavaScript Training course that covers a wide variety of the possibilities
available within Acrobat JavaScript.
Other Acrobat JavaScript documents available from Adobe: Acrobat JavaScript Scripting Guide - provides general
introduction into JavaScript programming for Adobe Acrobat. Acrobat JavaScript Object Specification - contains
detailed description of all Acrobat specific objects and classes.
http://www.evermap.com/javascript.asp[10.07.2010 13:11:51]
Acrobat Javascript Samples Scripts
9. Click “OK” three times until you are back to “Batch Sequence” dialog
10. Now you just created new batch command that will be always available for batch processing.
11. Optional step: click "Output Options" button and define output file name and some additional options. Desired
options may vary depending on script requirements.
12. To run the command: select it from the list of commands and click “Run Sequence” button.
Most sample scripts provided on this page are designed to be run as batch sequences. Most scripts have comments in
the code that will help you to understand the logic and make any custom modifications. EverMap LLC. provides these
scripts for reference only, without warranty of any kind (see disclaimer below). No technical support is provided.
DISCLAIMER: All javascripts on this web site are provided "as is" without warranty of any kind either express or implied,
including but not limited to the implied warranty of merchantability and fitness for a particular purpose. The entire risk
arising out of the use or performance of these scripts and documentation remains with you.
Description: Spellchecks every word in the document and marks misspelled ones with squiggle annotation.
Submitted by: Unknown / from Acrobat JS Guide
Date: 11 Nov 2004
Acrobat Versions: 5.0 and up
Code: MarkMisspelledWords.txt
Description: Extracts all email addresses from the document into new pdf file
Date: 11 Nov 2004
Acrobat Versions: 5.0 and up
Code: ExtractEmails.txt
Description: Extracts all ISBN numbers from the document into new pdf file
Date: 11 Nov 2004
Acrobat Versions: 5.0 and up
Code: ExtractISBN.txt
Description: Extracts all SSN numbers from the document into new pdf file
Date: 11 Nov 2004
Acrobat Versions: 5.0 and up
Code: ExtractSSNs.txt
Description: Extracts URL addresses (http,https,ftp,www...) from the document into new pdf file
Date: 11 Nov 2004
Acrobat Versions: 5.0 and up
Code: ExtractURLs.txt
http://www.evermap.com/javascript.asp[10.07.2010 13:11:51]
Acrobat Javascript Samples Scripts
Description: Delete pages from the document that contain no text elements.
Date: 19 Jan 2005
Acrobat Versions: 5.0 and up
Code: DeletePagesWithoutText.txt
Description: Add "Previous Page", "First Page" and "Next Page" and "Go Back To Previous View" navigation buttons
to the top of every page in the document. Contain simple function for creating a button, illustrates how to set
button attributes, size, action and tooltip. Customize this script to create desired button appearance and behavior.
Date: 17 July 2008
Acrobat Versions: 5.0 and up
Code: AddNavigationButtons.txt
Description: Use this script as an example how to use bookmark titles and rename files. This script takes first 3
bookmarks and creates a custom filename that is used to save a file.
Date: 27 July 2009
Acrobat Versions: 5.0 and up
Code: RenameUsingBookmarks.txt
Description: this script creates unique names for documents based on a current time. This script does not
overwrite existing files.
Date: 28 July 2009
Acrobat Versions: 5.0 and up
Code: SaveFilesWithTimeStamp.txt
Description: this script creates a report document (PDF) that lists all bookmarks in the input file.
Date: 28 July 2009
Acrobat Versions: 5.0 and up
Code: BookmarkReport.txt
http://www.evermap.com/javascript.asp[10.07.2010 13:11:51]