ebook img

JavaScript for Acrobat API Reference - Adobe Systems PDF

779 Pages·2015·4.17 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview JavaScript for Acrobat API Reference - Adobe Systems

bbc JavaScript for Acrobat API Reference ™ ® Adobe Acrobat DC SDK ® ® May 2015 Adobe® Acrobat® DC SDK JavaScript™ for Acrobat API Reference for Microsoft® Windows® and Mac OS® Edition 1.0, May 2015 If this guide is distributed 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 Systems Incorporated. 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 agreement. The content of this guide is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies that may appear in the informational content contained in this guide. Please 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 owner. Any 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 persons. Adobe, the Adobe logo, Acrobat, Distiller, FrameMaker, LiveCycle, PostScript and Reader are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States and/or other countries. Apple and Mac OS are trademarks of Apple Computer, Inc., registered in the United States and other countries. JavaScript is a trademark or registered trademark of Sun Microsystems, Inc. in the United States and other countries. Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. All other trademarks are the property of their respective owners. Adobe Systems Incorporated, 345 Park Avenue, San Jose, California 95110, USA. Notice to U.S. Government End Users. The Software and Documentation are “Commercial Items,” as that term is defined at 48 C.F.R. §2.101, consisting of “Commercial Computer Software” and “Commercial Computer Software Documentation,” as such terms are used in 48 C.F.R. §12.212 or 48 C.F.R. §227.7202, as applicable. Consistent with 48 C.F.R. §12.212 or 48 C.F.R. §§227.7202-1 through 227.7202-4, as applicable, the Commercial Computer Software and Commercial Computer Software Documentation are being licensed to U.S. 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 Systems Incorporated, 345 Park Avenue, San Jose, CA 95110-2704, USA. For U.S. Government End Users, Adobe agrees to comply with all applicable equal opportunity laws including, if appropriate, the provisions of Executive Order 11246, as amended, Section 402 of the Vietnam Era Veterans Readjustment Assistance Act of 1974 (38 USC 4212), and Section 503 of the Rehabilitation Act of 1973, as amended, and the regulations at 41 CFR Parts 60-1 through 60-60, 60-250, and 60-741. The affirmative action clause and regulations contained in the preceding sentence shall be incorporated by reference. Contents 1 Preface..........................................................................................................................................1 What’s in this guide?.....................................................................................................................................................................1 Who should read this guide?.....................................................................................................................................................1 Related documentation...............................................................................................................................................................1 Syntax.................................................................................................................................................................................................1 Paths....................................................................................................................................................................................................2 Safe path............................................................................................................................................................................................2 Privileged context..........................................................................................................................................................................2 Privileged versus non-privileged context.............................................................................................................................2 User preferences.............................................................................................................................................................................3 Quick bars..........................................................................................................................................................................................3 Domain names in code samples...............................................................................................................................................5 1 JavaScript API..............................................................................................................................1 Alerter.................................................................................................................................................................................................2 Alerter methods.................................................................................................................................................................2 dispatch..........................................................................................................................................................................2 AlternatePresentation..................................................................................................................................................................5 AlternatePresentation properties................................................................................................................................5 active................................................................................................................................................................................5 type...................................................................................................................................................................................5 AlternatePresentation methods...................................................................................................................................5 start...................................................................................................................................................................................6 stop...................................................................................................................................................................................6 annotAttachment...........................................................................................................................................................................7 annotAttachment properties........................................................................................................................................7 contentStream..............................................................................................................................................................7 creationDate..................................................................................................................................................................8 MIMEtype.......................................................................................................................................................................8 modDate.........................................................................................................................................................................8 name................................................................................................................................................................................8 pathname.......................................................................................................................................................................9 size....................................................................................................................................................................................9 Annotation......................................................................................................................................................................................10 Annotation types.............................................................................................................................................................10 Annotation properties...................................................................................................................................................12 alignment.....................................................................................................................................................................13 attachment..................................................................................................................................................................14 AP....................................................................................................................................................................................14 arrowBegin..................................................................................................................................................................15 arrowEnd......................................................................................................................................................................16 attachIcon....................................................................................................................................................................16 author............................................................................................................................................................................17 borderEffectIntensity...............................................................................................................................................17 borderEffectStyle.......................................................................................................................................................18 callout............................................................................................................................................................................18 3 Adobe Acrobat SDK JavaScript™ for Acrobat® API Reference 4 cAttachmentPath......................................................................................................................................................18 caretSymbol................................................................................................................................................................19 contents........................................................................................................................................................................19 creationDate................................................................................................................................................................20 dash................................................................................................................................................................................20 delay...............................................................................................................................................................................21 doc..................................................................................................................................................................................21 doCaption....................................................................................................................................................................22 fillColor..........................................................................................................................................................................22 gestures........................................................................................................................................................................23 hidden...........................................................................................................................................................................23 inReplyTo......................................................................................................................................................................24 intent..............................................................................................................................................................................24 leaderExtend...............................................................................................................................................................25 leaderLength...............................................................................................................................................................25 lineEnding....................................................................................................................................................................25 lock.................................................................................................................................................................................26 modDate.......................................................................................................................................................................26 name..............................................................................................................................................................................27 noteIcon........................................................................................................................................................................27 noView...........................................................................................................................................................................28 opacity...........................................................................................................................................................................28 overlayText..................................................................................................................................................................29 page...............................................................................................................................................................................29 point...............................................................................................................................................................................30 points.............................................................................................................................................................................31 popupOpen.................................................................................................................................................................31 popupRect...................................................................................................................................................................32 print................................................................................................................................................................................32 quads.............................................................................................................................................................................32 rect..................................................................................................................................................................................33 readOnly.......................................................................................................................................................................33 refType..........................................................................................................................................................................33 repeat.............................................................................................................................................................................34 richContents................................................................................................................................................................34 richDefaults.................................................................................................................................................................35 rotate.............................................................................................................................................................................36 seqNum.........................................................................................................................................................................36 soundIcon....................................................................................................................................................................36 state................................................................................................................................................................................37 stateModel...................................................................................................................................................................37 strokeColor..................................................................................................................................................................37 style................................................................................................................................................................................38 subject...........................................................................................................................................................................38 textFont.........................................................................................................................................................................39 textSize..........................................................................................................................................................................39 toggleNoView.............................................................................................................................................................40 type.................................................................................................................................................................................40 vertices..........................................................................................................................................................................41 width..............................................................................................................................................................................41 Annotation methods......................................................................................................................................................42 Adobe Acrobat SDK JavaScript™ for Acrobat® API Reference 5 destroy...........................................................................................................................................................................42 getProps.......................................................................................................................................................................42 getStateInModel........................................................................................................................................................43 setProps........................................................................................................................................................................44 transitionToState.......................................................................................................................................................44 AnnotRichMedia...........................................................................................................................................................................46 AnnotRichMedia properties.........................................................................................................................................46 activated.......................................................................................................................................................................46 context3D.....................................................................................................................................................................46 name..............................................................................................................................................................................47 page...............................................................................................................................................................................47 rect..................................................................................................................................................................................47 subtype.........................................................................................................................................................................47 AnnotRichMedia methods...........................................................................................................................................48 callAS..............................................................................................................................................................................48 Annot3D..........................................................................................................................................................................................50 Annot3D properties........................................................................................................................................................50 activated.......................................................................................................................................................................50 context3D.....................................................................................................................................................................50 innerRect......................................................................................................................................................................51 name..............................................................................................................................................................................51 page...............................................................................................................................................................................51 rect..................................................................................................................................................................................51 app.....................................................................................................................................................................................................53 app properties..................................................................................................................................................................53 activeDocs....................................................................................................................................................................53 calculate........................................................................................................................................................................54 constants......................................................................................................................................................................54 focusRect......................................................................................................................................................................55 formsVersion...............................................................................................................................................................55 fromPDFConverters..................................................................................................................................................55 fs......................................................................................................................................................................................56 fullscreen......................................................................................................................................................................56 language.......................................................................................................................................................................57 media.............................................................................................................................................................................57 monitors.......................................................................................................................................................................58 numPlugIns.................................................................................................................................................................58 openInPlace.................................................................................................................................................................59 platform........................................................................................................................................................................59 plugIns...........................................................................................................................................................................59 printColorProfiles......................................................................................................................................................60 printerNames..............................................................................................................................................................60 runtimeHighlight.......................................................................................................................................................61 runtimeHighlightColor............................................................................................................................................61 thermometer...............................................................................................................................................................61 toolbar...........................................................................................................................................................................62 toolbarHorizontal......................................................................................................................................................62 toolbarVertical............................................................................................................................................................62 viewerType..................................................................................................................................................................63 viewerVariation..........................................................................................................................................................63 viewerVersion.............................................................................................................................................................64 Adobe Acrobat SDK JavaScript™ for Acrobat® API Reference 6 app methods.....................................................................................................................................................................64 addMenuItem.............................................................................................................................................................64 addSubMenu..............................................................................................................................................................66 addToolButton...........................................................................................................................................................67 alert.................................................................................................................................................................................69 beep...............................................................................................................................................................................71 beginPriv......................................................................................................................................................................71 browseForDoc............................................................................................................................................................71 clearInterval.................................................................................................................................................................73 clearTimeOut..............................................................................................................................................................73 endPriv..........................................................................................................................................................................73 execDialog...................................................................................................................................................................74 execMenuItem............................................................................................................................................................87 getNthPlugInName...................................................................................................................................................90 getPath..........................................................................................................................................................................90 goBack...........................................................................................................................................................................91 goForward....................................................................................................................................................................92 hideMenuItem............................................................................................................................................................92 hideToolbarButton...................................................................................................................................................92 launchURL....................................................................................................................................................................93 listMenuItems.............................................................................................................................................................93 listToolbarButtons.....................................................................................................................................................94 loadPolicyFile..............................................................................................................................................................95 mailGetAddrs..............................................................................................................................................................95 mailMsg.........................................................................................................................................................................96 newDoc.........................................................................................................................................................................97 newCollection.............................................................................................................................................................99 newFDF.........................................................................................................................................................................99 openDoc....................................................................................................................................................................100 openFDF....................................................................................................................................................................102 popUpMenu.............................................................................................................................................................103 popUpMenuEx........................................................................................................................................................103 removeToolButton.................................................................................................................................................105 response....................................................................................................................................................................105 setInterval..................................................................................................................................................................106 setTimeOut...............................................................................................................................................................107 trustedFunction......................................................................................................................................................108 trustPropagatorFunction.....................................................................................................................................111 app.media....................................................................................................................................................................................116 app.media properties..................................................................................................................................................116 align.............................................................................................................................................................................116 canResize...................................................................................................................................................................117 closeReason..............................................................................................................................................................117 defaultVisible...........................................................................................................................................................118 ifOffScreen................................................................................................................................................................118 layout..........................................................................................................................................................................119 monitorType.............................................................................................................................................................119 openCode..................................................................................................................................................................120 over..............................................................................................................................................................................120 pageEventNames...................................................................................................................................................121 raiseCode...................................................................................................................................................................122 Adobe Acrobat SDK JavaScript™ for Acrobat® API Reference 7 raiseSystem...............................................................................................................................................................122 renditionType..........................................................................................................................................................122 status...........................................................................................................................................................................123 trace.............................................................................................................................................................................123 version........................................................................................................................................................................124 windowType.............................................................................................................................................................124 app.media methods.....................................................................................................................................................124 addStockEvents.......................................................................................................................................................125 alertFileNotFound..................................................................................................................................................125 alertSelectFailed.....................................................................................................................................................126 argsDWIM..................................................................................................................................................................126 canPlayOrAlert.........................................................................................................................................................127 computeFloatWinRect..........................................................................................................................................127 constrainRectToScreen........................................................................................................................................128 createPlayer..............................................................................................................................................................128 getAltTextData........................................................................................................................................................130 getAltTextSettings.................................................................................................................................................131 getAnnotStockEvents...........................................................................................................................................132 getAnnotTraceEvents...........................................................................................................................................132 getPlayers..................................................................................................................................................................132 getPlayerStockEvents...........................................................................................................................................133 getPlayerTraceEvents...........................................................................................................................................133 getRenditionSettings............................................................................................................................................134 getURLData..............................................................................................................................................................134 getURLSettings........................................................................................................................................................135 getWindowBorderSize..........................................................................................................................................136 openPlayer................................................................................................................................................................136 removeStockEvents...............................................................................................................................................138 startPlayer.................................................................................................................................................................138 Bookmark.....................................................................................................................................................................................139 Bookmark properties...................................................................................................................................................139 children......................................................................................................................................................................139 color............................................................................................................................................................................139 doc...............................................................................................................................................................................140 name...........................................................................................................................................................................140 open............................................................................................................................................................................141 parent.........................................................................................................................................................................141 style.............................................................................................................................................................................141 Bookmark methods......................................................................................................................................................142 createChild................................................................................................................................................................142 execute.......................................................................................................................................................................142 insertChild.................................................................................................................................................................143 remove.......................................................................................................................................................................143 setAction....................................................................................................................................................................144 catalog...........................................................................................................................................................................................145 catalog properties........................................................................................................................................................145 isIdle............................................................................................................................................................................145 jobs..............................................................................................................................................................................145 catalog methods...........................................................................................................................................................145 getIndex.....................................................................................................................................................................146 remove.......................................................................................................................................................................146 CatalogJob...................................................................................................................................................................................147 Adobe Acrobat SDK JavaScript™ for Acrobat® API Reference 8 CatalogJob properties................................................................................................................................................147 path.............................................................................................................................................................................147 type..............................................................................................................................................................................147 status...........................................................................................................................................................................147 Certificate.....................................................................................................................................................................................149 Certificate properties...................................................................................................................................................149 binary..........................................................................................................................................................................149 issuerDN.....................................................................................................................................................................149 keyUsage...................................................................................................................................................................150 MD5Hash...................................................................................................................................................................150 privateKeyValidityEnd..........................................................................................................................................150 privateKeyValidityStart.........................................................................................................................................151 SHA1Hash..................................................................................................................................................................151 serialNumber............................................................................................................................................................151 subjectCN..................................................................................................................................................................151 subjectDN..................................................................................................................................................................152 ubRights.....................................................................................................................................................................152 usage...........................................................................................................................................................................153 validityEnd................................................................................................................................................................154 validityStart...............................................................................................................................................................155 Collab.............................................................................................................................................................................................156 Collab methods.............................................................................................................................................................156 addStateModel........................................................................................................................................................156 documentToStream..............................................................................................................................................157 removeStateModel................................................................................................................................................157 color...............................................................................................................................................................................................158 Color arrays.....................................................................................................................................................................158 color properties.............................................................................................................................................................158 color methods................................................................................................................................................................159 convert.......................................................................................................................................................................159 equal...........................................................................................................................................................................160 colorConvertAction..................................................................................................................................................................161 colorConvertAction properties................................................................................................................................161 action..........................................................................................................................................................................161 alias..............................................................................................................................................................................161 colorantName..........................................................................................................................................................162 convertIntent...........................................................................................................................................................162 convertProfile..........................................................................................................................................................162 embed........................................................................................................................................................................163 isProcessColor..........................................................................................................................................................163 matchAttributesAll................................................................................................................................................163 matchAttributesAny..............................................................................................................................................164 matchIntent..............................................................................................................................................................165 matchSpaceTypeAll...............................................................................................................................................165 matchSpaceTypeAny............................................................................................................................................166 preserveBlack...........................................................................................................................................................167 useBlackPointCompensation.............................................................................................................................167 Collection.....................................................................................................................................................................................168 Collection properties...................................................................................................................................................168 fields............................................................................................................................................................................168 initialDoc....................................................................................................................................................................168 Adobe Acrobat SDK JavaScript™ for Acrobat® API Reference 9 initialView..................................................................................................................................................................169 Collection methods......................................................................................................................................................169 addField.....................................................................................................................................................................169 getField......................................................................................................................................................................170 removeField.............................................................................................................................................................171 collectionField............................................................................................................................................................................172 collectionField properties..........................................................................................................................................172 name...........................................................................................................................................................................172 order............................................................................................................................................................................172 readOnly....................................................................................................................................................................173 sort...............................................................................................................................................................................173 text...............................................................................................................................................................................174 type..............................................................................................................................................................................174 console..........................................................................................................................................................................................175 console methods..........................................................................................................................................................175 clear.............................................................................................................................................................................175 hide..............................................................................................................................................................................175 println.........................................................................................................................................................................175 show............................................................................................................................................................................176 Data................................................................................................................................................................................................177 Data properties..............................................................................................................................................................177 creationDate.............................................................................................................................................................177 description................................................................................................................................................................177 MIMEType..................................................................................................................................................................178 modDate....................................................................................................................................................................178 name...........................................................................................................................................................................178 path.............................................................................................................................................................................178 size...............................................................................................................................................................................179 Data methods................................................................................................................................................................179 getFieldValue...........................................................................................................................................................179 setFieldValue............................................................................................................................................................179 dbg..................................................................................................................................................................................................181 dbg properties...............................................................................................................................................................181 bps...............................................................................................................................................................................181 dbg methods..................................................................................................................................................................182 c.....................................................................................................................................................................................182 cb..................................................................................................................................................................................182 q....................................................................................................................................................................................182 sb..................................................................................................................................................................................182 si....................................................................................................................................................................................183 sn..................................................................................................................................................................................184 so..................................................................................................................................................................................184 sv..................................................................................................................................................................................184 Dialog.............................................................................................................................................................................................185 Dialog methods.............................................................................................................................................................185 enable.........................................................................................................................................................................185 end...............................................................................................................................................................................185 load..............................................................................................................................................................................186 store.............................................................................................................................................................................186 DirConnection............................................................................................................................................................................187 DirConnection properties..........................................................................................................................................187 Adobe Acrobat SDK JavaScript™ for Acrobat® API Reference 10 canList.........................................................................................................................................................................187 canDoCustomSearch............................................................................................................................................187 canDoCustomUISearch........................................................................................................................................188 canDoStandardSearch..........................................................................................................................................188 groups........................................................................................................................................................................188 name...........................................................................................................................................................................189 uiName.......................................................................................................................................................................189 DirConnection methods.............................................................................................................................................189 search..........................................................................................................................................................................189 setOutputFields......................................................................................................................................................191 Directory.......................................................................................................................................................................................193 Directory properties.....................................................................................................................................................193 info...............................................................................................................................................................................193 Directory methods.......................................................................................................................................................195 connect......................................................................................................................................................................195 Doc..................................................................................................................................................................................................197 Doc properties...............................................................................................................................................................197 alternatePresentations.........................................................................................................................................198 author.........................................................................................................................................................................199 baseURL.....................................................................................................................................................................199 bookmarkRoot.........................................................................................................................................................200 calculate.....................................................................................................................................................................200 collection...................................................................................................................................................................200 creationDate.............................................................................................................................................................201 creator........................................................................................................................................................................201 dataObjects..............................................................................................................................................................201 delay............................................................................................................................................................................202 dirty.............................................................................................................................................................................202 disclosed....................................................................................................................................................................203 docID...........................................................................................................................................................................204 documentFileName...............................................................................................................................................204 dynamicXFAForm...................................................................................................................................................204 external......................................................................................................................................................................205 filesize.........................................................................................................................................................................205 hidden........................................................................................................................................................................206 hostContainer..........................................................................................................................................................206 icons............................................................................................................................................................................207 info...............................................................................................................................................................................207 innerAppWindowRect..........................................................................................................................................209 innerDocWindowRect...........................................................................................................................................209 isModal.......................................................................................................................................................................210 keywords...................................................................................................................................................................210 layout..........................................................................................................................................................................210 media..........................................................................................................................................................................211 metadata...................................................................................................................................................................211 modDate....................................................................................................................................................................213 mouseX......................................................................................................................................................................213 mouseY......................................................................................................................................................................214 noautocomplete.....................................................................................................................................................214 numFields..................................................................................................................................................................215 numPages.................................................................................................................................................................215

Description:
Adobe® Acrobat® DC SDK JavaScript™ for Acrobat API Reference for Microsoft® Windows® and Mac OS® Edition 1.0, May 2015 If this guide is distributed with
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.