42
Contents
4
Acrobat JavaScript Scripting Guide
Using the Acrobat JavaScript Console. . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Opening the JavaScript Console. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Executing JavaScript. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Formatting Code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Exercise: Working with the JavaScript Console . . . . . . . . . . . . . . . . . . . . . . . 32
Enabling JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Trying out the JavaScript Console. . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Using a JavaScript Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Specifying the Default JavaScript Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Using the Built-in Acrobat JavaScript Editor . . . . . . . . . . . . . . . . . . . . . . . . . 42
Using an External Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Additional Editor Capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Specifying Additional Capabilities to Your Editor . . . . . . . . . . . . . . . . . . . . 43
Testing Whether Your Editor Will Open at Syntax Error Locations . . . . . . . . . . . 44
Using the Acrobat JavaScript Debugger. . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Acrobat JavaScript Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Main Groups of Controls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Debugger View Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Debugger Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Resume Execution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Quit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Step Over . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Step Into . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Step Out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Debugger Scripts Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Accessing Scripts in the Scripts Window . . . . . . . . . . . . . . . . . . . . . . . . 52
Scripts Inside PDF Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Scripts Outside PDF Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Call Stack List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Inspect Details Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Inspect Details Window Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Inspecting Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Watches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Starting the Debugger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Debugging From the Start of Execution . . . . . . . . . . . . . . . . . . . . . . . . . 59
Debugging From an Arbitrary Point in the Script. . . . . . . . . . . . . . . . . . . . . 60
Exercise: Calculator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
39
Acrobat JavaScript Scripting Guide
5
Contents
Calculator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Chapter 3
Acrobat JavaScript Contexts . . . . . . . . . . . . . . . .63
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Chapter Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Introduction to Acrobat JavaScript Contexts . . . . . . . . . . . . . . . . . . . . . . . . . 64
Folder Level JavaScripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
Document Level JavaScripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Field Level JavaScripts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Batch Level JavaScripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Chapter 4
Creating and Modifying PDF Documents . . . . . . . . . .67
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Chapter Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Creating and Modifying PDF Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Combining PDF Documents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Creating PDF Files from Multiple Files . . . . . . . . . . . . . . . . . . . . . . . . . 69
Cropping and Rotating Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Extracting, Moving, Deleting, Replacing, and Copying Pages. . . . . . . . . . . . . . 72
Adding Watermarks and Backgrounds . . . . . . . . . . . . . . . . . . . . . . . . . 74
Adding Headers and Footers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Converting PDF Documents to XML Format. . . . . . . . . . . . . . . . . . . . . . . . . 75
Chapter 5
Print Production. . . . . . . . . . . . . . . . . . . . . . .77
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Chapter Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Print Production . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Printing PDF Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Silent Printing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Printing Documents with Layers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Setting Advanced Print Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
43
Contents
6
Acrobat JavaScript Scripting Guide
Chapter 6
Using Acrobat JavaScript in Forms . . . . . . . . . . . . .85
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Chapter Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Forms Essentials. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
About PDF Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Creating Acrobat Form Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Setting Acrobat Form Field Properties. . . . . . . . . . . . . . . . . . . . . . . . . . 91
Making a Form Fillable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .102
Setting the Hierarchy of Form Fields. . . . . . . . . . . . . . . . . . . . . . . . . . .103
Creating Forms From Scratch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103
Making PDF Forms Web-Ready. . . . . . . . . . . . . . . . . . . . . . . . . . . . .107
Using Custom JavaScripts in Forms. . . . . . . . . . . . . . . . . . . . . . . . . . .108
Introduction to XML Forms Architecture (XFA) . . . . . . . . . . . . . . . . . . . . .108
Forms Migration: Working with Forms Created in Acrobat 6.0 or Earlier . . . . . . . .114
Filling in PDF Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .114
Completing Form Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .114
Importing and Exporting Form Data. . . . . . . . . . . . . . . . . . . . . . . . . . .115
Saving Form Data as XML or XML Data Package (XDP) . . . . . . . . . . . . . . . .115
Emailing Completed Forms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115
Global Submit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115
Making Forms Accessible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .117
Text-To-Speech . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .117
Tagging Annotations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119
Using JavaScript to Secure Forms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119
Chapter 7
Review, Markup, and Approval . . . . . . . . . . . . . . 123
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .123
Chapter Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .123
Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .123
Online Collaboration Essentials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .124
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .124
Reviewing Documents with Additional Usage Rights . . . . . . . . . . . . . . . . . .124
Emailing PDF Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125
Acrobat JavaScript-based Collaboration Driver . . . . . . . . . . . . . . . . . . . . .126
Using Commenting Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .128
Adding Note Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129
Making Text Edits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129
41
Acrobat JavaScript Scripting Guide
7
Contents
Highlighting, Crossing Out, and Underlining Text . . . . . . . . . . . . . . . . . . . .129
Adding and Deleting Custom Stamps . . . . . . . . . . . . . . . . . . . . . . . . . .129
Adding Comments in a Text Box. . . . . . . . . . . . . . . . . . . . . . . . . . . . .129
Adding Attachments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .130
Spell-checking in Comments and Forms . . . . . . . . . . . . . . . . . . . . . . . .132
Adding Commenting Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . .133
Changing Colors, Icons, and Other Comment Properties . . . . . . . . . . . . . . . .133
Adding Watermarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134
Approval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135
Managing Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .136
Selecting, Moving, and Deleting Comments. . . . . . . . . . . . . . . . . . . . . . .136
Using the Comments List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .137
Exporting and Importing Comments. . . . . . . . . . . . . . . . . . . . . . . . . . .139
Comparing Comments in Two PDF Documents. . . . . . . . . . . . . . . . . . . . .139
Aggregating Comments for Use in Excel . . . . . . . . . . . . . . . . . . . . . . . .139
Extracting Comments in a Batch Process . . . . . . . . . . . . . . . . . . . . . . . .139
Approving Documents Using Stamps (Japanese Workflows) . . . . . . . . . . . . . . . .140
Setting up a Hanko Approval Workflow . . . . . . . . . . . . . . . . . . . . . . . . .140
Participating in a Hanko Approval Workflow. . . . . . . . . . . . . . . . . . . . . . .141
Chapter 8
Working with Digital Media in PDF Documents . . . . . . 143
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143
Chapter Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143
Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143
Media Players: Control, Settings, Renditions, and Events. . . . . . . . . . . . . . . . . .144
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .144
Accessing a List of Active Players. . . . . . . . . . . . . . . . . . . . . . . . . . . .145
Specifying Playback Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .146
Monitors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .149
Integrating Media into Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .151
Adding Movie Clips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .151
Adding Sound Clips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .152
Adding and Editing Renditions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .152
Setting Multimedia Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .153
Chapter 9
Acrobat Templates s . . . . . . . . . . . . . . . . . . . . 155
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .155
Chapter Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .155
41
Contents
8
Acrobat JavaScript Scripting Guide
Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .155
The Role of Templates in PDF Form Architecture . . . . . . . . . . . . . . . . . . . . . .156
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .156
Spawning Templates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .157
Dynamic Form Field Generation. . . . . . . . . . . . . . . . . . . . . . . . . . . . .157
Dynamic Page Generation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .157
Template Syntax and Usage. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .158
Chapter 10
Modifying the User Interface . . . . . . . . . . . . . . . 159
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .159
Chapter Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .159
Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .159
Using Adobe Dialog Manager (ADM) in Acrobat JavaScript. . . . . . . . . . . . . . . . .160
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .160
ADM Object Hierarchy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .161
Access to ADM through JavaScript . . . . . . . . . . . . . . . . . . . . . . . . . . .162
Adding Navigation to PDF Documents. . . . . . . . . . . . . . . . . . . . . . . . . . . .170
Thumbnails . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .171
Bookmarks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .171
Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .175
Using Actions for Special Effects . . . . . . . . . . . . . . . . . . . . . . . . . . . .178
Highlighting Form Fields and Navigational Components . . . . . . . . . . . . . . . .181
Setting Up a Presentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .182
Numbering Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .185
Creating Buttons. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .186
Working with PDF Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187
About PDF Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187
Navigating with Layers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187
Editing the Properties of PDF Layers . . . . . . . . . . . . . . . . . . . . . . . . . .188
Merging Layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189
Flattening PDF Layers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189
Combining PDF Layered Documents . . . . . . . . . . . . . . . . . . . . . . . . . .189
Chapter 11
Search and Index Essentials . . . . . . . . . . . . . . . 191
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191
Chapter Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191
Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191
Searching for Text in PDF Documents. . . . . . . . . . . . . . . . . . . . . . . . . . . .192
41
Acrobat JavaScript Scripting Guide
9
Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .192
Finding Words in an PDF Document . . . . . . . . . . . . . . . . . . . . . . . . . .193
Searching Across Multiple PDF Documents. . . . . . . . . . . . . . . . . . . . . . .195
Indexing Multiple PDF Documents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .197
Creating, Updating, or Rebuilding Indexes . . . . . . . . . . . . . . . . . . . . . . .197
Searching Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .199
Using Acrobat JavaScript to Read and Search XMP Metadata . . . . . . . . . . . . .199
Chapter 12
Security . . . . . . . . . . . . . . . . . . . . . . . . . . 201
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .201
Chapter Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .201
Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .201
Security Essentials. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .202
Methods for Adding Security to PDF Documents . . . . . . . . . . . . . . . . . . . .202
Digitally Signing PDF Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .205
Signing a PDF Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .205
Getting Signature Information from Another User . . . . . . . . . . . . . . . . . . . .208
Removing Signatures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .208
Certifying a Document. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .208
Validating Signatures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .209
Using Approval Stamps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .209
Setting Digital Signature Preferences . . . . . . . . . . . . . . . . . . . . . . . . . .210
Adding Security to PDF Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210
Adding Passwords and Setting Security Options . . . . . . . . . . . . . . . . . . . .210
Adding Usage Rights to a Document . . . . . . . . . . . . . . . . . . . . . . . . . .211
Encrypting PDF Files for a List of Recipients . . . . . . . . . . . . . . . . . . . . . .211
Encrypting PDF Files Using Security Policies . . . . . . . . . . . . . . . . . . . . . .213
Adding Security to Document Attachments . . . . . . . . . . . . . . . . . . . . . . .217
Digital IDs and Certification Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . .218
Digital IDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .218
Managing Digital ID Certificates. . . . . . . . . . . . . . . . . . . . . . . . . . . . .224
Tokenized Acrobat JavaScript Security Model. . . . . . . . . . . . . . . . . . . . . .226
Chapter 13
Rights-Enabled PDF Files . . . . . . . . . . . . . . . . . 227
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .227
Chapter Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .227
Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .227
Additional Usage Rights . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .228
39
Contents
10
Acrobat JavaScript Scripting Guide
LiveCycle Reader Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .228
Writing Acrobat JavaScript for Reader. . . . . . . . . . . . . . . . . . . . . . . . . . . .229
Enabling Collaboration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .233
Chapter 14
Interacting with Databases . . . . . . . . . . . . . . . . 237
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .237
Chapter Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .237
Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .237
Introduction to ADBC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .238
Establishing an ADBC Connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .238
Executing SQL Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .241
Chapter 15
SOAP and Web Services. . . . . . . . . . . . . . . . . . 243
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .243
Chapter Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .243
Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .244
Using SOAP and Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .244
Using a WSDL Proxy to Invoke a Web Service . . . . . . . . . . . . . . . . . . . . .245
Synchronous and Asynchronous Information Exchange . . . . . . . . . . . . . . . .247
Using Document/Literal Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . .251
Exchanging File Attachments and Binary Data . . . . . . . . . . . . . . . . . . . . .252
Converting Between String and ReadStream Information. . . . . . . . . . . . . . . .253
Accessing SOAP Version Information . . . . . . . . . . . . . . . . . . . . . . . . . .254
Accessing SOAP Header Information . . . . . . . . . . . . . . . . . . . . . . . . . .254
Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .255
Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .255
DNS Service Discovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .256
Managing XML-based Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .258
Workflow Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .260
Appendix A A Short Acrobat JavaScript FAQ . . . . . . . . . . . . . 261
Where can JavaScripts be found and how are they used? . . . . . . . . . . . . . . . . .261
How should I name my Acrobat form fields?. . . . . . . . . . . . . . . . . . . . . . . . .261
How do I use date objects? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .263
Converting from a Date to a String . . . . . . . . . . . . . . . . . . . . . . . . . . .263
Converting from a string to a date. . . . . . . . . . . . . . . . . . . . . . . . . . . .264
Date arithmetic. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .265
Documents you may be interested
Documents you may be interested