Scripting Guide
Page 1
Acrobat JavaScript bc Scripting Guide Technical Note #5430 Version: Acrobat 6.0 ADOBE SYSTEMS INCORPORATED Corporate Headquarters 345 Park Avenue San Jose, CA 95110-2704 (408) 536-6000 http://partners.adobe.com May 2003
Acrobat JavaScript bc Scripting Guide Technical Note #5430 Version: Acrobat 6.0 ADOBE SYSTEMS INCORPORATED Corporate Headquarters 345 Park Avenue San Jose, CA 95110-2704 (408) 536-6000 http://partners.adobe.com May 2003
Scripting Guide
Page 2
... of IBM Corporation in the United States and/or other countries. All other countries. PostScript is a registered trademark of Adobe Systems Incorporated. The name PostScript also is subject to be reproduced or transmitted, in the text are the property of ...publication and the information herein is furnished AS IS, is used as defined by Adobe Systems Incorporated. UNIX is the property of the Adobe Systems Incorporated. Adobe, the Adobe logo, Acrobat, the Acrobat logo, Acrobat Capture, Distiller, PostScript, the PostScript logo, and Reader are either registered trademarks...
... of IBM Corporation in the United States and/or other countries. All other countries. PostScript is a registered trademark of Adobe Systems Incorporated. The name PostScript also is subject to be reproduced or transmitted, in the text are the property of ...publication and the information herein is furnished AS IS, is used as defined by Adobe Systems Incorporated. UNIX is the property of the Adobe Systems Incorporated. Adobe, the Adobe logo, Acrobat, the Acrobat logo, Acrobat Capture, Distiller, PostScript, the PostScript logo, and Reader are either registered trademarks...
Scripting Guide
Page 3
... Guide 8 Font Conventions Used in This Book 9 For More Information 10 Chapter 1 Introduction to Acrobat JavaScript 11 Introduction 11 Chapter Goals 11 Contents 11 Overview 11 What Is Acrobat JavaScript 12 What Can You Do with Acrobat JavaScript 13 Acrobat JavaScript Object Overview 15 The App object 15 The Doc Object 15 Other Common...
... Guide 8 Font Conventions Used in This Book 9 For More Information 10 Chapter 1 Introduction to Acrobat JavaScript 11 Introduction 11 Chapter Goals 11 Contents 11 Overview 11 What Is Acrobat JavaScript 12 What Can You Do with Acrobat JavaScript 13 Acrobat JavaScript Object Overview 15 The App object 15 The Doc Object 15 Other Common...
Scripting Guide
Page 4
Contents Using the Built-in Acrobat JavaScript Editor 24 Using an External Editor 24 Additional Editor Capabilities 24 Specifying Additional Capabilities to Your Editor 25 Testing Whether Your Editor Supports Opening ... 27 Enabling JavaScript 27 Enabling the Interactive JavaScript Console 28 Trying out the JavaScript Console 28 Chapter 3 Acrobat JavaScript Debugger 33 Introduction to the Acrobat JavaScript Debugger 33 Chapter Goals 33 Contents 33 Enabling the Acrobat JavaScript Debugger 34 Debugger Dialog Window 36 Main Groups of Controls 36 Debugger View Windows 36 Debugger...
Contents Using the Built-in Acrobat JavaScript Editor 24 Using an External Editor 24 Additional Editor Capabilities 24 Specifying Additional Capabilities to Your Editor 25 Testing Whether Your Editor Supports Opening ... 27 Enabling JavaScript 27 Enabling the Interactive JavaScript Console 28 Trying out the JavaScript Console 28 Chapter 3 Acrobat JavaScript Debugger 33 Introduction to the Acrobat JavaScript Debugger 33 Chapter Goals 33 Contents 33 Enabling the Acrobat JavaScript Debugger 34 Debugger Dialog Window 36 Main Groups of Controls 36 Debugger View Windows 36 Debugger...
Scripting Guide
Page 5
... Calculator 47 Calculator 48 Getting Started 49 Debugging a runtime error 50 Another runtime error 51 Known Issues 52 Summary 53 Chapter 4 Using Acrobat JavaScript in Forms 55 Creating simple JavaScripts 55 Creating an automatic date field 55 Performing Arithmetic Calculations 56 Assigning a 'go to page...programmatically 62 Button 64 Check Box 66 Combo Box 67 List Box 70 Radio Button 71 Signature 72 Text 73 Appendix A A Short Acrobat JavaScript FAQ 75 Where can JavaScripts be found and how are they used 75 Folder Level JavaScripts 75 Document level 75 Field level 76...
... Calculator 47 Calculator 48 Getting Started 49 Debugging a runtime error 50 Another runtime error 51 Known Issues 52 Summary 53 Chapter 4 Using Acrobat JavaScript in Forms 55 Creating simple JavaScripts 55 Creating an automatic date field 55 Performing Arithmetic Calculations 56 Assigning a 'go to page...programmatically 62 Button 64 Check Box 66 Combo Box 67 List Box 70 Radio Button 71 Signature 72 Text 73 Appendix A A Short Acrobat JavaScript FAQ 75 Where can JavaScripts be found and how are they used 75 Folder Level JavaScripts 75 Document level 75 Field level 76...
Scripting Guide
Page 6
Contents Restricting Permissions 81 Digital Signatures 81 How can I make restricted Acrobat JavaScript methods available to users 82 How can I lock a document after a signature field has been signed 82 How can I make my documents accessible 83 ... for a field dynamically 87 How can I change the zoom factor programmatically 87 How can I determine if the mouse has entered/left a certain area 88 6 Acrobat JavaScript Scripting Guide
Contents Restricting Permissions 81 Digital Signatures 81 How can I make restricted Acrobat JavaScript methods available to users 82 How can I lock a document after a signature field has been signed 82 How can I make my documents accessible 83 ... for a field dynamically 87 How can I change the zoom factor programmatically 87 How can I determine if the mouse has entered/left a certain area 88 6 Acrobat JavaScript Scripting Guide
Scripting Guide
Page 7
...to learning new technologies quickly, and with references to other resources where you have access to the Adobe Acrobat JavaScript functionality that leverage Adobe products. Purpose and Scope The objectives of script is one of interactivity into your PDF forms....plug-in developing solutions that supports developing and deploying Acrobat solutions. ● Providing you could more about Acrobat JavaScript scripting features and use the Acobe Acrobat 6 Pro JavaScript development environment to the Adobe Acrobat JavaScript Scripting Guide. The JavaScript language was developed by...
...to learning new technologies quickly, and with references to other resources where you have access to the Adobe Acrobat JavaScript functionality that leverage Adobe products. Purpose and Scope The objectives of script is one of interactivity into your PDF forms....plug-in developing solutions that supports developing and deploying Acrobat solutions. ● Providing you could more about Acrobat JavaScript scripting features and use the Acobe Acrobat 6 Pro JavaScript development environment to the Adobe Acrobat JavaScript Scripting Guide. The JavaScript language was developed by...
Scripting Guide
Page 8
... 1, "Introduction to your local hard drive. Be sure that give you are familiar with the non-scripting elements of Acrobat, unless otherwise noted. 2. The exercises are described in addition, be equipped to this guide offer in key technical areas...files you should extract the contents of these files to Acrobat JavaScript" ● Chapter 2, "Acrobat JavaScript Editor and Debugger Console" ● Chapter 3, "Acrobat JavaScript Debugger" ● Chapter 4, "Using Acrobat JavaScript in Forms ● Appendix A, "A Short Acrobat JavaScript FAQ" How To Use This Guide Chapters 2...
... 1, "Introduction to your local hard drive. Be sure that give you are familiar with the non-scripting elements of Acrobat, unless otherwise noted. 2. The exercises are described in addition, be equipped to this guide offer in key technical areas...files you should extract the contents of these files to Acrobat JavaScript" ● Chapter 2, "Acrobat JavaScript Editor and Debugger Console" ● Chapter 3, "Acrobat JavaScript Debugger" ● Chapter 4, "Using Acrobat JavaScript in Forms ● Appendix A, "A Short Acrobat JavaScript FAQ" How To Use This Guide Chapters 2...
Scripting Guide
Page 9
... and literal values in code examples AFSimple_Calculate( cFunction , cFields ) Live links to Web pages The Acrobat Solutions Network URL is: http://partners/adobe.com/asn/ Live links to the following conventions. Acrobat SDK documents Live links to other Acrobat SDK documents PostScript language and PDF operators, keywords, dictionary key names The setpagedevice operator User...
... and literal values in code examples AFSimple_Calculate( cFunction , cFields ) Live links to Web pages The Acrobat Solutions Network URL is: http://partners/adobe.com/asn/ Live links to the following conventions. Acrobat SDK documents Live links to other Acrobat SDK documents PostScript language and PDF operators, keywords, dictionary key names The setpagedevice operator User...
Scripting Guide
Page 10
...when you install the SDK. Then install them in the appropriate directories. Core JavaScript Reference ● Acrobat eForms Solution Training (http://partners.adobe.com) ● Acrobat Review and Markup Training (http://partners.adobe.com) ● Portable Document Format (PDF) Reference, Version 1.4 In this scripting guide. It...same directory structure in which they appear in the SDK. You can use the Acrobat SDK Documentation Roadmap located at the beginning of all the documents, please visit Adobe Solutions Network Web site to find the documents you need. Preface For More ...
...when you install the SDK. Then install them in the appropriate directories. Core JavaScript Reference ● Acrobat eForms Solution Training (http://partners.adobe.com) ● Acrobat Review and Markup Training (http://partners.adobe.com) ● Portable Document Format (PDF) Reference, Version 1.4 In this scripting guide. It...same directory structure in which they appear in the SDK. You can use the Acrobat SDK Documentation Roadmap located at the beginning of all the documents, please visit Adobe Solutions Network Web site to find the documents you need. Preface For More ...
Scripting Guide
Page 11
...Object containment hierarchy and briefly state for what you can do with Acrobat JavaScript? Acrobat JavaScript Object Overview Overview Most people know Adobe Acrobat as buttons to : ● Describe the difference between Acrobat JavaScript and standard, or HTML JavaScript. ● List what purpose...on page 10. You can enhance an Adobe Portable Document Format (PDF) document so that you can use Acrobat JavaScript to implement solutions to Acrobat JavaScript Introduction This chapter introduces Adobe Acrobat JavaScript. The JavaScript development environment for exchanging ...
...Object containment hierarchy and briefly state for what you can do with Acrobat JavaScript? Acrobat JavaScript Object Overview Overview Most people know Adobe Acrobat as buttons to : ● Describe the difference between Acrobat JavaScript and standard, or HTML JavaScript. ● List what purpose...on page 10. You can enhance an Adobe Portable Document Format (PDF) document so that you can use Acrobat JavaScript to implement solutions to Acrobat JavaScript Introduction This chapter introduces Adobe Acrobat JavaScript. The JavaScript development environment for exchanging ...
Scripting Guide
Page 12
... documents have great versatility since they can export just the comment "layer" to Adobe PDF. Not only can you can tie Acrobat JavaScript code to fill out forms and submit them via an Acrobat plug-in Web-based applications. In this situation, you still have access to an... eForms can customize the behavior of a particular PDF document, implement additional functionality beyond what Acrobat provides, and alter the appearance of ISO-16262, formerly known as ECMAScript. When a reviewer views an Adobe PDF document in a Web browser, also known as an eForm. To share comments on...
... documents have great versatility since they can export just the comment "layer" to Adobe PDF. Not only can you can tie Acrobat JavaScript code to fill out forms and submit them via an Acrobat plug-in Web-based applications. In this situation, you still have access to an... eForms can customize the behavior of a particular PDF document, implement additional functionality beyond what Acrobat provides, and alter the appearance of ISO-16262, formerly known as ECMAScript. When a reviewer views an Adobe PDF document in a Web browser, also known as an eForm. To share comments on...
Scripting Guide
Page 13
... Network (ASN) has an Adobe Acrobat JavaScript Training course that collect numeric data. You ...provided on the form, and so on "JavaScript Basics" for more information. ● Modifying the Acrobat application Acrobat gives you the ability to initialize functions and variables used by using document-level scripts. Like a ... associated script. See "Performing Validations and Calculations" in a PDF file available at: http://partners.adobe.com/asn/developer/training/acrobat/javascript/main.html The ASN course includes: ● Performing calculations You can tie JavaScript code, ...
... Network (ASN) has an Adobe Acrobat JavaScript Training course that collect numeric data. You ...provided on the form, and so on "JavaScript Basics" for more information. ● Modifying the Acrobat application Acrobat gives you the ability to initialize functions and variables used by using document-level scripts. Like a ... associated script. See "Performing Validations and Calculations" in a PDF file available at: http://partners.adobe.com/asn/developer/training/acrobat/javascript/main.html The ASN course includes: ● Performing calculations You can tie JavaScript code, ...
Scripting Guide
Page 14
... such changes include: - Altering actions associated with different choices - See the ASN JavaScript training module on "Batch Processing with Acrobat JavaScript? ● Dynamically modifying a document's appearance and function One major advantage of electronic form documents is a blueprint for ...additional information. ● Processing multiple PDF files using Adobe Acrobat's collaborative review capabilities, you need to be displayed or hidden, you review in the template on an expense report if ...
... such changes include: - Altering actions associated with different choices - See the ASN JavaScript training module on "Batch Processing with Acrobat JavaScript? ● Dynamically modifying a document's appearance and function One major advantage of electronic form documents is a blueprint for ...additional information. ● Processing multiple PDF files using Adobe Acrobat's collaborative review capabilities, you need to be displayed or hidden, you review in the template on an expense report if ...
Scripting Guide
Page 15
... can get to all of the objects represent items found within a document. The Doc Object Since the primary focus of Adobe product (for more commonly used objects. By interacting with the Acrobat application, a PDF document, or fields and buttons on "Setting up the chain. No object inherits properties or methods of an...
... can get to all of the objects represent items found within a document. The Doc Object Since the primary focus of Adobe product (for more commonly used objects. By interacting with the Acrobat application, a PDF document, or fields and buttons on "Setting up the chain. No object inherits properties or methods of an...
Scripting Guide
Page 16
...batch sequence runs. In addition, you can be stored in the Adobe Reader or Acrobat Standard. Global is assigned to a property of the current underlying document. Other Common Acrobat JavaScript Objects Several objects exist independently of interactively testing code. If...aid and as a property of objects related to the programmer. Console The Console object is accessible. 1 Introduction to Acrobat JavaScript Acrobat JavaScript Object Overview FIGURE 1.1 Doc Object Containment Hierarchy doc annot field sound bookmark template data Figure 1.1 represents the ...
...batch sequence runs. In addition, you can be stored in the Adobe Reader or Acrobat Standard. Global is assigned to a property of the current underlying document. Other Common Acrobat JavaScript Objects Several objects exist independently of interactively testing code. If...aid and as a property of objects related to the programmer. Console The Console object is accessible. 1 Introduction to Acrobat JavaScript Acrobat JavaScript Object Overview FIGURE 1.1 Doc Object Containment Hierarchy doc annot field sound bookmark template data Figure 1.1 represents the ...
Scripting Guide
Page 17
...module on "Integrating with a Database." The combination of utility methods and convenience functions for string and date formatting and parsing. Acrobat JavaScript Scripting Guide 17 Second, JavaScript creates local properties of the JavaScript language. If you were changing. As a developer, ... of objects you can interface to a database by your assigning a value to the new property name. Introduction to Acrobat JavaScript 1 Acrobat JavaScript Object Overview see the ASN JavaScript training module on "Location Matters" and the ASN JavaScript training module on demand...
...module on "Integrating with a Database." The combination of utility methods and convenience functions for string and date formatting and parsing. Acrobat JavaScript Scripting Guide 17 Second, JavaScript creates local properties of the JavaScript language. If you were changing. As a developer, ... of objects you can interface to a database by your assigning a value to the new property name. Introduction to Acrobat JavaScript 1 Acrobat JavaScript Object Overview see the ASN JavaScript training module on "Location Matters" and the ASN JavaScript training module on demand...
Scripting Guide
Page 18
1 Introduction to Acrobat JavaScript Acrobat JavaScript Object Overview 18 Acrobat JavaScript Scripting Guide
1 Introduction to Acrobat JavaScript Acrobat JavaScript Object Overview 18 Acrobat JavaScript Scripting Guide
Scripting Guide
Page 19
... Exercise: Working with the built-in editor or a third-party editor to develop your code. ● Identify the extra capabilities that Acrobat supports on some external editors. ● Invoke the JavaScript console and use to interactively execute code and display print statements. On both ...Windows and Macintosh systems, you have a choice of editor you can implement and test Acrobat JavaScript functionality. To introduce you to a simple method of evaluating short scripts, this chapter, you will introduce the full feature set of...
... Exercise: Working with the built-in editor or a third-party editor to develop your code. ● Identify the extra capabilities that Acrobat supports on some external editors. ● Invoke the JavaScript console and use to interactively execute code and display print statements. On both ...Windows and Macintosh systems, you have a choice of editor you can implement and test Acrobat JavaScript functionality. To introduce you to a simple method of evaluating short scripts, this chapter, you will introduce the full feature set of...
Scripting Guide
Page 20
... Open the debugger window using the Tab key. ● To insert fours spaces at the insertion point, press the Tab key. 20 Acrobat JavaScript Scripting Guide You can format code in your JavaScript code. Use Console's println() method in the JavaScript console using one of evaluating ...line you develop it is also handy for testing and debugging your scripts to print debugging information. Executing JavaScript One way of code, Acrobat only automatically prints to the console the result from the debugger View window. There are printed to the console. Other methods are ...
... Open the debugger window using the Tab key. ● To insert fours spaces at the insertion point, press the Tab key. 20 Acrobat JavaScript Scripting Guide You can format code in your JavaScript code. Use Console's println() method in the JavaScript console using one of evaluating ...line you develop it is also handy for testing and debugging your scripts to print debugging information. Executing JavaScript One way of code, Acrobat only automatically prints to the console the result from the debugger View window. There are printed to the console. Other methods are ...