Transcription of Developing Acrobat Applications Using JavaScript
1 Developing Acrobat Applications Using JavaScript2/1/21 Adobe, Acrobat SDK Documentation. 2020 Adobe Inc. All rights this guide is distributed by Adobe with software that includes an end user agreement, this guide, as well as the software described in it, is furnished under license and may be used or copied only in accordance with the terms of such license. Except as permitted by any such license, no part of this guide may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written permission of Adobe. Please note that the content in this guide is protected under copyright law even if it is not distributed with software that includes an end user license guide is governed by the Adobe Acrobat SDK License Agreement and may be used or copied only in accordance with the terms of this agreement. Except as permitted by any such agreement, no part of this guide may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written permission of Adobe.
2 Please note that the content in this guide is protected under copyright remember that existing artwork or images that you may want to include in your project may be protected under copyright law. The unauthorized incorporation of such material into your new work could be a violation of the rights of the copyright owner. Please be sure to obtain any permission required from the copyright references to company names, company logos, and user names in sample material or sample forms included in this documentation and/or software are for demonstration purposes only and are not intended to refer to any actual organization or , the Adobe logo, Acrobat , Distiller, and Reader are either registered trademarks or trademarks of Adobe the United States and/or other other trademarks are the property of their respective to Government End Users. The Software and Documentation are Commercial Items, as that term is defined at 48 , consisting of Commercial Computer Software and Commercial Computer Software Documentation, as such terms are used in 48 or 48 , as applicable.
3 Consistent with 48 or 48 through , as applicable, the Commercial Computer Software and Commercial Computer Software Documentation are being licensed to Government end users (a) only as Commercial Items and (b) with only those rights as are granted to all other end users pursuant to the terms and conditions herein. Unpublished-rights reserved under the copyright laws of the United States. Adobe Inc., 345 Park Avenue, San Jose, CA 95110-2704, USAA dobe Acrobat DC SDKA crobat JS Developer Guide 3 List of Examples ..91 the JavaScript for Acrobat API summary ..13dbg ..15search .. Tools ..18 Using the JavaScript Debugger the console ..18 Executing JavaScript ..19 Debugging with the JavaScript a JavaScript editor ..21 Specifying the default JavaScript an external editor capabilities ..22 Specifying additional capabilities to your editor ..23 Saving and closing a file with a syntax the Debugger with Acrobat Reader the JavaScript Debugger ..25 JavaScript groups of View Scripts Stack list.
4 31 Inspect details styles and breakpoints ..34 Listing breakpoints ..34 Using conditional breakpoints ..34 Starting the Debugger ..35 Final notes ..363 JavaScript Contexts in Acrobat concept of a JavaScript event ..37 About level ..39 Page Acrobat DC SDKA crobat JS Developer Guide 4 Field level ..41 Privileged versus non-privileged context ..41 Executing privileged methods in a non-privileged privileged methods through the privileged methods in a certified document ..454 Creating and Modifying PDF and modifying PDF PDF and extracting file and rotating pages ..51 Cropping , moving, deleting, replacing, and copying pages ..52 Adding watermarks and PDF documents to XML format ..555 Print Production ..56 Setting print PDF comments and forms ..59 Booklet advanced print output marks and PostScript font Using JavaScript in PDF of Acrobat DC for creating a new Acrobat DC form Acrobat DC form field properties ..66 Field properties.
5 66 Button fields ..67 Check box fields ..69 Combo box box button script ..80 Task-based required form fields ..81 Making a form the hierarchy of form forms ..83 Adobe Acrobat DC SDKA crobat JS Developer Guide 5 Positioning form form fields ..84 Creating multiple form fields ..85 Defining the tabbing order ..85 Defining form field calculation order ..86 Making PDF forms a submit button ..87 Creating a reset form CGI export values ..87 Importing and exporting form completed forms ..87 Use date arithmetic ..89 Defining global variables in JavaScript ..90 Enable the global object security policy ..90 Setting and getting a global global global variables persistent ..91 Querying an Acrobat DC form field value in another open object security policy ..92 Intercepting keystrokes in an Acrobat DC form ..93 Constructing custom the user for a an URL from JavaScript ..93 Creating special rollover effects ..94 Global submit ..94 Making forms ..95 Tagging annotations.
6 96 Document tab order ..97 Reading JavaScript to secure Review, Markup, and Approval ..100 Working with comments Using 100 Annotation types .. 100 Getting annotation 101 Adding comments with 102 Setting comment properties .. 102 Online collaboration 102 Reviewing documents with additional usage rights .. 103 Emailing PDF 104 JavaScript -based collaboration 104 Spell-checking in comments and forms .. 106 Setting spelling 106 Adding words to a 106 Managing 106 Selecting, moving, and deleting comments .. 107 Adobe Acrobat DC SDKA crobat JS Developer Guide 6 Using the comments 107 Changing the status of 107 Changing the appearance of comments .. 107 Sorting comments .. 108 Showing and hiding 108 Exporting and importing comments .. 108 Aggregating comments for use in Excel .. 108 Comparing comments in two PDF documents .. 109 Extracting comments in a batch process .. 109 Approving documents Using stamps (Japanese workflows) .. 109 Setting up a Hanko approval workflow.
7 110 Participating in a Hanko approval 110 Installing and customizing Hanko stamps .. 110 Creating custom Inkan stamps .. 110 Deleting custom stamps .. 1108 Working with Digital Media in PDF players: control, settings, renditions, and 111 Accessing a list of active 112 Specifying playback settings .. 114 Integrating media into documents .. 115 Controlling multimedia through a rendition action .. 116 Controlling multimedia with a Run a JavaScript 118 Adding and editing 120 Setting multimedia preferences .. 1219 Modifying the User toolbar buttons and menu items .. 122 Adding navigation to PDF 124 Creating page 124 Adding page actions with page thumbnails .. 125 Creating bookmarks .. 126 Managing bookmarks .. 126 Creating a bookmark 127 Links .. 127 Adding and removing web links from text .. 128 Adding and removing 129 Defining the appearance of a link .. 130 Opening links .. 130 Opening file 130 Using 131 Using actions for special effects .. 131 Highlighting form fields and navigational components.
8 131 Setting up a presentation .. 132 Defining the initial view in full screen view .. 133 Defining an initial 134 Numbering pages .. 135 Creating buttons .. 136 Working with PDF 137 Adobe Acrobat DC SDKA crobat JS Developer Guide 7 Navigating with 137 Editing the properties of PDF 138 Reordering layers .. 13910 Acrobat DC role of templates in PDF form 140 Spawning templates .. 140 Dynamic form field 140 Dynamic page 141 Template syntax and usage .. 14111 Search and Index for text in PDF documents .. 144 Finding words in an PDF 145 Using advanced search options .. 145 Searching across multiple PDF 146 Searching all PDF files in a specific location .. 146 Using advanced search options for multiple document searches .. 146 Searching PDF index 147 Using Boolean queries .. 147 Indexing multiple PDF 147 Creating, updating, or rebuilding 148 Searching metadata .. 14912 150 Methods for adding security to PDF documents .. 150 Passwords and 150 Certifying documents.
9 150 Encrypting files Using 151 Security policies .. 152 Secure 153 Digitally signing PDF 153 Signing a PDF document .. 153 The security handler 153 The SignatureInfo object .. 154 Applying the 154 Clearing a digital signature from a signature field .. 154 Getting signature information from another 154 Removing 155 Certifying a document .. 155 Validating 155 Setting digital signature properties with seed 156 Adding security to PDF 157 Adding passwords and setting security options .. 157 Adding usage rights to a document .. 157 Encrypting PDF files for a list of recipients .. 157 Encrypting PDF files Using security 159 Adding security to document 161 Digital IDs and certification methods .. 162 Digital 162 About digital ID providers .. 163 Adobe Acrobat DC SDKA crobat JS Developer Guide 8 Creating a digital ID (default certificate security) .. 163 Using digital IDs (default certificate security).. 165 Managing digital IDs (Windows certificate security).
10 166 Managing digital ID 166 Sharing digital ID certificates .. 166 Building a list of trusted 167 Checking information on 167 Task based topics .. 168 Disallowing changes in 168 Hiding 16813 Rights-Enabled PDF Files ..169 Additional usage 169 Writing JavaScript for Adobe 169 Enabling 17014 Interacting with ADBC .. 172 Establishing an ADBC 172 Executing SQL statements .. 17415 SOAP and Web Services ..177 Using SOAP and web services .. 177 Using a WSDL proxy to invoke a web service .. 178 Synchronous and asynchronous information exchange .. 179 Establishing a synchronous 180 Asynchronous web service 181 Using document/literal 183 Exchanging file attachments and binary 183 Converting between string and readstream 184 Accessing SOAP version information .. 185 Accessing SOAP header 185 Authentication .. 185 Error handling .. 186 DNS service 186 Managing XML-based 188 Workflow 19016 Interfacing with 3D JavaScript ..191 Basic concepts .. 191 Getting the Annot3D object of the 3D 191 Annot3D properties.