AcroT X.Net E AcroT X eDucation Bundle E Professional Enhanced AeB Features using Acrobat Pro D. P. Story l a u n Copyright©[email protected] www.acrotex.net a Prepared:June22,2021 Version2.14,2021/06/20 M o r P B e A e h T Table of Contents 1 Forward 4 2 Overview 4 2.1 Dedication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.2 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.3 SampleFilesandArticles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.4 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.5 TheAeBProFamilyofSoftware . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.6 PackageOptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.7 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 • Automaticinstallation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 • Manualinstallation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 • Installing aeb_pro.jsandaeb.js . . . . . . . . . . . . . . . . . . . . . . . 11 • Installing aebpro.cfg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.8 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3 Concerningtheuseacrobatoption 13 4 Thenoprooption 13 5 AeBControlCentral 14 6 DeclaringtheInitialView 15 7 DocumentActions 17 7.1 DocumentLevelJavaScripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 7.2 SetDocumentActions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 7.3 DocumentOpenActions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 8 PageActions 21 8.1 Open/ClosePageActionsforFirstPage . . . . . . . . . . . . . . . . . . . . . 21 8.2 Open/ClosePageActionsfortheotherPages . . . . . . . . . . . . . . . . . . 22 8.3 EveryPageOpen/CloseEvents . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 9 FullscreenSupport 24 9.1 SetFullscreenDefaults: \setDefaultFS . . . . . . . . . . . . . . . . . . . . . 24 9.2 PageTransitionEffects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 10AttachingDocuments 28 10.1 Theattachsourceoption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 10.2 Theattachmentsoption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 10.3 Optionalattachments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 l a u n a M o r P B e A e h T TableofContents(cont.) 3 11DocAssemblyMethods 30 11.1 CertainSecurityRestrictedJSMethods . . . . . . . . . . . . . . . . . . . . . . 31 11.2 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 11.3 Pre-docassemblyMethods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 • ImportingandPlacingImages . . . . . . . . . . . . . . . . . . . . . . . . . . 36 • CreatingCustomButtonAppearances . . . . . . . . . . . . . . . . . . . . . 38 • MethodsinsupportofButtonAnime. . . . . . . . . . . . . . . . . . . . . . 39 12LinkingtoAttachments 42 12.1 NamingAttachments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 • DefaultDescriptionsandLabels . . . . . . . . . . . . . . . . . . . . . . . . . 42 • AssigningLabelsandDescriptions . . . . . . . . . . . . . . . . . . . . . . . 43 • Notesonthe(cid:2)description(cid:3)parameter . . . . . . . . . . . . . . . . . . . . 44 12.2 LinkingtoEmbeddedFiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 12.3 Jumpingtoatarget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 • Jumpingtoa \hypertargetwith\ahyperlink . . . . . . . . . . . . . . . 46 • Jumpingtoa \labelwith\ahyperref . . . . . . . . . . . . . . . . . . . . 47 12.4 OptionalArgsof \ahyperrefand\ahyperlink. . . . . . . . . . . . . . . . 47 12.5 OpeningandSavingwith\ahyperextract . . . . . . . . . . . . . . . . . . . 48 12.6 Thechilddocument. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 13CreatingaPDFPackage 49 14InitializingaTextFieldwithUnicode 50 15UsingLayers,RolloversandAnimation. 51 15.1 Rollovers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 15.2 Usingtheformfieldtooltipfeature. . . . . . . . . . . . . . . . . . . . . . . . 53 15.3 LayersandAnimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 16ButtonandOcgAnime 54 16.1 The\btnAnimeCommand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 16.2 TheocgAnimeEnvironment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 16.3 MovingtheControlButtons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 References 60 l a u n a M o r P B e A e h T Forward 4 1. Forward Forthepastseveralyears(thisyearis2016),I’vebeenwritingabooktitled, AcroTEXeDucationSystemTools: LATEXforinteractivePDFdocuments. The book [6] covers AeB, which includes the eforms package, and AeB Pro in great detail and includes many examples to illustrate concepts and techniques. Numerous newexamplesareavailableontheCD-ROMthataccompaniesthebook. During the time of the writing, each of the packages covered was examined, bugs were fixed, and many new and major features were created. Any new features devel- opedinthecourseofwritingthebookaredocumentedinthebook;however,theyare not included in this documentation. You can either buy the yet-to-be-submitted book sometime in the future, or discover the features by studying the DTX documentation of the program files. Sorry, it took me three years to write the book, I don’t want to spendanotheryearonthisdocumentation. :-{) Dr. D.P.Story January20,2016 2. Overview AeB Pro, package file base name aeb_pro (ctan.org/pkg/aeb-pro), is an assortment of features(seeSection2.2below)implementedthroughacombinationofpdfmarkoper- ators[4],whicharenativetoaPostscriptfile,andJavaScripttechniques,someofwhich requireAcrobat Professional. ThesefeaturesweremeanttobeusedwithAeB(AcroTEX eDucation Bundle); in particular, the insdljs and eforms packages are essential to AeBPro. Tohaveaccesstoallthefeaturesof AeBPro,thedocumentauthormusthave AcrobatPro7.0orlaterandusedvips/DistillerworkflowtocreatethePDF.Forthemost part,oncethedocumentisassembled,itcanbeviewedbyAdobeReader7.0orlater. Despite the declaration in the Forward to the contrary, this manual will be up- datedforVersion2.1of AeBProtoreflectthecreationofasignificantnewfeature,the useacrobat option. For a document author who prefers pdflatex (including lualatex) non-Distiller or xelatex, this option opens the features of AeB Pro provided the document author workflow has the full Acrobat application and has set it up as the primary PDF viewer on his/ her computer system. Continue reading about the useacrobat option on page 9. The noprooptionhaschangedaswell,thecodebasethatdoesnotdependontheAcrobat application is now available to non-Distiller workflows; refer to the description of the noprooptiononpage9foradditionaldetails. 2.1.Dedication This is a package that I’ve been meaning to write for some time, it has had to wait for my retirement. The AeB Pro package includes several techniques that I’ve developed overtheyearsformypersonaluse,andafewnewones. ThetechniquesrequireAcrobat l a Pro7.0orlater,aswellastheAdobeDistiller. u n a M o r P B e A e h T Overview 5 As a now former educator, I’ve always preferred the use of Acrobat/Distiller over pdftex/AdobeReader. IrecognizethedebtIowetotheY&YTEXSystem,1andtoAcrobat and Distiller.2 These systems have inspired me and have made it easy to develop new ideas. IbelievethatifIhadnotusedtheWindows/Acrobatplatform,Iwouldnothave developedallthepackagesandsystemsthatIdid.3 I dedicate AeB Pro to Y&Y (developer Berthold K. P. Horn) and to Adobe Systems, developer of Acrobat. Since I entered the Internet education business, I’ve gotten to knowBertholdquitewellthroughouremailcorrespondence,andmanyofthesoftware engineersoftheAcrobatsoftwareengineeringteam.4 Thankyouallforyourwonderful work. 2.2.Features Asyoumightdiscernfromthetableofcontents,thispackagefeatures: 1. AeB Central Control: A uniform way of handling the packages in the AcroTEX FamilyofSoftware. 2. SupportsallfieldsintheInitialViewtaboftheDocumentPropertiesdialogbox. 3. CompletesupportfordocumentlevelJavaScriptsandfordocumentactions. 4. Completesupportforpageactions,bothopenandcloseevents. 5. Completesupportforfullscreenmode. 6. Supportforattachingdocuments,andforlinkingtoandforlaunchingembedded files. 7. SupportforcreatingaPDFPackage,newtoversion8of Acrobat. 8. SupportforwhatIcalldocumentassemblymethods,whichI’vefoundtobevery usefulthroughtheyears. (Thistechniquewasdevelopedintheyear2000whileI wasoutinSanJosé.) 9. SupportfortheuseofOptionalContentGroups,rolloversandanimations. Ianticipatefuturedevelopments. 1Sadly,nowoutofbusiness. Y&Ywasacriticallyimportantpartnerinmyefforts: itsearlyuseoftype1 fontsmadeiteasytousedifferentfonts;itsexcellentdviwindopreviewer—stillunsurpassedbycurrent previewers—wasanessentialtoolinmuchofwhatIdid,andreallyfiredmyimagination. 2ThoughpdftexanddvipdfmareimportantapplicationsandhavetheirplaceintheLATEXtoPDFwork- flow,Ifoundthemtoolimitingandtooslowindevelopment. ForAcrobat,youhaveateamoftopprofes- sionalsoftwaredevelopersworkingontheAcrobat/AdobeReaderapplications,asopposedtoacademics workingsporadicallyonaPDFcreator. Theviabilityoftheapplications(pdftexanddvipdfm)ultimately dependontoofewindividuals. 3AnInternetcolleagueonceaskedmewhyIdidn’tswitchovertoLinux,IrespondedthatifIhaddone that,wewouldnotknoweachother. WewerebroughttogetherbythesoftwaredevelopmentthatIdidon l theWindows/Acrobatplatform. Switchingwouldhaveshutmedownfromthebeginning. a u 4Intheyear2000,ItookasevenmonthsabbaticalinSanJosé,CA,andworkedontheAcrobatsoftware n engineeringteam,forAcrobat5.0. GoodmemoriesfrommydayswithAdoberemain. Imadegoodfriends a M there. o r P B e A e h T Overview 6 2.3.SampleFilesandArticles ThebasicdistributiondemonstrationfilesareavailablefromtheAeBProwebsite.5 AcroTEX Blog.The basic examples from the distribution are also available from the AcroTEX Blog, accessible from the page AeBProDemoFiles.6 There is another more recent collection of examples on AcroTEXBlog, these will be referenced in the margin using the icon b , whereas✍ refers to a written blog article. In all cases, the source fileandanydependentresourcesareattachedtothePDF.Alistingofallexamplesthat havetheaeb-protag.7 2.4.Requirements To open this package up to a wider population of users, the requirements for this packagehavechanged;thedocumentauthorisnolongerrequiredtoowntheAcrobat application(stronglyrecommended)andisnolongerrequiredtousethedvips/Distiller workflow, as previous versions have required. This package classifies you, as the doc- umentauthor,intooneofthreegroups: 1. YouownAcrobatandusethedvips/Distillerworkflow. Thisistheidealworkflow forthispackagebecauseallfeaturesofthispackageareavailable. 2. YouownAcrobatbutprefertouseanon-Distillerworkflow;thatis,youpreferto usetheapplicationspdflatex,lualatex,orxelatex. Inthiscase,almostallfeatures are available through the useacrobat option, refer to the initial description of thisoptiononpage9. 3. You do not own Acrobat, your PDF creator must be pdflatex, lualatex, or xela- tex. To avoid compile errors, you must use the nopro option, read the initial descriptionofthisoptiononpage9. IfyoudoownAcrobat,itmustbeversion7orlater;torepeat, Acrobat 7.0 Professionalorlaterisrequired If you do not own Acrobat and you want to access the extensive features of AeB Pro beyond what the nopro option provides, you need to buy the application.8 Once the document is built, however, Adobe Reader 7.0 (or later) is sufficient to view the doc- ument. This is a reasonable restriction since some JavaScript techniques used by this packagerequireAcrobatPro. AeB Prorequirestheinsdljsand eformspackages,bothofwhichareincludedwith the AcroTEX eDucation Bundle (AeB) distribution. The use of the web package is op- tional, though highly recommended. These are all meant to fit together as a compre- hensiveandunifiedfamilyofpackages,afterall. 5http://www.math.uakron.edu/~dpstory/aeb_pro.html 6http://www.acrotex.net/blog/?cat=98 l 7http://www.acrotex.net/blog/?tag=aeb-pro a u 8IntheUnitedStatesandEurope,Adobeoffersasignificantacademicdiscountonitssoftware,including n AcrobatPro. EducatorsshouldlookintothepricestructureofAdobeAcrobatattheirinstitutions;perhaps, a M theirDepartmentorCollegecansupplyafinancialgrantforthepurchaseofthesoftware. o r P B e A e h T Overview 7 BelowisalistofotherrequiredpackagesusedbytheAeBPro: 1. hyperref: The hyperref bundle should be already on your system, it is standard tomostLATEXdistributions. 2. xkeyval: The very excellent package by Hendri Adriaens. This package allows developerstowritecommandsthattakeavarietyofcomplexoptionalarguments. Youshouldgetthemostrecentversion,atthiswriting,thelatestisv2.5e,orlater. 3. xcolor: AnamazingcolorpackagebyDr. UweKern. Thispackagemakesiteasy to write commands to dim the color. Get a recent version, at this writing, the latestisv2.08(2005/11/25). 4. truncate: This package, by Donald Arseneau, is used in the navigation panel to abbreviate the section titles if they are too wide for the panel. This package is distributedwiththeAPB. 5. comment: Ageneralpurposepackage,VictorEijkhout,forcreatingenvironments that can be included in the document or excluded as comments. A very useful packageforLATEXpackagedevelopers. ThispackageisdistributedwiththeAPB. 6. eso-picbyRolfNiepraschkandeveryshibyMartinSchröder,theseareusedby webtocreatebackgroundgraphicsandgraphicoverlays. One of the extremely nice features of MiKTEX is that it can automatically download andinstallanyunknownpackagesontoyourharddrive,sogettingtheAeBProupand runningisnotaproblem! 2.5.TheAeB ProFamilyofSoftware Toqualifytobeamemberofthe‘AeBProPro’family,apackagemustrequireAcrobat DistillerasthePDFcreator. Welistmanyofthemembersofthisexclusivefamily. aebxmp is a LATEX package (ctan.org/pkg/aebxmp) that fills in the advance metadata. ThepackagerequiresAcrobat8ProfessionalandusesE4X,theXMLparserthatis builtintotheJavaScriptengine. rmannot(ctan.org/pkg/rmannot)createsrichmediaannotations(RMA),whichmayem- bedorstreamSWF,FLV,andMP3filesforplayingwhileadocumentisbeingread. Rich media annotation is a feature of Acrobat/Adobe Reader, version 9 or later. AcrobatProandAcrobatDistiller(version9orlater)arerequiredtobuildadocu- ment, and Adobe Reader (version 9 or later) is needed to activate the annotation andplaythemedia. AcroFLeXisanapplicationofthermannotpackagebrieflydescribedabove. Theacroflex package (ctan.org/pkg/acroflex) creates a graphing screen. The user can type in functionsandgraphthem. Agraphingscreencanbepopulatedwithpre-packaged al functions for the user to scrutinize and interact with. The package can graph u n functionsofasinglevariablex,apairofparametricequationsthatarefunctions a oft,andapolarfunctionoft. M o r P B e A e h T Overview 8 The graphing screen is a rich media annotation that uses a specially developed SWF file, called the AcroFLeX Graphing widget. The package takes advantage of rich media annotations, a version 9 feature of Acrobat; it therefore requires Ac- robat Pro and Distiller version 9 or later. The user needs to use Adobe Reader (version9.0orlater)inordertoobtainthegraphingfunctionality. aeb_mlink (ctan.org/pkg/aeb-mlink) creates hypertext links in documents for text ex- tending over multiple lines. The package requires that the PDF be created by Ac- robat Distiller, version 7.0 or later to create multi-line links, and requires Adobe Reader7.0orlaterforthelinkstoworkcorrectly. annot_pro (ctan.org/pkg/annot-pro) is used to create text, stamp, and file attachment annotationsusing AcrobatDistillerthatcanthenbeviewedinAdobeReader. graphicxsp(ctan.org/pkg/graphicxsp)embedsagraphicfileinaPDFdocumentinsuch awaythattheauthormayreusethatsamegraphicswithoutsignificantlyincreas- ingthefilesize. ThepackagealsosupportstheAdobetransparencymodel. Thenextthreepackagesarelessimportant,someare“novelty”packages. acrosort (ctan.org/pkg/acrosort) is a novelty package for importing an image that has beenslicedintorowsandcolumnsandrandomlyrearranged. TheJavaScriptdoes abubblesortonthepicture. AeBSlicingisabatchsequence(ctan.org/pkg/aebslicing)forAcrobatProthattakesthe imageopeninAcrobatandslicesitintoaspecifiednumberofrowsandcolumns, andsavestheslicestoadesignatedfolder. Itisusedfortheacromemorypackage. acromemoryisaLATEXpackage(ctan.org/pkg/acromemory)thatimplementstwovaria- tionsofamemorygame: (1)asinglegameboardconsistingofanumberoftiles, eachtilehasamatchingtwin,theobjectistofindallthematchingtwins;(2)two gameboards,bothidenticalexceptonehasbeenrandomlyrearranged,theobject is the find the matching pieces in each of the two game boards. The AeB Slicing isusedtoslicetheimageintoaspecifiednumberofrowsandcolumns. These,aswellastheAeBProdistributionitself,areavailablethroughCTANortheAeB Profamilywebsite: www.math.uakron.edu/~dpstory/aeb_pro.html 2.6.PackageOptions Thegeneralsyntaxforaeb_prois, \usepackage[(cid:2)options(cid:3)]{aeb_pro} or \usepackage[(cid:2)options(cid:3)]{aeb-pro} l a u n BelowisalistofalloptionsoftheAeBPropackage: a M o r P B e A e h T Overview 9 driver=(cid:2)driver(cid:3) Thepermissiblevaluesof(cid:2)driver(cid:3)aredvips,dvipsone,pdftex, and xetex. The latter two are automatically detected and need not be specified. Ifnodetectabledriverisidentifiedandnodriverisgiven,dvipsisassumed. useacrobat For those who prefer to use pdflatex (or lualatex) orxelatex and who own the Acrobat application, use the useacrobat option to open all features of this package except for any features associated with the uselayers option. The creationoflayersisstillonlysupportedthroughthepdfmarkoperator. As you go through the examples provided by this package, all sample files work exceptfortheonesusingtheuselayersorocganimeoption. ContinuereadingabouttheuseacrobatoptioninSection3. nopro If this option is taken, then no code that requires Distiller or Acrobat is in- put. Authorswhousepdflatex/lualatex/xelatexandwhodonotowntheAcrobat applicationmayhaveaccesstothe‘nopro’featuresbytakingthenoprooption. ContinuereadingaboutthenoprooptioninSection4. AeBProOptions The AeB Pro package recognizes the components of AeB, these are web,exerquiz,dljslib,eforms,insdljs,eq2db,aebxmp,graphicxsp,hyper- ref. Thevalueofeachoftheseisalistofoptionsyouwantthatpackagetouse. (The hyperref package is not a component of AeB, but it is such an integral part of AeBthatitisincluded.) SeeSection5,page14. gopro SomecomponentsofAeBhaveaprooption,whenyouusethegoprooptionof AeB Pro, the pro option is passed to all components of AeB Pro that have a pro option. attachsource This key has as its value a list of extensions. For each extension listed,thefile\jobname.extwillbeattachedtotheparentPDF.SeeSection10.1, page28. attachments Thiskeyhasitsvaluealistofpathstofilestobeattachedtotheparent document. SeeSection10.2,page29. linktoattachments Invokingthisoptioncausescodeforlinkingtoattachments,or for giving attachments descriptions other than the default ones. See Section12, page42. childof InaLATEXchilddocument,usethisoptiontosetthepathbacktotheparent document. SeeSection12.6,page49. btnanime Whenthisoptionistaken,thecodeforbuttonanimationisincludedinthe compilation. SeeSection16,page54fordetails. uselayers TakingthisoptionbringsincodeinsupportofOptionalContentGroups, seeSection15,page51. l a u ocganime When this option is taken, the code for ocg animation is included in the n a compilation. SeeSection16.2,page57fordetails. M o r P B e A e h T Overview 10 2.7.Installation AeB Pro requires the installation of AeB (ctan.org/pkg/acrotex). Be sure to install AeB and to read the installation instructions. In this section, we outline the method of installing AeBPro. •Automaticinstallation Some TEX systems, most notably MiKTEX and TEX Live, have a Package Manager to automaticallydownloadandinstallLATEXpackages. IfyouhaveaPackageManagerand not installed AeB Pro do so now. After AeB Pro is installed, it is not quite ready to be used. Locate where the Package Manager installed the documentation portion of the installation,forMiKTEX,thismightbeat C:\Program Files (x86)\MiKTeX 2.9\doc\latex\aeb-pro (This path assumes the use of MiKTEX 2.9.) The folder contains documentation and examplefiles. •Manualinstallation ManualinstallationmaybenecessaryforsomeTEXsystems,orforthecasewhereyou have downloaded the ZIP package files from CTAN or from the home website of AeB Proathttp://www.math.uakron.edu/~dpstory/aeb_pro.html. TheAeBProdistributioncomesintwoZIPfiles: aebpro_pack.zipandaebpro.zip. The first contains the program files and documentation,9 the latter contains the full distribution,includingprogramfiles,documentation,andexamplefiles. Ifyoualready have AeB Pro, it suffices to update your installation using aebpro_pack.zip. If you don’thaveAeBProalreadyinstalled,theinstallthecontentsof aebpro.zip. ToinstallAeBPro,usethefollowingsteps: 1. Place aebpro.zip (or possibly aebpro_pack.zip) on your latex search file and unzip. (Ifyoualreadyhaveanaeb_profolder,unziponelevelabovetheaeb_pro folder.) Unzippingcreatesafoldernamedaeb_pro. InstallingAeBProwithMiKTEX2.8orlater. MiKTEX2.8orlaterismoreparticular aboutwhereyouinstallpackagesbyhand. Ifyouareinstalling AeB Probyhand, MiKTEX 2.8/2.9 requires that you install the distribution in a local root TDS tree. ReviewtheMiKTEXhelppageonthistopic http://docs.miktex.org/manual/localadditions.html WithinC:\Local TeX Files\tex\latex,copyaebpro_pack.zip(andpossibly aebpro.zip)andunzip. Unzippingcreatesafoldernamedaeb_pro. IfyoualreadyhaveAeB ProthatwasautomaticallyinstalledonyourMiKTEXsys- tem, you should delete this old version of AeB Pro. You may have to use the al MiKTEXpackagemanagertoremovethemfromtheMiKTEXdatabaseregistry. u n a 9Availablefromhttp://www.math.uakron.edu/~dpstory/aeb_pro.html M o r P B e A e h T
Description: