PDF-form creation using pdflatex, hyperref and insdljs. Dirk Krause February 7, 2008
|
|
|
- Abraham May
- 10 years ago
- Views:
Transcription
1 PDF-form creation using pdflatex, hyperref and insdljs Dirk Krause February 7,
2 Contents 1 Introduction Copyright Purpose of this tutorial hyperref and PDF forms 5 3 Before we start Document preamble Document class Fonts Page layout Graphics and colors hyperref-package Form element attributes The first form Goal First attempt: ex Aligning elements in a table: ex Spaces and element widths: ex Label text position: ex Colors: ex JavaScript: ex Document events: ex0008 and ex Form element events: ex Editable choice list: ex Adding help Overview PDF annotations Tooltips Another form Goal Initializing a choice list using JavaScript: ex Form number three: Interactive application Goal Processing button click events: ex Form number four: using both insdljs and inputenc 54 A History 57 2
3 B GNU Free Documentation License 58 B.1 APPLICABILITY AND DEFINITIONS B.2 VERBATIM COPYING B.3 COPYING IN QUANTITY B.4 MODIFICATIONS B.5 COMBINING DOCUMENTS B.6 COLLECTIONS OF DOCUMENTS B.7 AGGREGATION WITH INDEPENDENT WORKS B.8 TRANSLATION B.9 TERMINATION B.10 FUTURE REVISIONS OF THIS LICENSE
4 1 Introduction 1.1 Copyright Copyright (c) 2007 Dirk Krause Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the appendix in a section named GNU Free Documentation License. 1.2 Purpose of this tutorial This tutorial shows how to create PDF forms using pdflatex, hyperref and insdljs. The focus is set on forms which are filled interactively on screen and printed. You need a LATEX distribution, pdflatex, hyperref and insdljs must be installed. The insdljs package is a part of the AcroTeX Education Bundle, see You should have the following additional documentation available: the hyperref manual: [RO04], guides, specifications and references for Acrobat JavaScript: [Sup03], [ADS05a] and [ADS05b] and the PDF file format reference: [ASI01]. This tutorial shows three examples, the first one is developed step-by-step. The final versions of the forms are ex0011, ex0101 and ex
5 2 hyperref and PDF forms The hyperref package provides environments and macros to create forms. The form elements must be placed in a Form environment, Form environments are limited to one Form environment per document. The following macros can be used to create form elements: \TextField[Parameter]{Text} creates a text field. \CheckBox[Parameter]{Text} creates a check box. \ChoiceMenu[Parameter]{Text}{Auswahl-Optionen} creates a choice list. \PushButton[Parameter]{Text} creates a button. \Submit[Parameter]{Text} creates a Submit-Button. Pushing the button sends form data to the URL specified as action-parameter in the Form environment. \Reset[Parameter]{Text} creates a Reset-button. The hyperref documentation [RO04] provides a more detailed description of the Form environment and the macros above. 5
6 3 Before we start 3.1 Document preamble Document class The usual document classes i. e. scrartcl or article can be used to create forms Fonts The PDF standard requires each PDF viewer to render 14 fonts even if the font is not embedded into the PDF file, especially the font families Times, Helvetica and Courier. JavaScript code can be used to change form field fonts to these fonts. We want to use JavaScript to change fonts, so we load the font setup packages using 1 \ u s e p a c k a g e { mathptmx } 2 \ u s e p a c k a g e [ s c a l e d =. 9 2 ] { h e l v e t } 3 \ u s e p a c k a g e { c o u r i e r } Additionally we use 1 \ u s e p a c k a g e [ T1 ] { f o n t e n c } to change the font encoding from OT1 (LATEX default) to T1. The default family is switched to Helvetica using 1 \ renewcommand * { \ f a m i l y d e f a u l t } { \ phv } because sans-serif fonts are better readable on screen than serifed fonts Page layout The page margins are set up by: 1 \ u s e p a c k a g e [ l e f t =25mm, t o p =25mm, bottom =10mm, r i g h t =10mm] { geometry } Page header and footer are set up by: 1 \ u s e p a c k a g e { f a n c y h d r } 2 \ l h e a d { Firma ABC} \ chead { } \ r h e a d { A b t e i l u n g XYZ} 3 \ l f o o t { } \ c f o o t { } \ r f o o t {} 4 \ p a g e s t y l e { f a n c y } Graphics and colors The packages 1 \ u s e p a c k a g e { g r a p h i c x } 2 \ u s e p a c k a g e { c o l o r } can be used to add graphics (i. e. logos) and colors. 6
7 3.1.5 hyperref-package The hyperref package is used: 1 \ u s e p a c k a g e [ 2 p d f t e x, a 4 p a p e r = t r u e, c o l o r l i n k s = t r u e, 3 p d f t i t l e ={Key form }, 4 p d f s u b j e c t ={Key }, 5 p d f a u t h o r ={ F r o n t of House Manager }, 6 pdfpagemode=usenone, p d f s t a r t v i e w =FitH, p d f h i g h l i g h t ={/N} 7 ] { h y p e r r e f } 7
8 3.2 Form element attributes I recommend to set form elements colors and fonts as shown in table 1. Table 1: Form element colors and fonts Border color Fill color Font weight Screen colored colored bold Printout black white regular Screen and Printout 1 colored white regular All form elements should be marked fully colored when shown on screen so users can find all elements easily. For readability we choose a bold font to show text on a colored background. Printouts of forms are typically done on black-and-white printers. On printout we want a black border and white filling for form elements. The text is black on white now, so we do not need a bold font. JavaScript must be enabled in the PDF viewer to change colors and fonts before and after printing the document. The color for marking form elements should be the same color for all elements. We want to show black text on color-filled areas, so we should use a light color for a good contrast. 1 if JavaScript is deactivated 8
9 4 The first form 4.1 Goal We want to design a form which can be used to request keys for new empolyees. The following data is needed: First name and name, Department, Employment time (unlimited or limited from... until... ), the doors to open. Text fields are used for first name and name. Department and employment time are choosen from a list. The doors are selected in check boxes. 4.2 First attempt: ex0001 The ex0001.tex file shows a first attempt to create the form. 1 \ d o c u m e n t c l a s s [ ngerman, a 4 p a p e r ] { s c r a r t c l } 2 \ u s e p a c k a g e [ l a t i n 1 ] { i n p u t e n c } 3 \ u s e p a c k a g e [ T1 ] { f o n t e n c } 4 \ u s e p a c k a g e { textcomp } 5 \ u s e p a c k a g e { mathptmx } 6 \ u s e p a c k a g e [ s c a l e d =. 9 2 ] { h e l v e t } 7 \ u s e p a c k a g e { c o u r i e r } 8 \ renewcommand * { \ f a m i l y d e f a u l t }{ phv } 9 \ u s e p a c k a g e [ l e f t =25mm, t o p =25mm, bottom =10mm, r i g h t =10mm] { geometry } 10 \ u s e p a c k a g e { f a n c y h d r } 11 \ l h e a d {ABC, I n c. } \ chead { } \ r h e a d {XYZ Dept. } 12 \ l f o o t { } \ c f o o t { } \ r f o o t {} 13 \ p a g e s t y l e { f a n c y } 14 \ u s e p a c k a g e { g r a p h i c x } 15 \ u s e p a c k a g e { c o l o r } 16 \ u s e p a c k a g e [ 17 p d f t e x, a 4 p a p e r = t r u e, c o l o r l i n k s = t r u e, 18 p d f t i t l e ={Key form }, p d f s u b j e c t ={Key }, 19 p d f a u t h o r ={ i c h }, pdfpagemode=usenone, p d f s t a r t v i e w =FitH, 20 p a g e b a c k r e f, p d f h i g h l i g h t ={/N} 21 ] { h y p e r r e f } 22 \ b e g i n { document } 23 \ s e c t i o n *{ Request f o r a key } 24 \ b e g i n {Form} 9
10 25 \ t e x t b f { Employee } \ \ 26 F i r s t name : \ T e x t F i e l d [ name=vorname ] { } \ \ 27 Name : \ T e x t F i e l d [ name=name ] { } \ \ 28 Department : \ ChoiceMenu [ name= a b t ]{}{% 29 S a l e s =v, P r o d u c t i o n =f, S e r v i c e =s } \ \ 30 \ t e x t b f {Time } \ \ 31 Time : \ ChoiceMenu [ name= z e i t ]{}{% 32 l i m i t e d =b, u n l i m i t e d =u } \ \ 33 from : \ T e x t F i e l d [ name=from ] { } \ \ 34 u n t i l : \ T e x t F i e l d [ name= u n t i l ] { } \ \ 35 \ t e x t b f { Doors } \ \ 36 F r o n t door : \ CheckBox [ name= h t ] { } \ \ 37 Ground f l o o r : \ CheckBox [ name=e1 ] { } \ \ 38 F i r s t f l o o r : \ CheckBox [ name=e2 ] { } \ \ 39 \ end {Form} 40 \ end { document } After running 1 p d f l a t e x ex0001 && p d f l a t e x ex0001 we can open ex0001.pdf in the PDF viewer. The form does not look good but contains the required functionality. The source shows: A unique name (identifier) is assigned to each form element using the name parameter. The last argument of the \ChoiceMenu[]{}{} macro is a list containing the available choices. Each list entry contains the full text to show and an abbreviation, separated by =. 10
11 4.3 Aligning elements in a table: ex0002 We use a tabular environment to align the form elements in a table. 1 \ d o c u m e n t c l a s s [ ngerman, a 4 p a p e r ] { s c r a r t c l } 2 \ u s e p a c k a g e [ l a t i n 1 ] { i n p u t e n c } 3 \ u s e p a c k a g e [ T1 ] { f o n t e n c } 4 \ u s e p a c k a g e { textcomp } 5 \ u s e p a c k a g e { mathptmx } 6 \ u s e p a c k a g e [ s c a l e d =. 9 2 ] { h e l v e t } 7 \ u s e p a c k a g e { c o u r i e r } 8 \ renewcommand * { \ f a m i l y d e f a u l t }{ phv } 9 \ u s e p a c k a g e [ l e f t =25mm, t o p =25mm, bottom =10mm, r i g h t =10mm] { geometry } 10 \ u s e p a c k a g e { f a n c y h d r } 11 \ l h e a d {ABC, I n c. } \ chead { } \ r h e a d {XYZ Dept. } 12 \ l f o o t { } \ c f o o t { } \ r f o o t {} 13 \ p a g e s t y l e { f a n c y } 14 \ u s e p a c k a g e { g r a p h i c x } 15 \ u s e p a c k a g e { c o l o r } 16 \ u s e p a c k a g e [ 17 p d f t e x, a 4 p a p e r = t r u e, c o l o r l i n k s = t r u e, 18 p d f t i t l e ={Key form }, p d f s u b j e c t ={Key }, 19 p d f a u t h o r ={ i c h }, pdfpagemode=usenone, p d f s t a r t v i e w =FitH, 20 p a g e b a c k r e f, p d f h i g h l i g h t ={/N} 21 ] { h y p e r r e f } 22 \ b e g i n { document } 23 \ s e c t i o n *{ Request f o r a key } 24 \ b e g i n {Form} 25 \ b e g i n { t a b u l a r } { r l } 26 \ h l i n e 27 &\\*[ 0.9em ] \ multicolumn { 2 } { c } { \ t e x t b f { Employee } } \ \ 28 F i r s t name:&% 29 \ T e x t F i e l d [ name=vorname ] { } \ \ 30 Name:&% 31 \ T e x t F i e l d [ name=name ] { } \ \ 32 Department:&% 33 \ ChoiceMenu [ name= a b t ]{}{% 34 S a l e s =v, P r o d u c t i o n =f, S e r v i c e =s } \ \ 35 \ h l i n e 36 &\\*[ 0.9em ] \ multicolumn { 2 } { c } { \ t e x t b f {Time } } \ \ 37 Time:&% 38 \ ChoiceMenu [ name= z e i t ]{}{% 39 l i m i t e d =b, u n l i m i t e d =u } \ \ 40 from:&% 41 \ T e x t F i e l d [ name=from ] { } \ \ 11
12 42 u n t i l :&% 43 \ T e x t F i e l d [ name= u n t i l ] { } \ \ 44 \ h l i n e 45 &\\*[ 0.9em ] \ multicolumn { 2 } { c } { \ t e x t b f { Doors } } \ \ 46 F r o n t door:&% 47 \ CheckBox [ name=ht, width =1.2em ] { } \ \ 48 Ground f l o o r :&% 49 \ CheckBox [ name=e1, width =1.2em ] { } \ \ 50 F i r s t f l o o r :&% 51 \ CheckBox [ name=e2, width =1.2em ] { } \ \ 52 \ h l i n e 53 \ end { t a b u l a r } 54 \ end {Form} 55 \ end { document } 12
13 4.4 Spaces and element widths: ex0003 We use 1 &&\\*[ 0.9em ] to add vertical space between the table lines. In the last table line we use 1 &&\\* In the ChoiceMenu we set the popdown=true parameter to establish popdown-behaviour. The parameter width=20em parameter sets the horizontal size. 1 \ d o c u m e n t c l a s s [ ngerman, a 4 p a p e r ] { s c r a r t c l } 2 \ u s e p a c k a g e [ l a t i n 1 ] { i n p u t e n c } 3 \ u s e p a c k a g e [ T1 ] { f o n t e n c } 4 \ u s e p a c k a g e { textcomp } 5 \ u s e p a c k a g e { mathptmx } 6 \ u s e p a c k a g e [ s c a l e d =. 9 2 ] { h e l v e t } 7 \ u s e p a c k a g e { c o u r i e r } 8 \ renewcommand * { \ f a m i l y d e f a u l t }{ phv } 9 \ u s e p a c k a g e [ l e f t =25mm, t o p =25mm, bottom =10mm, r i g h t =10mm] { geometry } 10 \ u s e p a c k a g e { f a n c y h d r } 11 \ l h e a d {ABC, I n c. } \ chead { } \ r h e a d {XYZ Dept. } 12 \ l f o o t { } \ c f o o t { } \ r f o o t {} 13 \ p a g e s t y l e { f a n c y } 14 \ u s e p a c k a g e { g r a p h i c x } 15 \ u s e p a c k a g e { c o l o r } 16 \ u s e p a c k a g e [ 17 p d f t e x, a 4 p a p e r = t r u e, c o l o r l i n k s = t r u e, 18 p d f t i t l e ={Key form }, p d f s u b j e c t ={Key }, 19 p d f a u t h o r ={ i c h }, pdfpagemode=usenone, p d f s t a r t v i e w =FitH, 20 p a g e b a c k r e f, p d f h i g h l i g h t ={/N} 21 ] { h y p e r r e f } 22 \ b e g i n { document } 23 \ s e c t i o n *{ Request f o r a key } 24 \ b e g i n {Form} 25 \ b e g i n { t a b u l a r } { r l } 26 \ h l i n e 27 &\\*[ 0.9em ] \ multicolumn { 2 } { c } { \ t e x t b f { Employee } } \ \ 28 &\\*[ 0.9em ] F i r s t name:&% 29 \ T e x t F i e l d [ name=vorname, width =20em ] { } \ \ 30 &\\*[ 0.9em ] Name:&% 31 \ T e x t F i e l d [ name=name, width =20em ] { } \ \ 32 &\\*[ 0.9em ] Department:&% 33 \ ChoiceMenu [ { } = { }, name= abt, width =20em, popdown= t r u e ]{}{% 34 S a l e s =v, P r o d u c t i o n =f, S e r v i c e =s } \ \ 13
14 35 &\\*[ 0.9em ] \ h l i n e 36 &\\*[ 0.9em ] \ multicolumn { 2 } { c } { \ t e x t b f {Time } } \ \ 37 &\\*[ 0.9em ] Time:&% 38 \ ChoiceMenu [ name= z e i t, width =20em, popdown= t r u e ]{}{% 39 l i m i t e d =b, u n l i m i t e d =u } \ \ 40 &\\*[ 0.9em ] from:&% 41 \ T e x t F i e l d [ name=from, width =10em ] { } \ \ 42 &\\*[ 0.9em ] u n t i l :&% 43 \ T e x t F i e l d [ name= u n t i l, width =10em ] { } \ \ 44 &\\*[ 0.9em ] \ h l i n e 45 &\\*[ 0.9em ] \ multicolumn { 2 } { c } { \ t e x t b f { Doors } } \ \ 46 &\\*[ 0.9em ] F r o n t door:&% 47 \ CheckBox [ name=ht, width =1.2em ] { } \ \ 48 &\\*[ 0.9em ] Ground f l o o r :&% 49 \ CheckBox [ name=e1, width =1.2em ] { } \ \ 50 &\\*[ 0.9em ] F i r s t f l o o r :&% 51 \ CheckBox [ name=e2, width =1.2em ] { } \ \ 52 &\\ 53 \ h l i n e 54 \ end { t a b u l a r } 55 \ end {Form} 56 \ end { document } 14
15 4.5 Label text position: ex0004 The y-position of form element texts and label texts differ because the form elements have an inner and outer border. We use text fields to show the labels and make the borders invisible. So label text and form element text is at the same y-position now. We create a white border for the labels 1 b o r d e r c o l o r ={1 1 1} and set text alignment to right-aligned: 1 a l i g n =2 1 \ d o c u m e n t c l a s s [ ngerman, a 4 p a p e r ] { s c r a r t c l } 2 \ u s e p a c k a g e [ l a t i n 1 ] { i n p u t e n c } 3 \ u s e p a c k a g e [ T1 ] { f o n t e n c } 4 \ u s e p a c k a g e { textcomp } 5 \ u s e p a c k a g e { mathptmx } 6 \ u s e p a c k a g e [ s c a l e d =. 9 2 ] { h e l v e t } 7 \ u s e p a c k a g e { c o u r i e r } 8 \ renewcommand * { \ f a m i l y d e f a u l t }{ phv } 9 \ u s e p a c k a g e [ l e f t =25mm, t o p =25mm, bottom =10mm, r i g h t =10mm] { geometry } 10 \ u s e p a c k a g e { f a n c y h d r } 11 \ l h e a d {ABC, I n c. } \ chead { } \ r h e a d {XYZ Dept. } 12 \ l f o o t { } \ c f o o t { } \ r f o o t {} 13 \ p a g e s t y l e { f a n c y } 14 \ u s e p a c k a g e { g r a p h i c x } 15 \ u s e p a c k a g e { c o l o r } 16 \ u s e p a c k a g e [ 17 p d f t e x, a 4 p a p e r = t r u e, c o l o r l i n k s = t r u e, 18 p d f t i t l e ={Key form }, p d f s u b j e c t ={Key }, 19 p d f a u t h o r ={ i c h }, pdfpagemode=usenone, p d f s t a r t v i e w =FitH, 20 p a g e b a c k r e f, p d f h i g h l i g h t ={/N} 21 ] { h y p e r r e f } 22 \ newcommand { \ t e x t f o r l a b e l }[2]{% 23 \ T e x t F i e l d [ name ={#1}, v a l u e ={#2}, width =7em,% 24 a l i g n =2, b o r d e r c o l o r ={1 1 1}, r e a d o n l y = t r u e ]{}% 25 } 26 \ b e g i n { document } 27 \ s e c t i o n *{ Request f o r a key } 28 \ b e g i n {Form} 29 \ b e g i n { t a b u l a r } { r l } 30 \ h l i n e &\\*[ 0.9em ] \ multicolumn { 2 } { c } { \ t e x t b f { Employee } } \ \ &\\*[ 0.9em ] \ t e x t f o r l a b e l { vn }{ F i r s t name:}&% 15
16 33 \ T e x t F i e l d [ name=vorname, width =20em ] { } \ \ 34 &\\*[ 0.9em ] \ t e x t f o r l a b e l { nn }{Name:}&% 35 \ T e x t F i e l d [ name=name, width =20em ] { } \ \ 36 &\\*[ 0.9em ] \ t e x t f o r l a b e l { ab }{ Department:}&% 37 \ ChoiceMenu [ name= abt, width =20em, popdown= t r u e, v a l u e =v]{}{% 38 S a l e s =v, P r o d u c t i o n =f, S e r v i c e =s } \ \ 39 &\\*[ 0.9em ] \ h l i n e 40 &\\*[ 0.9em ] \ multicolumn { 2 } { c } { \ t e x t b f {Time } } \ \ 41 &\\*[ 0.9em ] \ t e x t f o r l a b e l { z }{ Time:}&% 42 \ ChoiceMenu [ name= z e i t, width =20em, popdown= t r u e, v a l u e =u]{}{% 43 u n l i m i t e d =u, l i m i t e d =b } \ \ 44 &\\*[ 0.9em ] \ t e x t f o r l a b e l {v }{ from:}&% 45 \ T e x t F i e l d [ name=from, width =10em ] { } \ \ 46 &\\*[ 0.9em ] \ t e x t f o r l a b e l {b }{ u n t i l :}&% 47 \ T e x t F i e l d [ name= u n t i l, width =10em ] { } \ \ 48 &\\*[ 0.9em ] \ h l i n e 49 &\\*[ 0.9em ] \ multicolumn { 2 } { c } { \ t e x t b f { Doors } } \ \ 50 &\\*[ 0.9em ] \ t e x t f o r l a b e l { t h }{ F r o n t door:}&% 51 \ CheckBox [ name=ht, width =1.2em ] { } \ \ 52 &\\*[ 0.9em ] \ t e x t f o r l a b e l { t 1 }{ Ground f l o o r :}&% 53 \ CheckBox [ name=e1, width =1.2em ] { } \ \ 54 &\\*[ 0.9em ] \ t e x t f o r l a b e l { t 2 }{ F i r s t f l o o r :}&% 55 \ CheckBox [ name=e2, width =1.2em ] { } \ \ 56 &\\ 57 \ h l i n e 58 \ end { t a b u l a r } 59 \ end {Form} 60 \ end { document } 16
17 4.6 Colors: ex0005 We use 1 b o r d e r c o l o r ={ } to change the border color to light blue for the form elements. 1 \ d o c u m e n t c l a s s [ ngerman, a 4 p a p e r ] { s c r a r t c l } 2 \ u s e p a c k a g e [ l a t i n 1 ] { i n p u t e n c } 3 \ u s e p a c k a g e [ T1 ] { f o n t e n c } 4 \ u s e p a c k a g e { textcomp } 5 \ u s e p a c k a g e { mathptmx } 6 \ u s e p a c k a g e [ s c a l e d =. 9 2 ] { h e l v e t } 7 \ u s e p a c k a g e { c o u r i e r } 8 \ renewcommand * { \ f a m i l y d e f a u l t }{ phv } 9 \ u s e p a c k a g e [ l e f t =25mm, t o p =25mm, bottom =10mm, r i g h t =10mm] { geometry } 10 \ u s e p a c k a g e { f a n c y h d r } 11 \ l h e a d {ABC, I n c. } \ chead { } \ r h e a d {XYZ Dept. } 12 \ l f o o t { } \ c f o o t { } \ r f o o t {} 13 \ p a g e s t y l e { f a n c y } 14 \ u s e p a c k a g e { g r a p h i c x } 15 \ u s e p a c k a g e { c o l o r } 16 \ u s e p a c k a g e [ 17 p d f t e x, a 4 p a p e r = t r u e, c o l o r l i n k s = t r u e, 18 p d f t i t l e ={Key form }, p d f s u b j e c t ={Key }, 19 p d f a u t h o r ={ i c h }, 20 pdfpagemode=usenone, p d f s t a r t v i e w =FitH, p a g e b a c k r e f, p d f h i g h l i g h t ={/N} 21 ] { h y p e r r e f } 22 \ newcommand { \ t e x t f o r l a b e l }[2]{% 23 \ T e x t F i e l d [ name ={#1}, v a l u e ={#2}, width =7em, a l i g n =2,% 24 b o r d e r c o l o r ={1 1 1}, r e a d o n l y = t r u e ]{}% 25 } 26 \ b e g i n { document } 27 \ s e c t i o n *{ Request f o r a key } 28 \ b e g i n {Form} 29 \ b e g i n { t a b u l a r } { r l } 30 \ h l i n e 31 &\\*[ 0.9em ] \ multicolumn { 2 } { c } { \ t e x t b f { Employee } } \ \ 32 &\\*[ 0.9em ] \ t e x t f o r l a b e l { vn }{ F i r s t name:}&% 33 \ T e x t F i e l d [ name=vorname, width =20em,% 34 b o r d e r c o l o r ={ } ] { } \ \ 35 &\\*[ 0.9em ] \ t e x t f o r l a b e l { nn }{Name:}&% 36 \ T e x t F i e l d [ name=name, width =20em,% 37 b o r d e r c o l o r ={ } ] { } \ \ 38 &\\*[ 0.9em ] \ t e x t f o r l a b e l { ab }{ Department:}&% 17
18 39 \ ChoiceMenu [ name= abt, width =20em, popdown= t r u e, v a l u e =v,% 40 b o r d e r c o l o r ={ }]{}{% 41 S a l e s =v, P r o d u c t i o n =f, S e r v i c e =s } \ \ 42 &\\*[ 0.9em ] \ h l i n e 43 &\\*[ 0.9em ] \ multicolumn { 2 } { c } { \ t e x t b f {Time } } \ \ 44 &\\*[ 0.9em ] \ t e x t f o r l a b e l { z }{ Time:}&% 45 \ ChoiceMenu [ name= z e i t, width =20em, popdown= t r u e, v a l u e =u,% 46 b o r d e r c o l o r ={ }]{}{% 47 u n l i m i t e d =u, l i m i t e d =b } \ \ 48 &\\*[ 0.9em ] \ t e x t f o r l a b e l {v }{ from:}&% 49 \ T e x t F i e l d [ name=from, width =10em,% 50 b o r d e r c o l o r ={ } ] { } \ \ 51 &\\*[ 0.9em ] \ t e x t f o r l a b e l {b }{ u n t i l :}&% 52 \ T e x t F i e l d [ name= u n t i l, width =10em,% 53 b o r d e r c o l o r ={ } ] { } \ \ 54 &\\*[ 0.9em ] \ h l i n e 55 &\\*[ 0.9em ] \ multicolumn { 2 } { c }{% 56 \ t e x t b f { Doors } } \ \ 57 &\\*[ 0.9em ] \ t e x t f o r l a b e l { t h }{ F r o n t door:}&% 58 \ CheckBox [ name=ht, width =1.2em,% 59 b o r d e r c o l o r ={ } ] { } \ \ 60 &\\*[ 0.9em ] \ t e x t f o r l a b e l { t 1 }{ Ground f l o o r :}&% 61 \ CheckBox [ name=e1, width =1.2em,% 62 b o r d e r c o l o r ={ } ] { } \ \ 63 &\\*[ 0.9em ] \ t e x t f o r l a b e l { t 2 }{ F i r s t f l o o r :}&% 64 \ CheckBox [ name=e2, width =1.2em,% 65 b o r d e r c o l o r ={ } ] { } \ \ 66 &\\ 67 \ h l i n e 68 \ end { t a b u l a r } 69 \ end {Form} 70 \ end { document } 18
19 4.7 JavaScript: ex0006 The insdljs package is used to add document level JavaScript. The package requires to specify the output driver. 1 \ u s e p a c k a g e [ p d f t e x ] { i n s d l j s } The JavaScript-code to add is placed in an insdljs environment. The optional argument and the first required argument must be LATEX identifiers (use a string containing characters only, no numbers). The second required argument is a comment 1 \ b e g i n { insdljs } [ e x a a a a ] { e xaaaa }{ Document Level J a v a S c r i p t } 2 / /... P l a c e J ava s o u r c e code h e r e... 3 \ end { insdljs } The identifier is used to build a file name ( exaaaa.djs ) to temporarily store the packed Java- Script code. The OpenAction{} macro specifies a function which is executed when the document is opened. 1 \ OpenAction { / S / J a v a S c r i p t / JS ( m y F i r s t J a v a S c r i p t F u n c t i o n ( ) ; ) } The JavaScript-code is enclosed in brackets. The example code contains a function invokation. The function may be invoked multiple times (each time one navigates to page 1). We use a variable as a flag indicating whether the function is run for the first time or not. 1 \ d o c u m e n t c l a s s [ ngerman, a 4 p a p e r ] { s c r a r t c l } 2 \ u s e p a c k a g e [ l a t i n 1 ] { i n p u t e n c } 3 \ u s e p a c k a g e [ T1 ] { f o n t e n c } 4 \ u s e p a c k a g e { textcomp } 5 \ u s e p a c k a g e { mathptmx } 6 \ u s e p a c k a g e [ s c a l e d =. 9 2 ] { h e l v e t } 7 \ u s e p a c k a g e { c o u r i e r } 8 \ renewcommand * { \ f a m i l y d e f a u l t }{ phv } 9 \ u s e p a c k a g e [ l e f t =25mm, t o p =25mm, bottom =10mm, r i g h t =10mm] { geometry } 10 \ u s e p a c k a g e { f a n c y h d r } 11 \ l h e a d {ABC, I n c. } \ chead { } \ r h e a d {XYZ Dept. } 12 \ l f o o t { } \ c f o o t { } \ r f o o t {} 13 \ p a g e s t y l e { f a n c y } 14 \ u s e p a c k a g e { g r a p h i c x } 15 \ u s e p a c k a g e { c o l o r } 16 \ u s e p a c k a g e [ 17 p d f t e x, a 4 p a p e r = t r u e, c o l o r l i n k s = t r u e, 18 p d f t i t l e ={Key form }, p d f s u b j e c t ={Key }, 19 p d f a u t h o r ={ i c h }, 20 pdfpagemode=usenone, p d f s t a r t v i e w =FitH, 21 p a g e b a c k r e f, p d f h i g h l i g h t ={/N} 22 ] { h y p e r r e f } 19
20 23 \ u s e p a c k a g e [ p d f t e x ] { i n s d l j s } 24 \ b e g i n { insdljs } [ e x a a a a ] { e xaaaa }{ Document Level J a v a S c r i p t } / / i n d i c a t e t h a t t h e f u n c t i o n was n o t y e t run 27 v a r done = 0 ; / / f u n c t i o n t o run when opening t h e document 30 f u n c t i o n m y F i r s t J a v a S c r i p t F u n c t i o n ( ) 31 { 32 i f (! done ) { 33 done = 1 ; 34 app. a l e r t ( " The form was opened. " ) ; 35 } 36 } 37 \ end { insdljs } 38 \ OpenAction { / S / J a v a S c r i p t / JS ( m y F i r s t J a v a S c r i p t F u n c t i o n ( ) ; ) } 39 \ newcommand { \ t e x t f o r l a b e l }[2]{% 40 \ T e x t F i e l d [ name ={#1}, v a l u e ={#2}, width =7em, a l i g n =2,% 41 b o r d e r c o l o r ={1 1 1}, r e a d o n l y = t r u e ]{}% 42 } 43 \ b e g i n { document } 44 \ s e c t i o n *{ Request f o r a key } 45 \ b e g i n {Form} 46 \ b e g i n { t a b u l a r } { r l } 47 \ h l i n e 48 &\\*[ 0.9em ] \ multicolumn { 2 } { c } { \ t e x t b f { Employee } } \ \ 49 &\\*[ 0.9em ] \ t e x t f o r l a b e l { vn }{ F i r s t name:}&% 50 \ T e x t F i e l d [ name=vorname, width =20em,% 51 b o r d e r c o l o r ={ } ] { } \ \ 52 &\\*[ 0.9em ] \ t e x t f o r l a b e l { nn }{Name:}&% 53 \ T e x t F i e l d [ name=name, width =20em,% 54 b o r d e r c o l o r ={ } ] { } \ \ 55 &\\*[ 0.9em ] \ t e x t f o r l a b e l { ab }{ Department:}&% 56 \ ChoiceMenu [ name= abt, width =20em, popdown= t r u e, v a l u e =v,% 57 b o r d e r c o l o r ={ }]{}{% 58 S a l e s =v, P r o d u c t i o n =f, S e r v i c e =s } \ \ 59 &\\*[ 0.9em ] \ h l i n e 60 &\\*[ 0.9em ] \ multicolumn { 2 } { c } { \ t e x t b f {Time } } \ \ 61 &\\*[ 0.9em ] \ t e x t f o r l a b e l { z }{ Time:}&% 62 \ ChoiceMenu [ name= z e i t, width =20em, popdown= t r u e, v a l u e =u,% 63 b o r d e r c o l o r ={ }]{}{% 64 u n l i m i t e d =u, l i m i t e d =b } \ \ 65 &\\*[ 0.9em ] \ t e x t f o r l a b e l {v }{ from:}&% 66 \ T e x t F i e l d [ name=from, width =10em,% 20
21 67 b o r d e r c o l o r ={ } ] { } \ \ 68 &\\*[ 0.9em ] \ t e x t f o r l a b e l {b }{ u n t i l :}&% 69 \ T e x t F i e l d [ name= u n t i l, width =10em,% 70 b o r d e r c o l o r ={ } ] { } \ \ 71 &\\*[ 0.9em ] \ h l i n e 72 &\\*[ 0.9em ] \ multicolumn { 2 } { c } { \ t e x t b f {% 73 Doors } } \ \ 74 &\\*[ 0.9em ] \ t e x t f o r l a b e l { t h }{ F r o n t door:}&% 75 \ CheckBox [ name=ht, width =1.2em,% 76 b o r d e r c o l o r ={ } ] { } \ \ 77 &\\*[ 0.9em ] \ t e x t f o r l a b e l { t 1 }{ Ground f l o o r :}&% 78 \ CheckBox [ name=e1, width =1.2em,% 79 b o r d e r c o l o r ={ } ] { } \ \ 80 &\\*[ 0.9em ] \ t e x t f o r l a b e l { t 2 }{ F i r s t f l o o r :}&% 81 \ CheckBox [ name=e2, width =1.2em,% 82 b o r d e r c o l o r ={ } ] { } \ \ 83 &\\ 84 \ h l i n e 85 \ end { t a b u l a r } 86 \ end {Form} 87 \ end { document } A message box is shown when the document is opened. In the german version the character ö is malformed to o because the inputenc package replaces german umlauts (and other characters) by the corresponding LATEX code sequence. There are two ways to solve the problem: Remove the inputenc package and convert german umlauts to their LATEX code sequence manually (shown in the listing below at the end of this section) or use JavaScript-Unicode notation for umlauts in JavaScript instead of typing the umlauts directly (shown in section 7 on page 54). 1 \ u s e p a c k a g e [ l a t i n 1 ] { i n p u t e n c } from our source. 1 \ d o c u m e n t c l a s s [ ngerman, a 4 p a p e r ] { s c r a r t c l } 2 \ u s e p a c k a g e [ T1 ] { f o n t e n c } 3 \ u s e p a c k a g e { textcomp } 4 \ u s e p a c k a g e { mathptmx } 5 \ u s e p a c k a g e [ s c a l e d =. 9 2 ] { h e l v e t } 6 \ u s e p a c k a g e { c o u r i e r } 7 \ renewcommand * { \ f a m i l y d e f a u l t }{ phv } 8 \ u s e p a c k a g e [ l e f t =25mm, t o p =25mm, bottom =10mm, r i g h t =10mm] { geometry } 9 \ u s e p a c k a g e { f a n c y h d r } 10 \ l h e a d {ABC, I n c. } \ chead { } \ r h e a d {XYZ Dept. } 21
22 11 \ l f o o t { } \ c f o o t { } \ r f o o t {} 12 \ p a g e s t y l e { f a n c y } 13 \ u s e p a c k a g e { g r a p h i c x } 14 \ u s e p a c k a g e { c o l o r } 15 \ u s e p a c k a g e [ 16 p d f t e x, a 4 p a p e r = t r u e, c o l o r l i n k s = t r u e, 17 p d f t i t l e ={Key form }, p d f s u b j e c t ={Key }, 18 p d f a u t h o r ={ i c h }, 19 pdfpagemode=usenone, p d f s t a r t v i e w =FitH, 20 p a g e b a c k r e f, p d f h i g h l i g h t ={/N} 21 ] { h y p e r r e f } 22 \ u s e p a c k a g e [ p d f t e x ] { i n s d l j s } 23 \ b e g i n { insdljs } [ exaaab ] { exaaab }{ Document Level J a v a S c r i p t } / / i n d i c a t e t h a t t h e f u n c t i o n was n o t y e t run 26 v a r done = 0 ; / / f u n c t i o n t o run when opening t h e document 29 f u n c t i o n m y F i r s t J a v a S c r i p t F u n c t i o n ( ) 30 { 31 i f (! done ) { 32 done = 1 ; 33 app. a l e r t ( " The form was opened. " ) ; 34 } 35 } 36 \ end { insdljs } 37 \ OpenAction { / S / J a v a S c r i p t / JS ( m y F i r s t J a v a S c r i p t F u n c t i o n ( ) ; ) } 38 \ newcommand { \ t e x t f o r l a b e l }[2]{% 39 \ T e x t F i e l d [ name ={#1}, v a l u e ={#2}, width =7em, a l i g n =2,% 40 b o r d e r c o l o r ={1 1 1}, r e a d o n l y = t r u e ]{}% 41 } 42 \ b e g i n { document } 43 \ s e c t i o n *{ Request f o r a key } 44 \ b e g i n {Form} 45 \ b e g i n { t a b u l a r } { r l } 46 \ h l i n e 47 &\\*[ 0.9em ] \ multicolumn { 2 } { c } { \ t e x t b f { Employee } } \ \ 48 &\\*[ 0.9em ] \ t e x t f o r l a b e l { vn }{ F i r s t name:}&% 49 \ T e x t F i e l d [ name=vorname, width =20em,% 50 b o r d e r c o l o r ={ } ] { } \ \ 51 &\\*[ 0.9em ] \ t e x t f o r l a b e l { nn }{Name:}&% 52 \ T e x t F i e l d [ name=name, width =20em,% 53 b o r d e r c o l o r ={ } ] { } \ \ 54 &\\*[ 0.9em ] \ t e x t f o r l a b e l { ab }{ Department:}&% 22
23 55 \ ChoiceMenu [ name= abt, width =20em, popdown= t r u e, v a l u e =v,% 56 b o r d e r c o l o r ={ }]{}{% 57 S a l e s =v, P r o d u c t i o n =f, S e r v i c e =s } \ \ 58 &\\*[ 0.9em ] \ h l i n e 59 &\\*[ 0.9em ] \ multicolumn { 2 } { c } { \ t e x t b f {Time } } \ \ 60 &\\*[ 0.9em ] \ t e x t f o r l a b e l { z }{ Time:}&% 61 \ ChoiceMenu [ name= z e i t, width =20em, popdown= t r u e, v a l u e =u,% 62 b o r d e r c o l o r ={ }]{}{% 63 u n l i m i t e d =u, l i m i t e d =b } \ \ 64 &\\*[ 0.9em ] \ t e x t f o r l a b e l {v }{ from:}&% 65 \ T e x t F i e l d [ name=from, width =10em,% 66 b o r d e r c o l o r ={ } ] { } \ \ 67 &\\*[ 0.9em ] \ t e x t f o r l a b e l {b }{ u n t i l :}&% 68 \ T e x t F i e l d [ name= u n t i l, width =10em,% 69 b o r d e r c o l o r ={ } ] { } \ \ 70 &\\*[ 0.9em ] \ h l i n e 71 &\\*[ 0.9em ] \ multicolumn { 2 } { c }{% 72 \ t e x t b f { Doors } } \ \ 73 &\\*[ 0.9em ] \ t e x t f o r l a b e l { t h }{ F r o n t door:}&% 74 \ CheckBox [ name=ht, width =1.2em,% 75 b o r d e r c o l o r ={ } ] { } \ \ 76 &\\*[ 0.9em ] \ t e x t f o r l a b e l { t 1 }{ Ground f l o o r :}&% 77 \ CheckBox [ name=e1, width =1.2em,% 78 b o r d e r c o l o r ={ } ] { } \ \ 79 &\\*[ 0.9em ] \ t e x t f o r l a b e l { t 2 }{ F i r s t f l o o r :}&% 80 \ CheckBox [ name=e2, width =1.2em,% 81 b o r d e r c o l o r ={ } ] { } \ \ 82 &\\ 83 \ h l i n e 84 \ end { t a b u l a r } 85 \ end {Form} 86 \ end { document } 23
24 4.8 Document events: ex0008 and ex0009 To process document events we have to add an /AA entry to the PDF catalogue. The entry value must be a dictionary defining event handlers. Entries in this dictionary are key/value pairs, the value is again a dictionary specifying the action to take. The following keys can occur: Key /WP /DP /WS /DS /DC Event The document will be printed. The document was printed. The document will be saved. The document was saved. The document will be closed. In the example we run willprint(); for the WillPrint event and didprint(); for the DidPrint event. 1 \ immediate \ p d f o b j { 2 << 3 /WP << / S / J a v a S c r i p t / JS ( w i l l P r i n t ( ) ; ) >> 4 / DP << / S / J a v a S c r i p t / JS ( d i d P r i n t ( ) ; ) >> 5 >> 6 } 7 \ p d f c a t a l o g { /AA \ t h e \ p d f l a s t o b j \ s p a c e 0 R} Before and after printing ex0008.pdf a message box is shown. 1 \ d o c u m e n t c l a s s [ ngerman, a 4 p a p e r ] { s c r a r t c l } 2 \ u s e p a c k a g e [ T1 ] { f o n t e n c } 3 \ u s e p a c k a g e { textcomp } 4 \ u s e p a c k a g e { mathptmx } 5 \ u s e p a c k a g e [ s c a l e d =. 9 2 ] { h e l v e t } 6 \ u s e p a c k a g e { c o u r i e r } 7 \ renewcommand * { \ f a m i l y d e f a u l t }{ phv } 8 \ u s e p a c k a g e [ l e f t =25mm, t o p =25mm, bottom =10mm, r i g h t =10mm] { geometry } 9 \ u s e p a c k a g e { f a n c y h d r } 10 \ l h e a d {ABC, I n c. } \ chead { } \ r h e a d {XYZ Dept. } 11 \ l f o o t { } \ c f o o t { } \ r f o o t {} 12 \ p a g e s t y l e { f a n c y } 13 \ u s e p a c k a g e { g r a p h i c x } 14 \ u s e p a c k a g e { c o l o r } 15 \ u s e p a c k a g e [ 16 p d f t e x, a 4 p a p e r = t r u e, c o l o r l i n k s = t r u e, 17 p d f t i t l e ={Key form }, p d f s u b j e c t ={Key }, 18 p d f a u t h o r ={ i c h }, 19 pdfpagemode=usenone, p d f s t a r t v i e w =FitH, 24
25 20 p a g e b a c k r e f, p d f h i g h l i g h t ={/N} 21 ] { h y p e r r e f } 22 \ u s e p a c k a g e [ p d f t e x ] { i n s d l j s } 23 \ immediate \ p d f o b j { 24 << 25 /WP << / S / J a v a S c r i p t / JS ( w i l l P r i n t ( ) ; ) >> 26 / DP << / S / J a v a S c r i p t / JS ( d i d P r i n t ( ) ; ) >> 27 >> 28 } 29 \ p d f c a t a l o g { /AA \ t h e \ p d f l a s t o b j \ s p a c e 0 R} 30 \ b e g i n { insdljs } [ e x a a a c ] { e xaaac }{ Document Level J a v a S c r i p t } / / i n d i c a t e t h a t t h e f u n c t i o n was n o t y e t run 33 v a r done = 0 ; f u n c t i o n w i l l P r i n t ( ) 36 { 37 app. a l e r t ( " The document w i l l be p r i n t e d. " ) ; 38 } f u n c t i o n d i d P r i n t ( ) 41 { 42 app. a l e r t ( " The document was p r i n t e d. " ) ; 43 } / / f u n c t i o n t o run when opening t h e document 46 f u n c t i o n m y F i r s t J a v a S c r i p t F u n c t i o n ( ) 47 { 48 i f (! done ) { 49 done = 1 ; 50 app. a l e r t ( " The form was opened. " ) ; 51 } 52 } 53 \ end { insdljs } 54 \ OpenAction { / S / J a v a S c r i p t / JS ( m y F i r s t J a v a S c r i p t F u n c t i o n ( ) ; ) } 55 \ newcommand { \ t e x t f o r l a b e l }[2]{% 56 \ T e x t F i e l d [ name ={#1}, v a l u e ={#2}, width =7em, a l i g n =2,% 57 b o r d e r c o l o r ={1 1 1}, r e a d o n l y = t r u e ]{}% 58 } 59 \ b e g i n { document } 60 \ s e c t i o n *{ Request f o r a key } 61 \ b e g i n {Form} 62 \ b e g i n { t a b u l a r } { r l } 63 \ h l i n e 25
26 64 &\\*[ 0.9em ] \ multicolumn { 2 } { c } { \ t e x t b f { Employee } } \ \ 65 &\\*[ 0.9em ] \ t e x t f o r l a b e l { vn }{ F i r s t name:}&% 66 \ T e x t F i e l d [ name=vorname, width =20em,% 67 b o r d e r c o l o r ={ } ] { } \ \ 68 &\\*[ 0.9em ] \ t e x t f o r l a b e l { nn }{Name:}&% 69 \ T e x t F i e l d [ name=name, width =20em,% 70 b o r d e r c o l o r ={ } ] { } \ \ 71 &\\*[ 0.9em ] \ t e x t f o r l a b e l { ab }{ Department:}&% 72 \ ChoiceMenu [ name= abt, width =20em, popdown= t r u e, v a l u e =v,% 73 b o r d e r c o l o r ={ }]{}{% 74 S a l e s =v, P r o d u c t i o n =f, S e r v i c e =s } \ \ 75 &\\*[ 0.9em ] \ h l i n e 76 &\\*[ 0.9em ] \ multicolumn { 2 } { c } { \ t e x t b f {Time } } \ \ 77 &\\*[ 0.9em ] \ t e x t f o r l a b e l { z }{ Time:}&% 78 \ ChoiceMenu [ name= z e i t, width =20em, popdown= t r u e, v a l u e =u,% 79 b o r d e r c o l o r ={ }]{}{% 80 u n l i m i t e d =u, l i m i t e d =b } \ \ 81 &\\*[ 0.9em ] \ t e x t f o r l a b e l {v }{ from:}&% 82 \ T e x t F i e l d [ name=from, width =10em,% 83 b o r d e r c o l o r ={ } ] { } \ \ 84 &\\*[ 0.9em ] \ t e x t f o r l a b e l {b }{ u n t i l :}&% 85 \ T e x t F i e l d [ name= u n t i l, width =10em,% 86 b o r d e r c o l o r ={ } ] { } \ \ 87 &\\*[ 0.9em ] \ h l i n e 88 &\\*[ 0.9em ] \ multicolumn { 2 } { c }{% 89 \ t e x t b f { Doors } } \ \ 90 &\\*[ 0.9em ] \ t e x t f o r l a b e l { t h }{ F r o n t door:}&% 91 \ CheckBox [ name=ht, width =1.2em,% 92 b o r d e r c o l o r ={ } ] { } \ \ 93 &\\*[ 0.9em ] \ t e x t f o r l a b e l { t 1 }{ Ground f l o o r :}&% 94 \ CheckBox [ name=e1, width =1.2em,% 95 b o r d e r c o l o r ={ } ] { } \ \ 96 &\\*[ 0.9em ] \ t e x t f o r l a b e l { t 2 }{ F i r s t f l o o r :}&% 97 \ CheckBox [ name=e2, width =1.2em,% 98 b o r d e r c o l o r ={ } ] { } \ \ 99 &\\ 100 \ h l i n e 101 \ end { t a b u l a r } 102 \ end {Form} 103 \ end { document } In ex0009.pdf we change stroke and fill colors and text fonts before and after printing. We have to change the fillcolor, strokecolor and textfont attributes. The changes are enclosed in 26
27 1 t h i s. d e l a y = t r u e 2 / /... 3 t h i s. d e l a y = f a l s e to avoid multiple screen refreshes after each change. In myfirstjavascriptfunction() we set defaults for the choice lists abt and zeit using: 1 t h i s. g e t F i e l d ( " a b t " ). c u r r e n t V a l u e I n d i c e s = 0 ; 2 t h i s. g e t F i e l d ( " z e i t " ). c u r r e n t V a l u e I n d i c e s = 0 ; We set the focus to the vorname field by: 1 t h i s. g e t F i e l d ( " vorname " ). s e t F o c u s ( ) ; 1 \ d o c u m e n t c l a s s [ ngerman, a 4 p a p e r ] { s c r a r t c l } 2 \ u s e p a c k a g e [ T1 ] { f o n t e n c } 3 \ u s e p a c k a g e { textcomp } 4 \ u s e p a c k a g e { mathptmx } 5 \ u s e p a c k a g e [ s c a l e d =. 9 2 ] { h e l v e t } 6 \ u s e p a c k a g e { c o u r i e r } 7 \ renewcommand * { \ f a m i l y d e f a u l t }{ phv } 8 \ u s e p a c k a g e [ l e f t =25mm, t o p =25mm, bottom =10mm, r i g h t =10mm] { geometry } 9 \ u s e p a c k a g e { f a n c y h d r } 10 \ l h e a d {ABC, I n c. } \ chead { } \ r h e a d {XYZ Dept. } 11 \ l f o o t { } \ c f o o t { } \ r f o o t {} 12 \ p a g e s t y l e { f a n c y } 13 \ u s e p a c k a g e { g r a p h i c x } 14 \ u s e p a c k a g e { c o l o r } 15 \ u s e p a c k a g e [ 16 p d f t e x, a 4 p a p e r = t r u e, c o l o r l i n k s = t r u e, 17 p d f t i t l e ={Key form }, p d f s u b j e c t ={Key }, 18 p d f a u t h o r ={ i c h }, 19 pdfpagemode=usenone, p d f s t a r t v i e w =FitH, 20 p a g e b a c k r e f, p d f h i g h l i g h t ={/N} 21 ] { h y p e r r e f } 22 \ u s e p a c k a g e [ p d f t e x ] { i n s d l j s } 23 \ immediate \ p d f o b j { 24 << 25 /WP << / S / J a v a S c r i p t / JS ( w i l l P r i n t ( ) ; ) >> 26 / DP << / S / J a v a S c r i p t / JS ( d i d P r i n t ( ) ; ) >> 27 >> 28 } 29 \ p d f c a t a l o g { /AA \ t h e \ p d f l a s t o b j \ s p a c e 0 R} 30 \ b e g i n { insdljs } [ exaaad ] { exaaad }{ Document Level J a v a S c r i p t } / / i n d i c a t e t h a t t h e f u n c t i o n was n o t y e t run 27
28 33 v a r done = 0 ; f u n c t i o n c o l o r s P r i n t i n g ( ) 36 { 37 t h i s. g e t F i e l d ( " vorname " ). f i l l C o l o r = c o l o r. w h i t e ; 38 t h i s. g e t F i e l d ( " name " ). f i l l C o l o r = c o l o r. w h i t e ; 39 t h i s. g e t F i e l d ( " a b t " ). f i l l C o l o r = c o l o r. w h i t e ; 40 t h i s. g e t F i e l d ( " z e i t " ). f i l l C o l o r = c o l o r. w h i t e ; 41 t h i s. g e t F i e l d ( " from " ). f i l l C o l o r = c o l o r. w h i t e ; 42 t h i s. g e t F i e l d ( " u n t i l " ). f i l l C o l o r = c o l o r. w h i t e ; 43 t h i s. g e t F i e l d ( " h t " ). f i l l C o l o r = c o l o r. w h i t e ; 44 t h i s. g e t F i e l d ( " e1 " ). f i l l C o l o r = c o l o r. w h i t e ; 45 t h i s. g e t F i e l d ( " e2 " ). f i l l C o l o r = c o l o r. w h i t e ; t h i s. g e t F i e l d ( " vorname " ). s t r o k e C o l o r = c o l o r. b l a c k ; 48 t h i s. g e t F i e l d ( " name " ). s t r o k e C o l o r = c o l o r. b l a c k ; 49 t h i s. g e t F i e l d ( " a b t " ). s t r o k e C o l o r = c o l o r. b l a c k ; 50 t h i s. g e t F i e l d ( " z e i t " ). s t r o k e C o l o r = c o l o r. b l a c k ; 51 t h i s. g e t F i e l d ( " from " ). s t r o k e C o l o r = c o l o r. b l a c k ; 52 t h i s. g e t F i e l d ( " u n t i l " ). s t r o k e C o l o r = c o l o r. b l a c k ; 53 t h i s. g e t F i e l d ( " h t " ). s t r o k e C o l o r = c o l o r. b l a c k ; 54 t h i s. g e t F i e l d ( " e1 " ). s t r o k e C o l o r = c o l o r. b l a c k ; 55 t h i s. g e t F i e l d ( " e2 " ). s t r o k e C o l o r = c o l o r. b l a c k ; t h i s. g e t F i e l d ( " vorname " ). t e x t F o n t = f o n t. Helv ; 58 t h i s. g e t F i e l d ( " name " ). t e x t F o n t = f o n t. Helv ; 59 t h i s. g e t F i e l d ( " a b t " ). t e x t F o n t = f o n t. Helv ; 60 t h i s. g e t F i e l d ( " z e i t " ). t e x t F o n t = f o n t. Helv ; 61 t h i s. g e t F i e l d ( " from " ). t e x t F o n t = f o n t. Helv ; 62 t h i s. g e t F i e l d ( " u n t i l " ). t e x t F o n t = f o n t. Helv ; 63 } f u n c t i o n c o l o r s S c r e e n ( ) 66 { v a r newcolor = [ "RGB", , , ] ; 69 t h i s. g e t F i e l d ( " vorname " ). f i l l C o l o r = newcolor ; 70 t h i s. g e t F i e l d ( " name " ). f i l l C o l o r = newcolor ; 71 t h i s. g e t F i e l d ( " a b t " ). f i l l C o l o r = newcolor ; 72 t h i s. g e t F i e l d ( " z e i t " ). f i l l C o l o r = newcolor ; 73 t h i s. g e t F i e l d ( " from " ). f i l l C o l o r = newcolor ; 74 t h i s. g e t F i e l d ( " u n t i l " ). f i l l C o l o r = newcolor ; 75 t h i s. g e t F i e l d ( " h t " ). f i l l C o l o r = newcolor ; 76 t h i s. g e t F i e l d ( " e1 " ). f i l l C o l o r = newcolor ; 28
29 77 t h i s. g e t F i e l d ( " e2 " ). f i l l C o l o r = newcolor ; t h i s. g e t F i e l d ( " vorname " ). s t r o k e C o l o r = newcolor ; 80 t h i s. g e t F i e l d ( " name " ). s t r o k e C o l o r = newcolor ; 81 t h i s. g e t F i e l d ( " a b t " ). s t r o k e C o l o r = newcolor ; 82 t h i s. g e t F i e l d ( " z e i t " ). s t r o k e C o l o r = newcolor ; 83 t h i s. g e t F i e l d ( " from " ). s t r o k e C o l o r = newcolor ; 84 t h i s. g e t F i e l d ( " u n t i l " ). s t r o k e C o l o r = newcolor ; 85 t h i s. g e t F i e l d ( " h t " ). s t r o k e C o l o r = newcolor ; 86 t h i s. g e t F i e l d ( " e1 " ). s t r o k e C o l o r = newcolor ; 87 t h i s. g e t F i e l d ( " e2 " ). s t r o k e C o l o r = newcolor ; t h i s. g e t F i e l d ( " vorname " ). t e x t F o n t = f o n t. HelvB ; 90 t h i s. g e t F i e l d ( " name " ). t e x t F o n t = f o n t. HelvB ; 91 t h i s. g e t F i e l d ( " a b t " ). t e x t F o n t = f o n t. HelvB ; 92 t h i s. g e t F i e l d ( " z e i t " ). t e x t F o n t = f o n t. HelvB ; 93 t h i s. g e t F i e l d ( " from " ). t e x t F o n t = f o n t. HelvB ; 94 t h i s. g e t F i e l d ( " u n t i l " ). t e x t F o n t = f o n t. HelvB ; 95 } f u n c t i o n w i l l P r i n t ( ) 98 { 99 t h i s. d e l a y = t r u e ; 100 c o l o r s P r i n t i n g ( ) ; 101 t h i s. d e l a y = f a l s e ; 102 } f u n c t i o n d i d P r i n t ( ) 105 { 106 t h i s. d e l a y = t r u e ; 107 c o l o r s S c r e e n ( ) ; 108 t h i s. d e l a y = f a l s e ; 109 } / / f u n c t i o n t o run when opening t h e document 112 f u n c t i o n m y F i r s t J a v a S c r i p t F u n c t i o n ( ) 113 { 114 i f (! done ) { 115 done = 1 ; 116 t h i s. d e l a y = t r u e ; 117 c o l o r s S c r e e n ( ) ; 118 t h i s. g e t F i e l d ( " a b t " ). c u r r e n t V a l u e I n d i c e s = 0 ; 119 t h i s. g e t F i e l d ( " z e i t " ). c u r r e n t V a l u e I n d i c e s = 0 ; 120 t h i s. g e t F i e l d ( " vorname " ). s e t F o c u s ( ) ; 29
30 121 t h i s. d e l a y = f a l s e ; 122 } 123 } 124 \ end { insdljs } 125 \ OpenAction { / S / J a v a S c r i p t / JS ( m y F i r s t J a v a S c r i p t F u n c t i o n ( ) ; ) } 126 \ newcommand { \ t e x t f o r l a b e l }[2]{% 127 \ T e x t F i e l d [ name ={#1}, v a l u e ={#2}, width =7em, a l i g n =2,% 128 b o r d e r c o l o r ={1 1 1}, r e a d o n l y = t r u e ]{}% 129 } 130 \ b e g i n { document } 131 \ s e c t i o n *{ Request f o r a key } 132 \ b e g i n {Form} 133 \ b e g i n { t a b u l a r } { r l } 134 \ h l i n e 135 &\\*[ 0.9em ] \ multicolumn { 2 } { c } { \ t e x t b f { Employee } } \ \ 136 &\\*[ 0.9em ] \ t e x t f o r l a b e l { vn }{ F i r s t name:}&% 137 \ T e x t F i e l d [ name=vorname, width =20em,% 138 b o r d e r c o l o r ={ } ] { } \ \ 139 &\\*[ 0.9em ] \ t e x t f o r l a b e l { nn }{Name:}&% 140 \ T e x t F i e l d [ name=name, width =20em,% 141 b o r d e r c o l o r ={ } ] { } \ \ 142 &\\*[ 0.9em ] \ t e x t f o r l a b e l { ab }{ Department:}&% 143 \ ChoiceMenu [ name= abt, width =20em, popdown= t r u e, v a l u e =v,% 144 b o r d e r c o l o r ={ }]{}{% 145 S a l e s =v, P r o d u c t i o n =f, S e r v i c e =s } \ \ 146 &\\*[ 0.9em ] \ h l i n e 147 &\\*[ 0.9em ] \ multicolumn { 2 } { c } { \ t e x t b f {Time } } \ \ 148 &\\*[ 0.9em ] \ t e x t f o r l a b e l { z }{ Time:}&% 149 \ ChoiceMenu [ name= z e i t, width =20em, popdown= t r u e, v a l u e =u,% 150 b o r d e r c o l o r ={ }]{}{% 151 u n l i m i t e d =u, l i m i t e d =b } \ \ 152 &\\*[ 0.9em ] \ t e x t f o r l a b e l {v }{ from:}&% 153 \ T e x t F i e l d [ name=from, width =10em,% 154 b o r d e r c o l o r ={ } ] { } \ \ 155 &\\*[ 0.9em ] \ t e x t f o r l a b e l {b }{ u n t i l :}&% 156 \ T e x t F i e l d [ name= u n t i l, width =10em,% 157 b o r d e r c o l o r ={ } ] { } \ \ 158 &\\*[ 0.9em ] \ h l i n e 159 &\\*[ 0.9em ] \ multicolumn { 2 } { c }{% 160 \ t e x t b f { Doors } } \ \ 161 &\\*[ 0.9em ] \ t e x t f o r l a b e l { t h }{ F r o n t door:}&% 162 \ CheckBox [ name=ht, width =1.2em,% 163 b o r d e r c o l o r ={ } ] { } \ \ 164 &\\*[ 0.9em ] \ t e x t f o r l a b e l { t 1 }{ Ground f l o o r :}&% 30
31 165 \ CheckBox [ name=e1, width =1.2em,% 166 b o r d e r c o l o r ={ } ] { } \ \ 167 &\\*[ 0.9em ] \ t e x t f o r l a b e l { t 2 }{ F i r s t f l o o r :}&% 168 \ CheckBox [ name=e2, width =1.2em,% 169 b o r d e r c o l o r ={ } ] { } \ \ 170 &\\ 171 \ h l i n e 172 \ end { t a b u l a r } 173 \ end {Form} 174 \ end { document } 31
32 4.9 Form element events: ex0010 Events can be triggered by form elements, in the example we assign the function validate- Time() as an event handler for the Validate event of the zeit choice list. 1 v a l i d a t e ={ v a l i d a t e T i m e ( ) ; } If the user leaves the choice field the function is invoked and turns the from and until text fields visible 1 t h i s. g e t F i e l d ( " von " ). d i s p l a y = d i s p l a y. v i s i b l e ; 2 t h i s. g e t F i e l d ( " b i s " ). d i s p l a y = d i s p l a y. v i s i b l e ; or invisible. 1 t h i s. g e t F i e l d ( " von " ). d i s p l a y = d i s p l a y. hidden ; 2 t h i s. g e t F i e l d ( " b i s " ). d i s p l a y = d i s p l a y. hidden ; 1 \ d o c u m e n t c l a s s [ ngerman, a 4 p a p e r ] { s c r a r t c l } 2 \ u s e p a c k a g e [ T1 ] { f o n t e n c } 3 \ u s e p a c k a g e { textcomp } 4 \ u s e p a c k a g e { mathptmx } 5 \ u s e p a c k a g e [ s c a l e d =. 9 2 ] { h e l v e t } 6 \ u s e p a c k a g e { c o u r i e r } 7 \ renewcommand * { \ f a m i l y d e f a u l t }{ phv } 8 \ u s e p a c k a g e [ l e f t =25mm, t o p =25mm, bottom =10mm, r i g h t =10mm] { geometry } 9 \ u s e p a c k a g e { f a n c y h d r } 10 \ l h e a d {ABC, I n c. } \ chead { } \ r h e a d {XYZ Dept. } 11 \ l f o o t { } \ c f o o t { } \ r f o o t {} 12 \ p a g e s t y l e { f a n c y } 13 \ u s e p a c k a g e { g r a p h i c x } 14 \ u s e p a c k a g e { c o l o r } 15 \ u s e p a c k a g e [ 16 p d f t e x, a 4 p a p e r = t r u e, c o l o r l i n k s = t r u e, 17 p d f t i t l e ={Key form }, p d f s u b j e c t ={Key }, 18 p d f a u t h o r ={ i c h }, 19 pdfpagemode=usenone, p d f s t a r t v i e w =FitH, 20 p a g e b a c k r e f, p d f h i g h l i g h t ={/N} 21 ] { h y p e r r e f } 22 \ u s e p a c k a g e [ p d f t e x ] { i n s d l j s } 23 \ immediate \ p d f o b j { 24 << 25 /WP << / S / J a v a S c r i p t / JS ( w i l l P r i n t ( ) ; ) >> 26 / DP << / S / J a v a S c r i p t / JS ( d i d P r i n t ( ) ; ) >> 27 >> 28 } 29 \ p d f c a t a l o g { /AA \ t h e \ p d f l a s t o b j \ s p a c e 0 R} 32
33 30 \ b e g i n { insdljs } [ e x a a a e ] { e xaaae }{ Document Level J a v a S c r i p t } / / i n d i c a t e t h a t t h e f u n c t i o n was n o t y e t run 33 v a r done = 0 ; f u n c t i o n c o l o r s P r i n t i n g ( ) 36 { 37 t h i s. g e t F i e l d ( " vorname " ). f i l l C o l o r = c o l o r. w h i t e ; 38 t h i s. g e t F i e l d ( " name " ). f i l l C o l o r = c o l o r. w h i t e ; 39 t h i s. g e t F i e l d ( " a b t " ). f i l l C o l o r = c o l o r. w h i t e ; 40 t h i s. g e t F i e l d ( " z e i t " ). f i l l C o l o r = c o l o r. w h i t e ; 41 t h i s. g e t F i e l d ( " from " ). f i l l C o l o r = c o l o r. w h i t e ; 42 t h i s. g e t F i e l d ( " u n t i l " ). f i l l C o l o r = c o l o r. w h i t e ; 43 t h i s. g e t F i e l d ( " h t " ). f i l l C o l o r = c o l o r. w h i t e ; 44 t h i s. g e t F i e l d ( " e1 " ). f i l l C o l o r = c o l o r. w h i t e ; 45 t h i s. g e t F i e l d ( " e2 " ). f i l l C o l o r = c o l o r. w h i t e ; t h i s. g e t F i e l d ( " vorname " ). s t r o k e C o l o r = c o l o r. b l a c k ; 48 t h i s. g e t F i e l d ( " name " ). s t r o k e C o l o r = c o l o r. b l a c k ; 49 t h i s. g e t F i e l d ( " a b t " ). s t r o k e C o l o r = c o l o r. b l a c k ; 50 t h i s. g e t F i e l d ( " z e i t " ). s t r o k e C o l o r = c o l o r. b l a c k ; 51 t h i s. g e t F i e l d ( " from " ). s t r o k e C o l o r = c o l o r. b l a c k ; 52 t h i s. g e t F i e l d ( " u n t i l " ). s t r o k e C o l o r = c o l o r. b l a c k ; 53 t h i s. g e t F i e l d ( " h t " ). s t r o k e C o l o r = c o l o r. b l a c k ; 54 t h i s. g e t F i e l d ( " e1 " ). s t r o k e C o l o r = c o l o r. b l a c k ; 55 t h i s. g e t F i e l d ( " e2 " ). s t r o k e C o l o r = c o l o r. b l a c k ; t h i s. g e t F i e l d ( " vorname " ). t e x t F o n t = f o n t. Helv ; 58 t h i s. g e t F i e l d ( " name " ). t e x t F o n t = f o n t. Helv ; 59 t h i s. g e t F i e l d ( " a b t " ). t e x t F o n t = f o n t. Helv ; 60 t h i s. g e t F i e l d ( " z e i t " ). t e x t F o n t = f o n t. Helv ; 61 t h i s. g e t F i e l d ( " from " ). t e x t F o n t = f o n t. Helv ; 62 t h i s. g e t F i e l d ( " u n t i l " ). t e x t F o n t = f o n t. Helv ; 63 t h i s. g e t F i e l d ( " from " ). t e x t C o l o r = c o l o r. b l a c k ; 64 t h i s. g e t F i e l d ( " u n t i l " ). t e x t C o l o r = c o l o r. b l a c k ; 65 } f u n c t i o n c o l o r s S c r e e n ( ) 68 { v a r newcolor = [ "RGB", , , ] ; 71 t h i s. g e t F i e l d ( " vorname " ). f i l l C o l o r = newcolor ; 72 t h i s. g e t F i e l d ( " name " ). f i l l C o l o r = newcolor ; 73 t h i s. g e t F i e l d ( " a b t " ). f i l l C o l o r = newcolor ; 33
34 74 t h i s. g e t F i e l d ( " z e i t " ). f i l l C o l o r = newcolor ; 75 t h i s. g e t F i e l d ( " from " ). f i l l C o l o r = newcolor ; 76 t h i s. g e t F i e l d ( " u n t i l " ). f i l l C o l o r = newcolor ; 77 t h i s. g e t F i e l d ( " h t " ). f i l l C o l o r = newcolor ; 78 t h i s. g e t F i e l d ( " e1 " ). f i l l C o l o r = newcolor ; 79 t h i s. g e t F i e l d ( " e2 " ). f i l l C o l o r = newcolor ; t h i s. g e t F i e l d ( " vorname " ). s t r o k e C o l o r = newcolor ; 82 t h i s. g e t F i e l d ( " name " ). s t r o k e C o l o r = newcolor ; 83 t h i s. g e t F i e l d ( " a b t " ). s t r o k e C o l o r = newcolor ; 84 t h i s. g e t F i e l d ( " z e i t " ). s t r o k e C o l o r = newcolor ; 85 t h i s. g e t F i e l d ( " from " ). s t r o k e C o l o r = newcolor ; 86 t h i s. g e t F i e l d ( " u n t i l " ). s t r o k e C o l o r = newcolor ; 87 t h i s. g e t F i e l d ( " h t " ). s t r o k e C o l o r = newcolor ; 88 t h i s. g e t F i e l d ( " e1 " ). s t r o k e C o l o r = newcolor ; 89 t h i s. g e t F i e l d ( " e2 " ). s t r o k e C o l o r = newcolor ; t h i s. g e t F i e l d ( " vorname " ). t e x t F o n t = f o n t. HelvB ; 92 t h i s. g e t F i e l d ( " name " ). t e x t F o n t = f o n t. HelvB ; 93 t h i s. g e t F i e l d ( " a b t " ). t e x t F o n t = f o n t. HelvB ; 94 t h i s. g e t F i e l d ( " z e i t " ). t e x t F o n t = f o n t. HelvB ; 95 t h i s. g e t F i e l d ( " from " ). t e x t F o n t = f o n t. HelvB ; 96 t h i s. g e t F i e l d ( " from " ). t e x t C o l o r = c o l o r. b l a c k ; 97 t h i s. g e t F i e l d ( " u n t i l " ). t e x t C o l o r = c o l o r. b l a c k ; 98 t h i s. g e t F i e l d ( " u n t i l " ). t e x t F o n t = f o n t. HelvB ; 99 } f u n c t i o n v a l i d a t e T i m e ( ) 102 { 103 t h i s. d e l a y = t r u e ; 104 i f ( ( e v e n t. v a l u e == " u " ) ( e v e n t. v a l u e == " u n l i m i t e d " ) ) { 105 t h i s. g e t F i e l d ( " from " ). d i s p l a y = d i s p l a y. hidden ; 106 t h i s. g e t F i e l d ( " u n t i l " ). d i s p l a y = d i s p l a y. hidden ; 107 } e l s e { 108 t h i s. g e t F i e l d ( " from " ). d i s p l a y = d i s p l a y. v i s i b l e ; 109 t h i s. g e t F i e l d ( " u n t i l " ). d i s p l a y = d i s p l a y. v i s i b l e ; 110 t h i s. g e t F i e l d ( " from " ). s e t F o c u s ( ) ; 111 } 112 t h i s. d e l a y = f a l s e ; 113 } f u n c t i o n w i l l P r i n t ( ) 116 { 117 t h i s. d e l a y = t r u e ; 34
35 118 c o l o r s P r i n t i n g ( ) ; 119 t h i s. d e l a y = f a l s e ; 120 } f u n c t i o n d i d P r i n t ( ) 123 { 124 t h i s. d e l a y = t r u e ; 125 c o l o r s S c r e e n ( ) ; 126 t h i s. d e l a y = f a l s e ; 127 } / / f u n c t i o n t o run when opening t h e document 130 f u n c t i o n m y F i r s t J a v a S c r i p t F u n c t i o n ( ) 131 { 132 i f (! done ) { 133 done = 1 ; 134 t h i s. d e l a y = t r u e ; 135 c o l o r s S c r e e n ( ) ; 136 t h i s. g e t F i e l d ( " a b t " ). c u r r e n t V a l u e I n d i c e s = 0 ; 137 t h i s. g e t F i e l d ( " z e i t " ). c u r r e n t V a l u e I n d i c e s = 0 ; 138 t h i s. g e t F i e l d ( " vorname " ). s e t F o c u s ( ) ; 139 t h i s. d e l a y = f a l s e ; 140 } 141 } 142 \ end { insdljs } 143 \ OpenAction { / S / J a v a S c r i p t / JS ( m y F i r s t J a v a S c r i p t F u n c t i o n ( ) ; ) } 144 \ newcommand { \ t e x t f o r l a b e l }[2]{% 145 \ T e x t F i e l d [ name ={#1}, v a l u e ={#2}, width =7em, a l i g n =2,% 146 b o r d e r c o l o r ={1 1 1}, r e a d o n l y = t r u e ]{}% 147 } 148 \ b e g i n { document } 149 \ s e c t i o n *{ Request f o r a key } 150 \ b e g i n {Form} 151 \ b e g i n { t a b u l a r } { r l } 152 \ h l i n e 153 &\\*[ 0.9em ] \ multicolumn { 2 } { c } { \ t e x t b f { Employee } } \ \ 154 &\\*[ 0.9em ] \ t e x t f o r l a b e l { vn }{ F i r s t name:}&% 155 \ T e x t F i e l d [ name=vorname, width =20em,% 156 b o r d e r c o l o r ={ } ] { } \ \ 157 &\\*[ 0.9em ] \ t e x t f o r l a b e l { nn }{Name:}&% 158 \ T e x t F i e l d [ name=name, width =20em,% 159 b o r d e r c o l o r ={ } ] { } \ \ 160 &\\*[ 0.9em ] \ t e x t f o r l a b e l { ab }{ Department:}&% 161 \ ChoiceMenu [ name= abt, width =20em, popdown= t r u e, v a l u e =v,% 35
36 162 b o r d e r c o l o r ={ }]{}{% 163 S a l e s =v, P r o d u c t i o n =f, S e r v i c e =s } \ \ 164 &\\*[ 0.9em ] \ h l i n e 165 &\\*[ 0.9em ] \ multicolumn { 2 } { c } { \ t e x t b f {Time } } \ \ 166 &\\*[ 0.9em ] \ t e x t f o r l a b e l { z }{ Time:}&% 167 \ ChoiceMenu [ name= z e i t, width =20em, popdown= t r u e, v a l u e =u,% 168 v a l i d a t e ={ v a l i d a t e T i m e ( ) ; }, % 169 b o r d e r c o l o r ={ }]{}{% 170 u n l i m i t e d =u, l i m i t e d =b } \ \ 171 &\\*[ 0.9em ] \ t e x t f o r l a b e l {v }{ from:}&% 172 \ T e x t F i e l d [ name=from, width =10em,% 173 b o r d e r c o l o r ={ } ] { } \ \ 174 &\\*[ 0.9em ] \ t e x t f o r l a b e l {b }{ u n t i l :}&% 175 \ T e x t F i e l d [ name= u n t i l, width =10em,% 176 b o r d e r c o l o r ={ } ] { } \ \ 177 &\\*[ 0.9em ] \ h l i n e 178 &\\*[ 0.9em ] \ multicolumn { 2 } { c }{% 179 \ t e x t b f { Doors } } \ \ 180 &\\*[ 0.9em ] \ t e x t f o r l a b e l { t h }{ F r o n t door:}&% 181 \ CheckBox [ name=ht, width =1.2em,% 182 b o r d e r c o l o r ={ } ] { } \ \ 183 &\\*[ 0.9em ] \ t e x t f o r l a b e l { t 1 }{ Ground f l o o r :}&% 184 \ CheckBox [ name=e1, width =1.2em,% 185 b o r d e r c o l o r ={ } ] { } \ \ 186 &\\*[ 0.9em ] \ t e x t f o r l a b e l { t 2 }{ F i r s t f l o o r :}&% 187 \ CheckBox [ name=e2, width =1.2em,% 188 b o r d e r c o l o r ={ } ] { } \ \ 189 &\\ 190 \ h l i n e 191 \ end { t a b u l a r } 192 \ end {Form} 193 \ end { document } 36
37 4.10 Editable choice list: ex0011 In the choice list abt we want to either choose an entry from the list or add text. The parameter 1 combo= t r u e activates combo box hehaviour. Additionally we add a JavaScript code line 1 t h i s. g e t F i e l d ( " a b t " ). e d i t a b l e = t r u e ; into our initialization function myfirstjavascriptfunction(). 1 \ d o c u m e n t c l a s s [ ngerman, a 4 p a p e r ] { s c r a r t c l } 2 \ u s e p a c k a g e [ T1 ] { f o n t e n c } 3 \ u s e p a c k a g e { textcomp } 4 \ u s e p a c k a g e { mathptmx } 5 \ u s e p a c k a g e [ s c a l e d =. 9 2 ] { h e l v e t } 6 \ u s e p a c k a g e { c o u r i e r } 7 \ renewcommand * { \ f a m i l y d e f a u l t }{ phv } 8 \ u s e p a c k a g e [ l e f t =25mm, t o p =25mm, bottom =10mm, r i g h t =10mm] { geometry } 9 \ u s e p a c k a g e { f a n c y h d r } 10 \ l h e a d {ABC, I n c. } \ chead { } \ r h e a d {XYZ Dept. } 11 \ l f o o t { } \ c f o o t { } \ r f o o t {} 12 \ p a g e s t y l e { f a n c y } 13 \ u s e p a c k a g e { g r a p h i c x } 14 \ u s e p a c k a g e { c o l o r } 15 \ u s e p a c k a g e [ 16 p d f t e x, a 4 p a p e r = t r u e, c o l o r l i n k s = t r u e, 17 p d f t i t l e ={Key form }, p d f s u b j e c t ={Key }, 18 p d f a u t h o r ={ i c h }, 19 pdfpagemode=usenone, p d f s t a r t v i e w =FitH, 20 p a g e b a c k r e f, p d f h i g h l i g h t ={/N} 21 ] { h y p e r r e f } 22 \ u s e p a c k a g e [ p d f t e x ] { i n s d l j s } 23 \ immediate \ p d f o b j { 24 << 25 /WP << / S / J a v a S c r i p t / JS ( w i l l P r i n t ( ) ; ) >> 26 / DP << / S / J a v a S c r i p t / JS ( d i d P r i n t ( ) ; ) >> 27 >> 28 } 29 \ p d f c a t a l o g { /AA \ t h e \ p d f l a s t o b j \ s p a c e 0 R} 30 \ b e g i n { insdljs } [ e xaaae ] { e xaaae }{ Document Level J a v a S c r i p t } / / i n d i c a t e t h a t t h e f u n c t i o n was n o t y e t run 33 v a r done = 0 ; 37
38 34 35 f u n c t i o n c o l o r s P r i n t i n g ( ) 36 { 37 t h i s. g e t F i e l d ( " vorname " ). f i l l C o l o r = c o l o r. w h i t e ; 38 t h i s. g e t F i e l d ( " name " ). f i l l C o l o r = c o l o r. w h i t e ; 39 t h i s. g e t F i e l d ( " a b t " ). f i l l C o l o r = c o l o r. w h i t e ; 40 t h i s. g e t F i e l d ( " z e i t " ). f i l l C o l o r = c o l o r. w h i t e ; 41 t h i s. g e t F i e l d ( " from " ). f i l l C o l o r = c o l o r. w h i t e ; 42 t h i s. g e t F i e l d ( " u n t i l " ). f i l l C o l o r = c o l o r. w h i t e ; 43 t h i s. g e t F i e l d ( " h t " ). f i l l C o l o r = c o l o r. w h i t e ; 44 t h i s. g e t F i e l d ( " e1 " ). f i l l C o l o r = c o l o r. w h i t e ; 45 t h i s. g e t F i e l d ( " e2 " ). f i l l C o l o r = c o l o r. w h i t e ; t h i s. g e t F i e l d ( " vorname " ). s t r o k e C o l o r = c o l o r. b l a c k ; 48 t h i s. g e t F i e l d ( " name " ). s t r o k e C o l o r = c o l o r. b l a c k ; 49 t h i s. g e t F i e l d ( " a b t " ). s t r o k e C o l o r = c o l o r. b l a c k ; 50 t h i s. g e t F i e l d ( " z e i t " ). s t r o k e C o l o r = c o l o r. b l a c k ; 51 t h i s. g e t F i e l d ( " from " ). s t r o k e C o l o r = c o l o r. b l a c k ; 52 t h i s. g e t F i e l d ( " u n t i l " ). s t r o k e C o l o r = c o l o r. b l a c k ; 53 t h i s. g e t F i e l d ( " h t " ). s t r o k e C o l o r = c o l o r. b l a c k ; 54 t h i s. g e t F i e l d ( " e1 " ). s t r o k e C o l o r = c o l o r. b l a c k ; 55 t h i s. g e t F i e l d ( " e2 " ). s t r o k e C o l o r = c o l o r. b l a c k ; t h i s. g e t F i e l d ( " vorname " ). t e x t F o n t = f o n t. Helv ; 58 t h i s. g e t F i e l d ( " name " ). t e x t F o n t = f o n t. Helv ; 59 t h i s. g e t F i e l d ( " a b t " ). t e x t F o n t = f o n t. Helv ; 60 t h i s. g e t F i e l d ( " z e i t " ). t e x t F o n t = f o n t. Helv ; 61 t h i s. g e t F i e l d ( " from " ). t e x t F o n t = f o n t. Helv ; 62 t h i s. g e t F i e l d ( " u n t i l " ). t e x t F o n t = f o n t. Helv ; 63 t h i s. g e t F i e l d ( " from " ). t e x t C o l o r = c o l o r. b l a c k ; 64 t h i s. g e t F i e l d ( " u n t i l " ). t e x t C o l o r = c o l o r. b l a c k ; 65 } f u n c t i o n c o l o r s S c r e e n ( ) 68 { v a r newcolor = [ "RGB", , , ] ; 71 t h i s. g e t F i e l d ( " vorname " ). f i l l C o l o r = newcolor ; 72 t h i s. g e t F i e l d ( " name " ). f i l l C o l o r = newcolor ; 73 t h i s. g e t F i e l d ( " a b t " ). f i l l C o l o r = newcolor ; 74 t h i s. g e t F i e l d ( " z e i t " ). f i l l C o l o r = newcolor ; 75 t h i s. g e t F i e l d ( " from " ). f i l l C o l o r = newcolor ; 76 t h i s. g e t F i e l d ( " u n t i l " ). f i l l C o l o r = newcolor ; 77 t h i s. g e t F i e l d ( " h t " ). f i l l C o l o r = newcolor ; 38
39 78 t h i s. g e t F i e l d ( " e1 " ). f i l l C o l o r = newcolor ; 79 t h i s. g e t F i e l d ( " e2 " ). f i l l C o l o r = newcolor ; t h i s. g e t F i e l d ( " vorname " ). s t r o k e C o l o r = newcolor ; 82 t h i s. g e t F i e l d ( " name " ). s t r o k e C o l o r = newcolor ; 83 t h i s. g e t F i e l d ( " a b t " ). s t r o k e C o l o r = newcolor ; 84 t h i s. g e t F i e l d ( " z e i t " ). s t r o k e C o l o r = newcolor ; 85 t h i s. g e t F i e l d ( " from " ). s t r o k e C o l o r = newcolor ; 86 t h i s. g e t F i e l d ( " u n t i l " ). s t r o k e C o l o r = newcolor ; 87 t h i s. g e t F i e l d ( " h t " ). s t r o k e C o l o r = newcolor ; 88 t h i s. g e t F i e l d ( " e1 " ). s t r o k e C o l o r = newcolor ; 89 t h i s. g e t F i e l d ( " e2 " ). s t r o k e C o l o r = newcolor ; t h i s. g e t F i e l d ( " vorname " ). t e x t F o n t = f o n t. HelvB ; 92 t h i s. g e t F i e l d ( " name " ). t e x t F o n t = f o n t. HelvB ; 93 t h i s. g e t F i e l d ( " a b t " ). t e x t F o n t = f o n t. HelvB ; 94 t h i s. g e t F i e l d ( " z e i t " ). t e x t F o n t = f o n t. HelvB ; 95 t h i s. g e t F i e l d ( " from " ). t e x t F o n t = f o n t. HelvB ; 96 t h i s. g e t F i e l d ( " from " ). t e x t C o l o r = c o l o r. b l a c k ; 97 t h i s. g e t F i e l d ( " u n t i l " ). t e x t C o l o r = c o l o r. b l a c k ; 98 t h i s. g e t F i e l d ( " u n t i l " ). t e x t F o n t = f o n t. HelvB ; 99 } f u n c t i o n v a l i d a t e T i m e ( ) 102 { 103 t h i s. d e l a y = t r u e ; 104 i f ( ( e v e n t. v a l u e == " u " ) ( e v e n t. v a l u e == " u n l i m i t e d " ) ) { 105 t h i s. g e t F i e l d ( " from " ). d i s p l a y = d i s p l a y. hidden ; 106 t h i s. g e t F i e l d ( " u n t i l " ). d i s p l a y = d i s p l a y. hidden ; 107 } e l s e { 108 t h i s. g e t F i e l d ( " from " ). d i s p l a y = d i s p l a y. v i s i b l e ; 109 t h i s. g e t F i e l d ( " u n t i l " ). d i s p l a y = d i s p l a y. v i s i b l e ; 110 t h i s. g e t F i e l d ( " from " ). s e t F o c u s ( ) ; 111 } 112 t h i s. d e l a y = f a l s e ; 113 } f u n c t i o n w i l l P r i n t ( ) 116 { 117 t h i s. d e l a y = t r u e ; 118 c o l o r s P r i n t i n g ( ) ; 119 t h i s. d e l a y = f a l s e ; 120 }
40 122 f u n c t i o n d i d P r i n t ( ) 123 { 124 t h i s. d e l a y = t r u e ; 125 c o l o r s S c r e e n ( ) ; 126 t h i s. d e l a y = f a l s e ; 127 } / / f u n c t i o n t o run when opening t h e document 130 f u n c t i o n m y F i r s t J a v a S c r i p t F u n c t i o n ( ) 131 { 132 i f (! done ) { 133 done = 1 ; 134 t h i s. d e l a y = t r u e ; 135 c o l o r s S c r e e n ( ) ; 136 t h i s. g e t F i e l d ( " a b t " ). c u r r e n t V a l u e I n d i c e s = 0 ; 137 t h i s. g e t F i e l d ( " a b t " ). e d i t a b l e = t r u e ; 138 t h i s. g e t F i e l d ( " z e i t " ). c u r r e n t V a l u e I n d i c e s = 0 ; 139 t h i s. g e t F i e l d ( " vorname " ). s e t F o c u s ( ) ; 140 t h i s. d e l a y = f a l s e ; 141 } 142 } 143 \ end { insdljs } 144 \ OpenAction { / S / J a v a S c r i p t / JS ( m y F i r s t J a v a S c r i p t F u n c t i o n ( ) ; ) } 145 \ newcommand { \ t e x t f o r l a b e l }[2]{% 146 \ T e x t F i e l d [ name ={#1}, v a l u e ={#2}, width =7em, a l i g n =2,% 147 b o r d e r c o l o r ={1 1 1}, r e a d o n l y = t r u e ]{}% 148 } 149 \ b e g i n { document } 150 \ s e c t i o n *{ Request f o r a key } 151 \ b e g i n {Form} 152 \ b e g i n { t a b u l a r } { r l } 153 \ h l i n e 154 &\\*[ 0.9em ] \ multicolumn { 2 } { c } { \ t e x t b f { Employee } } \ \ 155 &\\*[ 0.9em ] \ t e x t f o r l a b e l { vn }{ F i r s t name:}&% 156 \ T e x t F i e l d [ name=vorname, width =20em,% 157 b o r d e r c o l o r ={ } ] { } \ \ 158 &\\*[ 0.9em ] \ t e x t f o r l a b e l { nn }{Name:}&% 159 \ T e x t F i e l d [ name=name, width =20em,% 160 b o r d e r c o l o r ={ } ] { } \ \ 161 &\\*[ 0.9em ] \ t e x t f o r l a b e l { ab }{ Department:}&% 162 \ ChoiceMenu [ name= abt, width =20em, popdown= t r u e, combo= t r u e, v a l u e =v,% 163 b o r d e r c o l o r ={ }]{}{% 164 S a l e s =v, P r o d u c t i o n =f, S e r v i c e =s } \ \ 165 &\\*[ 0.9em ] \ h l i n e 40
41 166 &\\*[ 0.9em ] \ multicolumn { 2 } { c } { \ t e x t b f {Time } } \ \ 167 &\\*[ 0.9em ] \ t e x t f o r l a b e l { z }{ Time:}&% 168 \ ChoiceMenu [ name= z e i t, width =20em, popdown= t r u e, v a l u e =u,% 169 v a l i d a t e ={ v a l i d a t e T i m e ( ) ; }, % 170 b o r d e r c o l o r ={ }]{}{% 171 u n l i m i t e d =u, l i m i t e d =b } \ \ 172 &\\*[ 0.9em ] \ t e x t f o r l a b e l {v }{ from:}&% 173 \ T e x t F i e l d [ name=from, width =10em,% 174 b o r d e r c o l o r ={ } ] { } \ \ 175 &\\*[ 0.9em ] \ t e x t f o r l a b e l {b }{ u n t i l :}&% 176 \ T e x t F i e l d [ name= u n t i l, width =10em,% 177 b o r d e r c o l o r ={ } ] { } \ \ 178 &\\*[ 0.9em ] \ h l i n e 179 &\\*[ 0.9em ] \ multicolumn { 2 } { c }{% 180 \ t e x t b f { Doors } } \ \ 181 &\\*[ 0.9em ] \ t e x t f o r l a b e l { t h }{ F r o n t door:}&% 182 \ CheckBox [ name=ht, width =1.2em,% 183 b o r d e r c o l o r ={ } ] { } \ \ 184 &\\*[ 0.9em ] \ t e x t f o r l a b e l { t 1 }{ Ground f l o o r :}&% 185 \ CheckBox [ name=e1, width =1.2em,% 186 b o r d e r c o l o r ={ } ] { } \ \ 187 &\\*[ 0.9em ] \ t e x t f o r l a b e l { t 2 }{ F i r s t f l o o r :}&% 188 \ CheckBox [ name=e2, width =1.2em,% 189 b o r d e r c o l o r ={ } ] { } \ \ 190 &\\ 191 \ h l i n e 192 \ end { t a b u l a r } 193 \ end {Form} 194 \ end { document } 41
42 4.11 Adding help Overview Online help can be provided on different ways: PDF annotations Annotations are represented using icons. If the user moves the mouse over an annotation icon, the annotation text is shown in a tooltip. If the user double-clicks the annotation, the note is shown on the screen. Advantage: Annotations do not need JavaScript. Disadvantage: Place is needed for the icons. tooltips Tooltip text is shown if the user moves the mouse over a form field. Most users know the concept of tooltips from other applications. Tooltip text can not (yet? 2 ) be set using hyperrefs form field options, so we use Java- Script instructions to set up tooltips PDF annotations To create a help annotation use 1 ~ \ p d f a n n o t width 20 p t { 2 / Subtype / Text 3 / Name / Help 4 / C [ ] 5 / T ( Help t e x t t i t l e ) 6 / C o n t e n t s ( The h e l p t e x t t o show. ) 7 } \ ( \ qquad \ ) No room is reserved by pdflatex for the icon, so we add some space (qquad). To have some room between the form field and the help icon we use a non-breaking space. The /Name /Help entry chooses the annotation icon (question mark). The /C entry sets the icon color, I recommend to use the same color as used in the form fields. Example ex0012 shows how to use PDF annotations to provide help
43 Tooltips Use 1 t h i s. g e t F i e l d ( " f i e l d n a m e " ). username = " Help t e x t h e r e " ; to set up tooltip texts. The instruction should be run in the function executed automatically when the document is opened. Example ex0013 shows how to set up tooltip texts. If you use the inputenc package you have to use special notations in JavaScript code to express foreign characters (i. e. german umlauts), see 7 on page
44 5 Another form 5.1 Goal We want to create a form to require software licenses and installation. Information about the PC and the owner are entered in text fields. The software is choosen from choice lists. We have several lists providing the same choices. The choice lists are combo boxes so users can manually type in names of special software applications if necessary. 5.2 Initializing a choice list using JavaScript: ex0101 The choice lists can be initialized using JavaScript instead of writing the choices in the \Choice- Menu[]{}{} macro. This provides a better overview. Choices are specified in an array. Each array element is an array again, consisting of two entries: the full text shown on screen and an abbreviation: 1 v a r softwareauswahl = [ 2 [ " ", " " ], 3 [ " B e t r i e b s s y s t e m ", " os " ], 4 [ " T e x t v e r a r b e i t u n g ", " t p " ], 5 [ " T a b e l l e n k a l k u l a t i o n ", " sc " ], 6 [ " P r ä s e n t a t i o n s p r o g r a m m ", " pp " ], 7 [ "E Mail C l i e n t ", "mc" ], 8 [ "Web browser ", "wb" ], 9 [ " Mathematik S o f t w a r e ", "ms" ], 10 [ "PDF Anzeigeprogramm ", " pv " ] 11 ] ; The setitems() method sets the choices for a choice list: 1 t h i s. g e t F i e l d ( " sw01 " ). s e t I t e m s ( softwareauswahl ) ; 1 \ d o c u m e n t c l a s s [ ngerman, a 4 p a p e r ] { s c r a r t c l } 2 \ u s e p a c k a g e [ T1 ] { f o n t e n c } 3 \ u s e p a c k a g e { textcomp } 4 \ u s e p a c k a g e { mathptmx } 5 \ u s e p a c k a g e [ s c a l e d =. 9 2 ] { h e l v e t } 6 \ u s e p a c k a g e { c o u r i e r } 7 \ renewcommand * { \ f a m i l y d e f a u l t }{ phv } 8 \ u s e p a c k a g e [ l e f t =25mm, t o p =25mm, bottom =10mm, r i g h t =10mm] { geometry } 9 \ u s e p a c k a g e { f a n c y h d r } 10 \ l h e a d {ABC, I n c. } \ chead { } \ r h e a d {XYZ Dept. } 11 \ l f o o t { } \ c f o o t { } \ r f o o t {} 12 \ p a g e s t y l e { f a n c y } 13 \ u s e p a c k a g e { g r a p h i c x } 44
45 14 \ u s e p a c k a g e { c o l o r } 15 \ u s e p a c k a g e [ 16 p d f t e x, a 4 p a p e r = t r u e, c o l o r l i n k s = t r u e, 17 p d f t i t l e ={ S o f t w a r e i n s t a l l a t i o n r e q u e s t }, p d f s u b j e c t ={ S o f t w a r e }, 18 p d f a u t h o r ={ i c h }, 19 pdfpagemode=usenone, p d f s t a r t v i e w =FitH, 20 p a g e b a c k r e f, p d f h i g h l i g h t ={/N} 21 ] { h y p e r r e f } 22 \ u s e p a c k a g e [ p d f t e x ] { i n s d l j s } 23 \ immediate \ p d f o b j { 24 << 25 /WP << / S / J a v a S c r i p t / JS ( w i l l P r i n t ( ) ; ) >> 26 / DP << / S / J a v a S c r i p t / JS ( d i d P r i n t ( ) ; ) >> 27 >> 28 } 29 \ p d f c a t a l o g { /AA \ t h e \ p d f l a s t o b j \ s p a c e 0 R} 30 \ b e g i n { insdljs } [ exaaba ] { exaaba }{ Document Level J a v a S c r i p t } / / i n d i c a t e t h a t t h e f u n c t i o n was n o t y e t run 33 v a r done = 0 ; f u n c t i o n c o l o r s P r i n t i n g ( ) 36 { 37 t h i s. g e t F i e l d ( " vorname " ). f i l l C o l o r = c o l o r. w h i t e ; 38 t h i s. g e t F i e l d ( " vorname " ). s t r o k e C o l o r = c o l o r. b l a c k ; 39 t h i s. g e t F i e l d ( " vorname " ). t e x t F o n t = f o n t. Helv ; 40 t h i s. g e t F i e l d ( " name " ). f i l l C o l o r = c o l o r. w h i t e ; 41 t h i s. g e t F i e l d ( " name " ). s t r o k e C o l o r = c o l o r. b l a c k ; 42 t h i s. g e t F i e l d ( " name " ). t e x t F o n t = f o n t. Helv ; 43 t h i s. g e t F i e l d ( " i n v e n t o r y " ). f i l l C o l o r = c o l o r. w h i t e ; 44 t h i s. g e t F i e l d ( " i n v e n t o r y " ). s t r o k e C o l o r = c o l o r. b l a c k ; 45 t h i s. g e t F i e l d ( " i n v e n t o r y " ). t e x t F o n t = f o n t. Helv ; 46 t h i s. g e t F i e l d ( " sw01 " ). f i l l C o l o r = c o l o r. w h i t e ; 47 t h i s. g e t F i e l d ( " sw01 " ). s t r o k e C o l o r = c o l o r. b l a c k ; 48 t h i s. g e t F i e l d ( " sw01 " ). t e x t F o n t = f o n t. Helv ; 49 t h i s. g e t F i e l d ( " sw02 " ). f i l l C o l o r = c o l o r. w h i t e ; 50 t h i s. g e t F i e l d ( " sw02 " ). s t r o k e C o l o r = c o l o r. b l a c k ; 51 t h i s. g e t F i e l d ( " sw02 " ). t e x t F o n t = f o n t. Helv ; 52 t h i s. g e t F i e l d ( " sw03 " ). f i l l C o l o r = c o l o r. w h i t e ; 53 t h i s. g e t F i e l d ( " sw03 " ). s t r o k e C o l o r = c o l o r. b l a c k ; 54 t h i s. g e t F i e l d ( " sw03 " ). t e x t F o n t = f o n t. Helv ; 55 t h i s. g e t F i e l d ( " sw04 " ). f i l l C o l o r = c o l o r. w h i t e ; 56 t h i s. g e t F i e l d ( " sw04 " ). s t r o k e C o l o r = c o l o r. b l a c k ; 57 t h i s. g e t F i e l d ( " sw04 " ). t e x t F o n t = f o n t. Helv ; 45
46 58 t h i s. g e t F i e l d ( " sw05 " ). f i l l C o l o r = c o l o r. w h i t e ; 59 t h i s. g e t F i e l d ( " sw05 " ). s t r o k e C o l o r = c o l o r. b l a c k ; 60 t h i s. g e t F i e l d ( " sw05 " ). t e x t F o n t = f o n t. Helv ; 61 t h i s. g e t F i e l d ( " sw06 " ). f i l l C o l o r = c o l o r. w h i t e ; 62 t h i s. g e t F i e l d ( " sw06 " ). s t r o k e C o l o r = c o l o r. b l a c k ; 63 t h i s. g e t F i e l d ( " sw06 " ). t e x t F o n t = f o n t. Helv ; 64 t h i s. g e t F i e l d ( " sw07 " ). f i l l C o l o r = c o l o r. w h i t e ; 65 t h i s. g e t F i e l d ( " sw07 " ). s t r o k e C o l o r = c o l o r. b l a c k ; 66 t h i s. g e t F i e l d ( " sw07 " ). t e x t F o n t = f o n t. Helv ; 67 t h i s. g e t F i e l d ( " sw08 " ). f i l l C o l o r = c o l o r. w h i t e ; 68 t h i s. g e t F i e l d ( " sw08 " ). s t r o k e C o l o r = c o l o r. b l a c k ; 69 t h i s. g e t F i e l d ( " sw08 " ). t e x t F o n t = f o n t. Helv ; 70 t h i s. g e t F i e l d ( " sw09 " ). f i l l C o l o r = c o l o r. w h i t e ; 71 t h i s. g e t F i e l d ( " sw09 " ). s t r o k e C o l o r = c o l o r. b l a c k ; 72 t h i s. g e t F i e l d ( " sw09 " ). t e x t F o n t = f o n t. Helv ; 73 t h i s. g e t F i e l d ( " sw10 " ). f i l l C o l o r = c o l o r. w h i t e ; 74 t h i s. g e t F i e l d ( " sw10 " ). s t r o k e C o l o r = c o l o r. b l a c k ; 75 t h i s. g e t F i e l d ( " sw10 " ). t e x t F o n t = f o n t. Helv ; 76 } f u n c t i o n c o l o r s S c r e e n ( ) 79 { v a r newcolor = [ "RGB", , , ] ; 82 t h i s. g e t F i e l d ( " vorname " ). f i l l C o l o r = newcolor ; 83 t h i s. g e t F i e l d ( " vorname " ). s t r o k e C o l o r = newcolor ; 84 t h i s. g e t F i e l d ( " vorname " ). t e x t F o n t = f o n t. HelvB ; 85 t h i s. g e t F i e l d ( " name " ). f i l l C o l o r = newcolor ; 86 t h i s. g e t F i e l d ( " name " ). s t r o k e C o l o r = newcolor ; 87 t h i s. g e t F i e l d ( " name " ). t e x t F o n t = f o n t. HelvB ; 88 t h i s. g e t F i e l d ( " i n v e n t o r y " ). f i l l C o l o r = newcolor ; 89 t h i s. g e t F i e l d ( " i n v e n t o r y " ). s t r o k e C o l o r = newcolor ; 90 t h i s. g e t F i e l d ( " i n v e n t o r y " ). t e x t F o n t = f o n t. HelvB ; 91 t h i s. g e t F i e l d ( " sw01 " ). f i l l C o l o r = newcolor ; 92 t h i s. g e t F i e l d ( " sw01 " ). s t r o k e C o l o r = newcolor ; 93 t h i s. g e t F i e l d ( " sw01 " ). t e x t F o n t = f o n t. HelvB ; 94 t h i s. g e t F i e l d ( " sw02 " ). f i l l C o l o r = newcolor ; 95 t h i s. g e t F i e l d ( " sw02 " ). s t r o k e C o l o r = newcolor ; 96 t h i s. g e t F i e l d ( " sw02 " ). t e x t F o n t = f o n t. HelvB ; 97 t h i s. g e t F i e l d ( " sw03 " ). f i l l C o l o r = newcolor ; 98 t h i s. g e t F i e l d ( " sw03 " ). s t r o k e C o l o r = newcolor ; 99 t h i s. g e t F i e l d ( " sw03 " ). t e x t F o n t = f o n t. HelvB ; 100 t h i s. g e t F i e l d ( " sw04 " ). f i l l C o l o r = newcolor ; 101 t h i s. g e t F i e l d ( " sw04 " ). s t r o k e C o l o r = newcolor ; 46
47 102 t h i s. g e t F i e l d ( " sw04 " ). t e x t F o n t = f o n t. HelvB ; 103 t h i s. g e t F i e l d ( " sw05 " ). f i l l C o l o r = newcolor ; 104 t h i s. g e t F i e l d ( " sw05 " ). s t r o k e C o l o r = newcolor ; 105 t h i s. g e t F i e l d ( " sw05 " ). t e x t F o n t = f o n t. HelvB ; 106 t h i s. g e t F i e l d ( " sw06 " ). f i l l C o l o r = newcolor ; 107 t h i s. g e t F i e l d ( " sw06 " ). s t r o k e C o l o r = newcolor ; 108 t h i s. g e t F i e l d ( " sw06 " ). t e x t F o n t = f o n t. HelvB ; 109 t h i s. g e t F i e l d ( " sw07 " ). f i l l C o l o r = newcolor ; 110 t h i s. g e t F i e l d ( " sw07 " ). s t r o k e C o l o r = newcolor ; 111 t h i s. g e t F i e l d ( " sw07 " ). t e x t F o n t = f o n t. HelvB ; 112 t h i s. g e t F i e l d ( " sw08 " ). f i l l C o l o r = newcolor ; 113 t h i s. g e t F i e l d ( " sw08 " ). s t r o k e C o l o r = newcolor ; 114 t h i s. g e t F i e l d ( " sw08 " ). t e x t F o n t = f o n t. HelvB ; 115 t h i s. g e t F i e l d ( " sw09 " ). f i l l C o l o r = newcolor ; 116 t h i s. g e t F i e l d ( " sw09 " ). s t r o k e C o l o r = newcolor ; 117 t h i s. g e t F i e l d ( " sw09 " ). t e x t F o n t = f o n t. HelvB ; 118 t h i s. g e t F i e l d ( " sw10 " ). f i l l C o l o r = newcolor ; 119 t h i s. g e t F i e l d ( " sw10 " ). s t r o k e C o l o r = newcolor ; 120 t h i s. g e t F i e l d ( " sw10 " ). t e x t F o n t = f o n t. HelvB ; 121 } f u n c t i o n w i l l P r i n t ( ) 124 { 125 t h i s. d e l a y = t r u e ; 126 c o l o r s P r i n t i n g ( ) ; 127 t h i s. d e l a y = f a l s e ; 128 } f u n c t i o n d i d P r i n t ( ) 131 { 132 t h i s. d e l a y = t r u e ; 133 c o l o r s S c r e e n ( ) ; 134 t h i s. d e l a y = f a l s e ; 135 } v a r s oftwareauswahl = [ 138 [ " ", " " ], 139 [ " O p e r a t i n g system ", " os " ], 140 [ " Text p r o c e s s i n g ", " t p " ], 141 [ " S p r e a d s h e e t c a l c u l a t i o n ", " sc " ], 142 [ " P r ä s e n t a t i o n s p r o g r a m m ", " pp " ], 143 [ "E mail c l i e n t ", "mc" ], 144 [ "Web browser ", "wb" ], 145 [ " Mathematics s o f t w a r e ", "ms" ], 47
48 146 [ "PDF v i e w e r ", " pv " ] 147 ] ; / / f u n c t i o n t o run when opening t h e document 150 f u n c t i o n m y F i r s t J a v a S c r i p t F u n c t i o n ( ) 151 { 152 i f (! done ) { 153 done = 1 ; 154 t h i s. d e l a y = t r u e ; 155 c o l o r s S c r e e n ( ) ; 156 t h i s. g e t F i e l d ( " sw01 " ). s e t I t e m s ( softwareauswahl ) ; 157 t h i s. g e t F i e l d ( " sw01 " ). c u r r e n t V a l u e I n d i c e s = 0 ; 158 t h i s. g e t F i e l d ( " sw01 " ). e d i t a b l e = t r u e ; 159 t h i s. g e t F i e l d ( " sw02 " ). s e t I t e m s ( softwareauswahl ) ; 160 t h i s. g e t F i e l d ( " sw02 " ). c u r r e n t V a l u e I n d i c e s = 0 ; 161 t h i s. g e t F i e l d ( " sw02 " ). e d i t a b l e = t r u e ; 162 t h i s. g e t F i e l d ( " sw03 " ). s e t I t e m s ( softwareauswahl ) ; 163 t h i s. g e t F i e l d ( " sw03 " ). c u r r e n t V a l u e I n d i c e s = 0 ; 164 t h i s. g e t F i e l d ( " sw03 " ). e d i t a b l e = t r u e ; 165 t h i s. g e t F i e l d ( " sw04 " ). s e t I t e m s ( softwareauswahl ) ; 166 t h i s. g e t F i e l d ( " sw04 " ). c u r r e n t V a l u e I n d i c e s = 0 ; 167 t h i s. g e t F i e l d ( " sw04 " ). e d i t a b l e = t r u e ; 168 t h i s. g e t F i e l d ( " sw05 " ). s e t I t e m s ( softwareauswahl ) ; 169 t h i s. g e t F i e l d ( " sw05 " ). c u r r e n t V a l u e I n d i c e s = 0 ; 170 t h i s. g e t F i e l d ( " sw05 " ). e d i t a b l e = t r u e ; 171 t h i s. g e t F i e l d ( " sw06 " ). s e t I t e m s ( softwareauswahl ) ; 172 t h i s. g e t F i e l d ( " sw06 " ). c u r r e n t V a l u e I n d i c e s = 0 ; 173 t h i s. g e t F i e l d ( " sw06 " ). e d i t a b l e = t r u e ; 174 t h i s. g e t F i e l d ( " sw07 " ). s e t I t e m s ( softwareauswahl ) ; 175 t h i s. g e t F i e l d ( " sw07 " ). c u r r e n t V a l u e I n d i c e s = 0 ; 176 t h i s. g e t F i e l d ( " sw07 " ). e d i t a b l e = t r u e ; 177 t h i s. g e t F i e l d ( " sw08 " ). s e t I t e m s ( softwareauswahl ) ; 178 t h i s. g e t F i e l d ( " sw08 " ). c u r r e n t V a l u e I n d i c e s = 0 ; 179 t h i s. g e t F i e l d ( " sw08 " ). e d i t a b l e = t r u e ; 180 t h i s. g e t F i e l d ( " sw09 " ). s e t I t e m s ( softwareauswahl ) ; 181 t h i s. g e t F i e l d ( " sw09 " ). c u r r e n t V a l u e I n d i c e s = 0 ; 182 t h i s. g e t F i e l d ( " sw09 " ). e d i t a b l e = t r u e ; 183 t h i s. g e t F i e l d ( " sw10 " ). s e t I t e m s ( softwareauswahl ) ; 184 t h i s. g e t F i e l d ( " sw10 " ). c u r r e n t V a l u e I n d i c e s = 0 ; 185 t h i s. g e t F i e l d ( " sw10 " ). e d i t a b l e = t r u e ; 186 t h i s. g e t F i e l d ( " vorname " ). s e t F o c u s ( ) ; 187 t h i s. d e l a y = f a l s e ; 188 } 189 } 48
49 190 \ end { insdljs } 191 \ OpenAction { / S / J a v a S c r i p t / JS ( m y F i r s t J a v a S c r i p t F u n c t i o n ( ) ; ) } 192 \ newcommand { \ t e x t f o r l a b e l }[2]{% 193 \ T e x t F i e l d [ name ={#1}, v a l u e ={#2}, width =9em, a l i g n =2,% 194 b o r d e r c o l o r ={1 1 1}, r e a d o n l y = t r u e ]{}% 195 } 196 \ b e g i n { document } 197 \ s e c t i o n *{ Request f o r s o f t w a r e l i c e n s e s and i n s t a l l a t i o n } 198 \ b e g i n {Form} 199 \ b e g i n { t a b u l a r } { r r } 200 \ h l i n e 201 \ multicolumn { 2 } { c } { } \ \ * [ 0. 9 em ] 202 \ multicolumn { 2 } { c } { \ t e x t b f { Systems owner } } \ \ 203 &\\*[ 0.9em ] \ t e x t f o r l a b e l { l 0 1 }{ F i r s t name :}&\ T e x t F i e l d [% 204 name=vorname, width =20em, b o r d e r c o l o r ={ } ] { } \ \ 205 &\\*[ 0.9em ] \ t e x t f o r l a b e l { l 0 2 }{Name:}&\ T e x t F i e l d [% 206 name=name, width =20em, b o r d e r c o l o r ={ } ] { } \ \ 207 &\\*[ 0.9em ] \ h l i n e 208 \ multicolumn { 2 } { c } { } \ \ * [ 0. 9 em ] 209 \ multicolumn { 2 } { c } { \ t e x t b f {PC } } \ \ 210 &\\*[ 0.9em ] \ t e x t f o r l a b e l { l 0 3 }{ i n v e n t o r y number :}% 211 &\ T e x t F i e l d [ name= i n v e n t o r y, width =20em,% 212 b o r d e r c o l o r ={ } ] { } \ \ 213 &\\*[ 0.9em ] \ h l i n e 214 \ multicolumn { 2 } { c } { } \ \ * [ 0. 9 em ] 215 \ multicolumn { 2 } { c } { \ t e x t b f { S o f t w a r e } } \ \ 216 \ multicolumn { 2 } { c } { } \ \ * [ 0. 9 em ] 217 \ multicolumn { 2 } { r } { \ ChoiceMenu [ name=sw01, width =30em,% 218 popdown= t r u e, combo= t r u e, v a l u e ={},% 219 b o r d e r c o l o r ={ } ] { } { } } \ \ 220 \ multicolumn { 2 } { c } { } \ \ * [ 0. 9 em ] 221 \ multicolumn { 2 } { r } { \ ChoiceMenu [ name=sw02, width =30em,% 222 popdown= t r u e, combo= t r u e, v a l u e ={},% 223 b o r d e r c o l o r ={ } ] { } { } } \ \ 224 \ multicolumn { 2 } { c } { } \ \ * [ 0. 9 em ] 225 \ multicolumn { 2 } { r } { \ ChoiceMenu [ name=sw03, width =30em,% 226 popdown= t r u e, combo= t r u e, v a l u e ={},% 227 b o r d e r c o l o r ={ } ] { } { } } \ \ 228 \ multicolumn { 2 } { c } { } \ \ * [ 0. 9 em ] 229 \ multicolumn { 2 } { r } { \ ChoiceMenu [ name=sw04, width =30em,% 230 popdown= t r u e, combo= t r u e, v a l u e ={},% 231 b o r d e r c o l o r ={ } ] { } { } } \ \ 232 \ multicolumn { 2 } { c } { } \ \ * [ 0. 9 em ] 233 \ multicolumn { 2 } { r } { \ ChoiceMenu [ name=sw05, width =30em,% 49
50 234 popdown= t r u e, combo= t r u e, v a l u e ={},% 235 b o r d e r c o l o r ={ } ] { } { } } \ \ 236 \ multicolumn { 2 } { c } { } \ \ * [ 0. 9 em ] 237 \ multicolumn { 2 } { r } { \ ChoiceMenu [ name=sw06, width =30em,% 238 popdown= t r u e, combo= t r u e, v a l u e ={},% 239 b o r d e r c o l o r ={ } ] { } { } } \ \ 240 \ multicolumn { 2 } { c } { } \ \ * [ 0. 9 em ] 241 \ multicolumn { 2 } { r } { \ ChoiceMenu [ name=sw07, width =30em,% 242 popdown= t r u e, combo= t r u e, v a l u e ={},% 243 b o r d e r c o l o r ={ } ] { } { } } \ \ 244 \ multicolumn { 2 } { c } { } \ \ * [ 0. 9 em ] 245 \ multicolumn { 2 } { r } { \ ChoiceMenu [ name=sw08, width =30em,% 246 popdown= t r u e, combo= t r u e, v a l u e ={},% 247 b o r d e r c o l o r ={ } ] { } { } } \ \ 248 \ multicolumn { 2 } { c } { } \ \ * [ 0. 9 em ] 249 \ multicolumn { 2 } { r } { \ ChoiceMenu [ name=sw09, width =30em,% 250 popdown= t r u e, combo= t r u e, v a l u e ={},% 251 b o r d e r c o l o r ={ } ] { } { } } \ \ 252 \ multicolumn { 2 } { c } { } \ \ * [ 0. 9 em ] 253 \ multicolumn { 2 } { r } { \ ChoiceMenu [ name=sw10, width =30em,% 254 popdown= t r u e, combo= t r u e, v a l u e ={},% 255 b o r d e r c o l o r ={ } ] { } { } } \ \ 256 \ multicolumn { 2 } { c } { ~ } \ \ * \ h l i n e 257 \ end { t a b u l a r } 258 \ end {Form} 259 \ end { document } 50
51 6 Form number three: Interactive application 6.1 Goal The third form is an interactive application, a click on a button starts an investment calculation. The user can provide an investment amount in C, an investment time in years and the annual rate in percent. A click on the start button calculates the investment result. 6.2 Processing button click events: ex0201 This form is not intended to be printed, so we can use a non-white background. The paper size is set to inches 3.75inches The arcument 1 o n c l i c k ={ d o C a l c u l a t i o n ( ) } to the Start button specifies the function to invoke when the button is pressed. Note: The function is specified without semicolon here. The docalculation() function retrieves the input values and runs the calculation. The result is rounded to cents and printed in a text field. 1 \ d o c u m e n t c l a s s { s c r a r t c l } 2 \ s e t c o u n t e r { secnumdepth }{0} 3 \ u s e p a c k a g e [ T1 ] { f o n t e n c } 4 \ u s e p a c k a g e { textcomp } 5 \ u s e p a c k a g e { mathptmx } 6 \ u s e p a c k a g e [ s c a l e d =. 9 2 ] { h e l v e t } 7 \ u s e p a c k a g e { c o u r i e r } 8 \ s e t l e n g t h { \ p a p e r w i d t h }{ i n } 9 \ s e t l e n g t h { \ p a p e r h e i g h t } { i n } 10 \ renewcommand * { \ f a m i l y d e f a u l t }{ phv } 11 \ u s e p a c k a g e [ p d f t e x, margin =0.5 i n ] { geometry } 12 \ u s e p a c k a g e { f a n c y h d r } 13 \ l h e a d { Big Money, I n c. } \ chead {} 14 \ r h e a d { P r o m i s e s Dept. } 15 \ l f o o t { } \ c f o o t { } \ r f o o t {} 16 \ p a g e s t y l e { f a n c y } 17 \ u s e p a c k a g e { g r a p h i c x } 18 \ u s e p a c k a g e { c o l o r } 19 \ u s e p a c k a g e [ p d f t e x, p d f p a g e l a y o u t = SinglePage,% 20 p d f t i t l e ={ I n v e s t m e n t c a l c u l a t i o n }, p d f s u b j e c t ={ I n v e s t m e n t}% 21 ] { h y p e r r e f } 22 \ d e f i n e c o l o r { background }{ rgb } { , , } 23 \ p a g e c o l o r { background } 24 \ s e t l e n g t h { \ p a r i n d e n t } { 0. 0cm} 25 \ u s e p a c k a g e [ p d f t e x ] { i n s d l j s } 51
52 26 \ b e g i n { insdljs } [ e x a a c a ] { e xaaca }{ J a v a S c r i p t } 27 v a r done = 0 ; f u n c t i o n docopen ( ) 30 { 31 i f (! done ) { 32 done = 1 ; 33 v a r newcolor = [ "RGB", , , ] ; 34 v a r b o r c o l o r = [ "RGB", , , ] 35 t h i s. g e t F i e l d ( " l 0 1 " ). f i l l C o l o r = newcolor ; 36 t h i s. g e t F i e l d ( " l 0 1 " ). s t r o k e C o l o r = newcolor ; 37 t h i s. g e t F i e l d ( " l 0 2 " ). f i l l C o l o r = newcolor ; 38 t h i s. g e t F i e l d ( " l 0 2 " ). s t r o k e C o l o r = newcolor ; 39 t h i s. g e t F i e l d ( " l 0 3 " ). f i l l C o l o r = newcolor ; 40 t h i s. g e t F i e l d ( " l 0 3 " ). s t r o k e C o l o r = newcolor ; 41 t h i s. g e t F i e l d ( " l 0 4 " ). f i l l C o l o r = newcolor ; 42 t h i s. g e t F i e l d ( " l 0 4 " ). s t r o k e C o l o r = newcolor ; 43 t h i s. g e t F i e l d ( " z e i t " ). c u r r e n t V a l u e I n d i c e s = 0 ; 44 t h i s. g e t F i e l d ( " z e i t " ). f i l l C o l o r = newcolor ; 45 t h i s. g e t F i e l d ( " summe " ). f i l l C o l o r = newcolor ; 46 t h i s. g e t F i e l d ( " z i n s " ). f i l l C o l o r = newcolor ; 47 t h i s. g e t F i e l d ( " e r g e b n i s " ). f i l l C o l o r = newcolor ; 48 } 49 } f u n c t i o n d o C a l c u l a t i o n ( ) 52 { 53 v a r summe = t h i s. g e t F i e l d ( " summe " ). v a l u e ; 54 v a r z i n s = t h i s. g e t F i e l d ( " z i n s " ). v a l u e ; 55 v a r z e i t = 0 + t h i s. g e t F i e l d ( " z e i t " ). v a l u e ; 56 v a r i, f a k t o r, w ert ; 57 f a k t o r = * z i n s ; 58 f o r ( i = 0 ; i < z e i t ; i ++) { 59 summe = summe * f a k t o r ; 60 } 61 wert = Math. round ( * summe ) ; 62 wert = * w ert ; 63 wert = w ert. t o F i x e d ( 2 ) ; 64 wert = w ert. t o S t r i n g ( ) ; 65 t h i s. g e t F i e l d ( " e r g e b n i s " ). v a l u e = wert ; 66 } 67 \ end { insdljs } 68 \ OpenAction { / S / J a v a S c r i p t / JS ( docopen ( ) ; ) } 69 \ newcommand { \ t e x t f o r l a b e l }[2]{% 52
53 70 \ T e x t F i e l d [ name ={#1}, v a l u e ={#2}, width =9em, a l i g n =2,% 71 b o r d e r c o l o r ={ },% 72 f i l l c o l o r ={ }, r e a d o n l y = t r u e ]{}% 73 } 74 \ b e g i n { document } 75 \ b e g i n {Form} 76 \ b e g i n { t a b u l a r } { r l } 77 \ h l i n e 78 \ multicolumn { 2 } { c } { } \ \ * [ 0. 8 em ] \ multicolumn { 2 } { c }{% 79 \ t e x t s c { I \, n \, p \, u \, t ~D\, a \, t \, a}% 80 } \ \ 81 &\\*[ 0.8em ] \ t e x t f o r l a b e l { l 0 1 }{ I n v e s t m e n t c a p i t a l :}&\ T e x t F i e l d [% 82 name=summe, width =10em, b o r d e r c o l o r ={ }]{}% 83 ~ \ t e x t e u r o \ \ 84 &\\*[ 0.8em ] \ t e x t f o r l a b e l { l 0 2 }{ Zins :}&\ T e x t F i e l d [% 85 name= z i n s, width =10em, b o r d e r c o l o r ={ } ] { } ~ \ % \ \ 86 &\\*[ 0.8em ] \ t e x t f o r l a b e l { l 0 3 }{ I n v e s t m e n t time:}&% 87 \ ChoiceMenu [ name= z e i t, popdown= t r u e, b o r d e r c o l o r ={ }% 88 ]{}{{1}={1},{2}={2},{3}={3},{4}={4},{5}={5},% 89 {6}={6},{7}={7},{8}={8},{9}={9},{10}={10}}~ y e a r s \ \ 90 &\\*[ 0.8em ] \ h l i n e 91 \ multicolumn { 2 } { c } { } \ \ * [ 0. 8 em ] 92 \ multicolumn { 2 } { c } { \ t e x t s c {C \, a \, l \, c \, u \, l \, a \, t \, i \, o \, n } } \ \ 93 \ multicolumn { 2 } { c } { } \ \ * [ 0. 8 em ] 94 \ multicolumn { 2 } { c } { \ PushButton [ name= s t a r t,% 95 o n c l i c k ={ d o C a l c u l a t i o n ( ) }, b o r d e r c o l o r ={ },% 96 f i l l c o l o r ={ } ] { S t a r t } } \ \ 97 \ multicolumn { 2 } { c } { } \ \ * [ 0. 8 em ] \ h l i n e 98 \ multicolumn { 2 } { c } { } \ \ * [ 0. 8 em ] 99 \ multicolumn { 2 } { c } { \ t e x t s c {R \, e \, s \, u \, l \, t } } \ \ 100 \ multicolumn { 2 } { c } { } \ \ * [ 0. 8 em ] \ t e x t f o r l a b e l { l 0 4 }{% 101 R e s u l t :}&\ T e x t F i e l d [ name= e r g e b n i s, width =10em,% 102 b o r d e r c o l o r ={0 0 0}, r e a d o n l y = t r u e ] { } ~ \ t e x t e u r o \ \ 103 \ multicolumn { 2 } { c } { } \ \ 104 \ h l i n e 105 \ end { t a b u l a r } 106 \ end {Form} 107 \ end { document } 53
54 7 Form number four: using both insdljs and inputenc The inputenc package replaces some characters i. e. german umlauts by LATEX code sequences. This is a good idea for normal text but not for JavaScript code. To avoid the conversion in JavaScript code the characters must not be added directly to strings, add the corresponding JavaScript-Unicode notation instead. Table 2 contains some example Unicode notations for german umlauts and ligatures. Table 2: JavaScript-Unicode notation for german umlauts umlaut/ligature ä ö ü A Ö Ü ß JavaScript-Unicode notation \u00e4 \u00f6 \u00fc \u00c4 \u00d6 \u00dc \u00df 54
55 Here is an example how to use the Unicode notation (see variable thetext): 1 \ d o c u m e n t c l a s s [ ngerman, a 4 p a p e r ] { s c r a r t c l } 2 \ u s e p a c k a g e [ l a t i n 1 ] { i n p u t e n c } 3 \ u s e p a c k a g e { mathptmx } 4 \ u s e p a c k a g e [ s c a l e d =. 9 2 ] { h e l v e t } 5 \ u s e p a c k a g e { c o u r i e r } 6 \ u s e p a c k a g e [ T1 ] { f o n t e n c } 7 \ u s e p a c k a g e { textcomp } 8 \ renewcommand * { \ f a m i l y d e f a u l t }{ phv } 9 \ u s e p a c k a g e [ l e f t =25mm, t o p =25mm, bottom =10mm, r i g h t =10mm] { geometry } 10 \ u s e p a c k a g e { f a n c y h d r } 11 \ l h e a d { T e s t } \ chead { } \ r h e a d { i n p u t e n c and i n s d l j s } 12 \ l f o o t { } \ c f o o t { } \ r f o o t {} 13 \ p a g e s t y l e { f a n c y } 14 \ u s e p a c k a g e { g r a p h i c x } 15 \ u s e p a c k a g e { c o l o r } 16 \ u s e p a c k a g e [ 17 p d f t e x, a 4 p a p e r = t r u e, c o l o r l i n k s = t r u e, 18 p d f t i t l e ={ i n s d l j s und i n p u t e n c }, p d f s u b j e c t ={ T e s t }, 19 p d f a u t h o r ={ i c h }, 20 pdfpagemode=usenone, p d f s t a r t v i e w =FitH, 21 p a g e b a c k r e f, p d f h i g h l i g h t ={/N} 22 ] { h y p e r r e f } 23 \ u s e p a c k a g e [ p d f t e x ] { i n s d l j s } 24 \ b e g i n { insdljs } [ exaada ] { exaada }{ J a v a S c r i p t a u f Document Level } 25 / / i n d i c a t e t h a t t h e f u n c t i o n was n o t y e t run 26 v a r done = 0 ; / / t e x t t o show when f i l e i s opened 29 v a r t h e T e x t = 30 " T e s t t o show \ u00e4 \ u00f6 \ u00fc \ u00c4 \ u00d6 \ u00dc \ u00df " ; / / f u n c t i o n t o run when opening t h e document 33 f u n c t i o n m y F i r s t J a v a S c r i p t F u n c t i o n ( ) 34 { 35 i f (! done ) { 36 done = 1 ; 37 app. a l e r t ( t h e T e x t ) ; 38 } 39 } 40 \ end { insdljs } 41 \ OpenAction { / S / J a v a S c r i p t / JS ( m y F i r s t J a v a S c r i p t F u n c t i o n ( ) ; ) } 42 \ newcommand { \ t e x t f o r l a b e l }[2]{% 55
56 43 \ T e x t F i e l d [ name ={#1}, v a l u e ={#2}, width =7em, a l i g n =2,% 44 b o r d e r c o l o r ={1 1 1}, r e a d o n l y = t r u e ]{}% 45 } 46 \ b e g i n { document } 47 \ s e c t i o n { T e s t i n g i n s d l j s and i n p u t e n c } 48 This i s a t e s t whether i n s d l j s and i n p u t e n c can be used combined. 49 The pop up box s h o u l d show t h e f o l l o w i n g german u m l a u t s and l i g a t u r e s : 50 \ b e g i n { i t e m i z e } 51 \ item ä ( ae ) 52 \ item ö ( oe ) 53 \ item ü ( ue ) 54 \ item Ä ( Ae ) 55 \ item Ö ( Oe ) 56 \ item Ü ( Ue ) 57 \ item ß ( sz ) 58 \ end { i t e m i z e } 59 \ end { document } 56
57 A History Version ( ) shows how to add help using PDF annotations or tooltip texts. Version ( ) contains a new section how to use the insdljs and inputenc packages together. German umlauts must not be written directly to strings in JavaScript code, the corresponding JavaScript Unicode notations must be used instead. Version ( ) contains corrected options for the hyperref package. 1 pdfpagemode =UseNone was replaced by 1 pdfpagemode =UseNone Version ( ) uses other fonts than previous versions. The document preamble was derived from another document containing mathematics. As this document does not contain mathematics we do no need the packages related to mathematics. Version ( ) contains corrections in the Fonts section. 1 \ u s e p a c k a g e [ T1 ] { f o n t e n c } does not set up LATEX to use type-1 fonts (as stated in version 0.9.0). Instead it changes the preferred font encoding vector to T1 instead of OT1 if type-1 fonts are used. Version is the first version published on CTAN. I m not a native english speaker, so the english tutorial and examples may need corrections in style, spelling and grammar. Please feel free to contact me using the web form fh-schmalkalden.de/url.php?/page/1026/select_wert/3023 if you have suggestions. 57
58 B GNU Free Documentation License Version 1.2, November 2002 Copyright 2000,2001,2002 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document free in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of copyleft, which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. B.1 APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The Document, below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as you. You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A Modified Version of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A Secondary Section is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document s overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. 58
59 The Invariant Sections are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The Cover Texts are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A Transparent copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not Transparent is called Opaque. Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LATEX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machinegenerated HTML, PostScript or PDF produced by some word processors for output purposes only. The Title Page means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, Title Page means the text near the most prominent appearance of the work s title, preceding the beginning of the body of the text. A section Entitled XYZ means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as Acknowledgements, Dedications, Endorsements, or History.) To Preserve the Title of such a section when you modify the Document means that it remains a section Entitled XYZ according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. 59
60 B.2 VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section B.3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. B.3 COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document s license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. B.4 MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections B.2 and B.3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution 60
61 and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document s license notice. H. Include an unaltered copy of this License. I. Preserve the section Entitled History, Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled History in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the History section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. K. For any section Entitled Acknowledgements or Dedications, Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. 61
62 L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. M. Delete any section Entitled Endorsements. Such a section may not be included in the Modified Version. N. Do not retitle any existing section to be Entitled Endorsements or to conflict in title with any Invariant Section. O. Preserve any Warranty Disclaimers. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version s license notice. These titles must be distinct from any other section titles. You may add a section Entitled Endorsements, provided it contains nothing but endorsements of your Modified Version by various parties for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. B.5 COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section B.4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled History in the various original documents, forming one section Entitled History ; likewise combine any sections Entitled Acknowledgements, and any sections Entitled Dedications. You must delete all sections Entitled Endorsements. 62
63 B.6 COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. B.7 AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an aggregate if the copyright resulting from the compilation is not used to limit the legal rights of the compilation s users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section B.3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document s Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. B.8 TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section B.4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled Acknowledgements, Dedications, or History, the requirement (section B.4) to Preserve its Title (section B.1) will typically require changing the actual title. B.9 TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, 63
64 parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. B.10 FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License or any later version applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. ADDENDUM: How to use this License for your documents To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: Copyright YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License. If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the with...texts. line with this: with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. 64
65 References [ADS05a] Adobe Developer Support. Acrobat JavaScript Scripting Guide. Adobe Systems Incorporated, [ADS05b] Adobe Developer Support. Acrobat JavaScript Scripting Reference. Adobe Systems Incorporated, [ASI01] [RO04] Adobe Systems Incorporated. PDF Reference, third edition. Adobe Systems Incorporated, Sebastian Rahtz and Heiko Oberdiek. Hypertext marks in LaTeX: a manual for hyperref [Sup03] Adobe Technical Support. Acrobat JavaScript Object Specification Version 5.1. Adobe Systems Incorporated,
Practical Example: Building Reports for Bugzilla
Practical Example: Building Reports for Bugzilla We have seen all the components of building reports with BIRT. By this time, we are now familiar with how to navigate the Eclipse BIRT Report Designer perspective,
Basic Excel Handbook
2 5 2 7 1 1 0 4 3 9 8 1 Basic Excel Handbook Version 3.6 May 6, 2008 Contents Contents... 1 Part I: Background Information...3 About This Handbook... 4 Excel Terminology... 5 Excel Terminology (cont.)...
Creating Forms with Acrobat 10
Creating Forms with Acrobat 10 Copyright 2013, Software Application Training, West Chester University. A member of the Pennsylvania State Systems of Higher Education. No portion of this document may be
collab.virginia.edu UVACOLLAB ECLPS: BUILDING COURSE PORTALS UVaCollab User Guide Series [email protected]
UVACOLLAB ECLPS: BUILDING COURSE PORTALS UVaCollab User Guide Series [email protected] Revised 4/28/2014 CONTENTS The eclps Overview... 3 Objectives... 3 Adding the Syllabus or Lessons Tool to
We automatically generate the HTML for this as seen below. Provide the above components for the teaser.txt file.
Creative Specs Gmail Sponsored Promotions Overview The GSP creative asset will be a ZIP folder, containing four components: 1. Teaser text file 2. Teaser logo image 3. HTML file with the fully expanded
CaptainCasa. CaptainCasa Enterprise Client. CaptainCasa Enterprise Client. Feature Overview
Feature Overview Page 1 Technology Client Server Client-Server Communication Client Runtime Application Deployment Java Swing based (JRE 1.6), generic rich frontend client. HTML based thin frontend client
Copyright combit GmbH 1992-2015; Rev. 21.000 www.combit.net All rights reserved.
Designer Manual No responsibility is taken for the correctness of the information contained in this manual. The information is subject to alteration without previous notice. combit GmbH accepts no liabilities
Website Development Komodo Editor and HTML Intro
Website Development Komodo Editor and HTML Intro Introduction In this Assignment we will cover: o Use of the editor that will be used for the Website Development and Javascript Programming sections of
Participant Guide RP301: Ad Hoc Business Intelligence Reporting
RP301: Ad Hoc Business Intelligence Reporting State of Kansas As of April 28, 2010 Final TABLE OF CONTENTS Course Overview... 4 Course Objectives... 4 Agenda... 4 Lesson 1: Reviewing the Data Warehouse...
Creating Interactive PDF Forms
Creating Interactive PDF Forms Using Adobe Acrobat X Pro Information Technology Services Outreach and Distance Learning Technologies Copyright 2012 KSU Department of Information Technology Services This
MICROSOFT OFFICE ACCESS 2007 - NEW FEATURES
MICROSOFT OFFICE 2007 MICROSOFT OFFICE ACCESS 2007 - NEW FEATURES Exploring Access Creating and Working with Tables Finding and Filtering Data Working with Queries and Recordsets Working with Forms Working
Dissertation Template for Princeton. University
Dissertation Template for Princeton University First Middle Last A Dissertation Presented to the Faculty of Princeton University in Candidacy for the Degree of Doctor of Philosophy Recommended for Acceptance
Custom Reporting System User Guide
Citibank Custom Reporting System User Guide April 2012 Version 8.1.1 Transaction Services Citibank Custom Reporting System User Guide Table of Contents Table of Contents User Guide Overview...2 Subscribe
Editing the Web Template Files
Editing the Web Template Files This tutorial describes the process of editing the PHP files to make global changes to the layout, color, font, and text within the CONTENTdm Web templates. This documentation
Using the Thesis and Dissertation Templates
Using the Thesis and Dissertation Templates For use with Microsoft Word on Windows and Macintosh computers January 2011 Graduate School e-mail: [email protected] 2011 Graduate School Revised January
Dreamweaver CS4 Day 2 Creating a Website using Div Tags, CSS, and Templates
Dreamweaver CS4 Day 2 Creating a Website using Div Tags, CSS, and Templates What is a DIV tag? First, let s recall that HTML is a markup language. Markup provides structure and order to a page. For example,
3 What s New in Excel 2007
3 What s New in Excel 2007 3.1 Overview of Excel 2007 Microsoft Office Excel 2007 is a spreadsheet program that enables you to enter, manipulate, calculate, and chart data. An Excel file is referred to
Creating Hyperlinks & Buttons InDesign CS6
Creating Hyperlinks & Buttons Adobe DPS, InDesign CS6 1 Creating Hyperlinks & Buttons InDesign CS6 Hyperlinks panel overview You can create hyperlinks so that when you export to Adobe PDF or SWF in InDesign,
Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence
Web Development Owen Sacco ICS2205/ICS2230 Web Intelligence Introduction Client-Side scripting involves using programming technologies to build web pages and applications that are run on the client (i.e.
Create a Google Site in DonsApp
Create a Google Site in DonsApp 1 Google Web Site Interactive. Constructivist. Collaborative. Communities. WHAT IS GOOGLE SITE? With one single click, you can create a website without any knowledge of
Setting up and using email in PGdebt 9
Setting up and using email in PGdebt 9 MAIL MERGE AND EMAIL The Mailmerge/Word processor screen is split horizontally by a blue divided, this can be dragged to change the size of the sections. WP is at
WP Popup Magic User Guide
WP Popup Magic User Guide Plugin version 2.6+ Prepared by Scott Bernadot WP Popup Magic User Guide Page 1 Introduction Thank you so much for your purchase! We're excited to present you with the most magical
SAPScript. A Standard Text is a like our normal documents. In Standard Text, you can create standard documents like letters, articles etc
SAPScript There are three components in SAPScript 1. Standard Text 2. Layout Set 3. ABAP/4 program SAPScript is the Word processing tool of SAP It has high level of integration with all SAP modules STANDARD
Creating Accessible Word Forms. Contents. Introduction
Word 2010: Contents Word 2010:... 1 Introduction... 1 Form Specifications... 2 File Type... 2 Zoom Level... 2 Form Margins... 2 Table Layout... 2 Borders... 4 Row Height... 5 Headers... 5 Top Row... 5
PaperlessPrinter. Version 3.0. User s Manual
Version 3.0 User s Manual The User s Manual is Copyright 2003 RAREFIND ENGINEERING INNOVATIONS All Rights Reserved. 1 of 77 Table of Contents 1. 2. 3. 4. 5. Overview...3 Introduction...3 Installation...4
Microsoft Dynamics GP. Advanced Financial Analysis
Microsoft Dynamics GP Advanced Financial Analysis Copyright Copyright 2010 Microsoft. All rights reserved. Limitation of liability This document is provided as-is. Information and views expressed in this
How To Change Your Site On Drupal Cloud On A Pcode On A Microsoft Powerstone On A Macbook Or Ipad (For Free) On A Freebie (For A Free Download) On An Ipad Or Ipa (For
How-to Guide: MIT DLC Drupal Cloud Theme This guide will show you how to take your initial Drupal Cloud site... and turn it into something more like this, using the MIT DLC Drupal Cloud theme. See this
Contents. Downloading the Data Files... 2. Centering Page Elements... 6
Creating a Web Page Using HTML Part 1: Creating the Basic Structure of the Web Site INFORMATION TECHNOLOGY SERVICES California State University, Los Angeles Version 2.0 Winter 2010 Contents Introduction...
6. If you want to enter specific formats, click the Format Tab to auto format the information that is entered into the field.
Adobe Acrobat Professional X Part 3 - Creating Fillable Forms Preparing the Form Create the form in Word, including underlines, images and any other text you would like showing on the form. Convert the
Starting User Guide 11/29/2011
Table of Content Starting User Guide... 1 Register... 2 Create a new site... 3 Using a Template... 3 From a RSS feed... 5 From Scratch... 5 Edit a site... 6 In a few words... 6 In details... 6 Components
MICROSOFT ACCESS 2007 BOOK 2
MICROSOFT ACCESS 2007 BOOK 2 4.1 INTRODUCTION TO ACCESS FIRST ENCOUNTER WITH ACCESS 2007 P 205 Access is activated by means of Start, Programs, Microsoft Access or clicking on the icon. The window opened
Creating Fill-able Forms using Acrobat 8.0: Part 1
Creating Fill-able Forms using Acrobat 8.0: Part 1 The first step in creating a fill-able form in Adobe Acrobat is to generate the form with all its formatting in a program such as Microsoft Word. Then
(1) latex + dvipdfm (which is a DVI to PDF translator) or (2) pdflatex (a version of LaTeX that generates PDF output instead of DVI).
FORMATTING AN ELECTRONIC SAE TECHNICAL PAPER To have your paper published by SAE, you must adhere to the SAE Technical Paper Template, which includes the correct layout, margins, style tags, etc. The available
Google Sites: Creating, editing, and sharing a site
Google Sites: Creating, editing, and sharing a site Google Sites is an application that makes building a website for your organization as easy as editing a document. With Google Sites, teams can quickly
LICENSE4J LICENSE MANAGER USER GUIDE
LICENSE4J LICENSE MANAGER USER GUIDE VERSION 4.5.5 LICENSE4J www.license4j.com Table of Contents Getting Started... 4 Managing Products... 6 Create Product... 6 Edit Product... 7 Refresh, Delete Product...
Data Tool Platform SQL Development Tools
Data Tool Platform SQL Development Tools ekapner Contents Setting SQL Development Preferences...5 Execution Plan View Options Preferences...5 General Preferences...5 Label Decorations Preferences...6
Customising Your Mobile Payment Pages
Corporate Gateway Customising Your Mobile Payment Pages V2.0 May 2014 Use this guide to: Understand how to customise your payment pages for mobile and tablet devices XML Direct Integration Guide > Contents
Ansur Test Executive. Users Manual
Ansur Test Executive Users Manual April 2008 2008 Fluke Corporation, All rights reserved. All product names are trademarks of their respective companies Table of Contents 1 Introducing Ansur... 4 1.1 About
Taleo Enterprise. Career Section Branding Definition. Version 7.5
Taleo Enterprise Career Section Branding Definition Version 7.5 March 2010 Confidential Information It shall be agreed by the recipient of the document (hereafter referred to as the other party ) that
KEZBER CONTENT MANAGEMENT SYSTEM MANUAL
KEZBER CONTENT MANAGEMENT SYSTEM MANUAL Page 1 Kezber Table Content Table Content 1. Introduction/Login... 3 2. Editing General Content... 4 to 8 2.1 Navigation General Content Pages... Error! Bookmark
Basic Microsoft Excel 2007
Basic Microsoft Excel 2007 The biggest difference between Excel 2007 and its predecessors is the new layout. All of the old functions are still there (with some new additions), but they are now located
ASSESSMENT GENERATOR TUTORIAL CREATING ASSESSMENTS SIMPLE TYPE ASSESSMENT
ASSESSMENT GENERATOR TUTORIAL CREATING ASSESSMENTS SIMPLE TYPE ASSESSMENT We recommend that you first create a Category to file your first assessment under. See the Categories Tutorial. 1. From Your Home
Mobile Web Site Style Guide
YoRk University Mobile Web Site Style Guide Table of Contents This document outlines the graphic standards for the mobile view of my.yorku.ca. It is intended to be used as a guide for all York University
PDF MAKER FOR VTIGER CRM
PDF MAKER FOR VTIGER CRM Introduction The PDF Maker is extension tool designed for vtiger CRM. There is already possibility of the export to pdf format in vtiger CRM functionality but it covers just few
Microsoft Excel 2013: Headers and Footers
Microsoft Excel 2013: Headers and Footers You can add headers or footers at the top or bottom of a printed worksheet. For example, you might create a footer that has page numbers, along with the date and
Creating Accessible Word Documents
Center for Faculty Development and Support Creating Accessible Word Documents With Microsoft Word 2008 for Macintosh CREATING ACCESSIBLE WORD DOCUMENTS 3 Overview 3 Learning Objectives 3 Prerequisites
Printer Setup. What Is the Printer Setup Module?... B-2. How to Access the Printer Setup Module... B-3. Reference Information. Standard Procedures
Printer Setup A ColorDesigner housekeeping setup option that allows you to select a system printer as well as the information to print on formula labels that you attach to paint cans. What Is the Printer
Ad Hoc Reporting. Usage and Customization
Usage and Customization 1 Content... 2 2 Terms and Definitions... 3 2.1 Ad Hoc Layout... 3 2.2 Ad Hoc Report... 3 2.3 Dataview... 3 2.4 Page... 3 3 Configuration... 4 3.1 Layout and Dataview location...
Designing and Implementing Forms 34
C H A P T E R 34 Designing and Implementing Forms 34 You can add forms to your site to collect information from site visitors; for example, to survey potential customers, conduct credit-card transactions,
Creating Custom Crystal Reports Tutorial
Creating Custom Crystal Reports Tutorial 020812 2012 Blackbaud, Inc. This publication, or any part thereof, may not be reproduced or transmitted in any form or by any means, electronic, or mechanical,
Microsoft Word 2007 Module 1
Microsoft Word 2007 Module 1 http://pds.hccfl.edu/pds Microsoft Word 2007: Module 1 July, 2007 2007 Hillsborough Community College - Professional Development and Web Services Hillsborough Community College
Access II 2007 Workshop
Access II 2007 Workshop Query & Report I. Review Tables/Forms Ways to create tables: tables, templates & design Edit tables: new fields & table properties Import option Link tables: Relationship Forms
http://ipfw.edu Quick Guide for Accessible PDF July 2013 Training: http://ipfw.edu/training
Accessible PDF Getting Started Types of Documents best suited for PDF on the Web Document is longer than 5 pages. You need to preserve the formatting or layout of the original document, e.g., for printing.
Information Server Documentation SIMATIC. Information Server V8.0 Update 1 Information Server Documentation. Introduction 1. Web application basics 2
Introduction 1 Web application basics 2 SIMATIC Information Server V8.0 Update 1 System Manual Office add-ins basics 3 Time specifications 4 Report templates 5 Working with the Web application 6 Working
FedEx Office Print Online Corporate
Important: Before Placing Your Order Prior to beginning the upload and print process be sure that you have the following items prepared: a. All photos/images should be High resolution with a (300 dpi or
LETTERS, LABELS & EMAIL
22 LETTERS, LABELS & EMAIL Now that we have explored the Contacts and Contact Lists sections of the program, you have seen how to enter your contacts and group contacts on lists. You are ready to generate
Using Label Merge Fields
Using Label Merge Fields TM Corporate Headquarters: Rimage Corporation 7725 Washington Avenue South Minneapolis, MN 55439 USA 800 553 8312 (toll free US) Service: +1 952 946 0004 (International) Fax: +1
Self-Service Portal Implementation Guide
Self-Service Portal Implementation Guide Salesforce, Winter 6 @salesforcedocs Last updated: October 0, 05 Copyright 000 05 salesforce.com, inc. All rights reserved. Salesforce is a registered trademark
Base template development guide
Scandiweb Base template development guide General This document from Scandiweb.com contains Magento theme development guides and theme development case study. It will basically cover two topics Magento
Handout: Word 2010 Tips and Shortcuts
Word 2010: Tips and Shortcuts Table of Contents EXPORT A CUSTOMIZED QUICK ACCESS TOOLBAR... 2 IMPORT A CUSTOMIZED QUICK ACCESS TOOLBAR... 2 USE THE FORMAT PAINTER... 3 REPEAT THE LAST ACTION... 3 SHOW
Citrix StoreFront. Customizing the Receiver for Web User Interface. 2012 Citrix. All rights reserved.
Citrix StoreFront Customizing the Receiver for Web User Interface 2012 Citrix. All rights reserved. Customizing the Receiver for Web User Interface Introduction Receiver for Web provides a simple mechanism
Microsoft Excel 2010 Tutorial
1 Microsoft Excel 2010 Tutorial Excel is a spreadsheet program in the Microsoft Office system. You can use Excel to create and format workbooks (a collection of spreadsheets) in order to analyze data and
Catalog Creator by On-site Custom Software
Catalog Creator by On-site Custom Software Thank you for purchasing or evaluating this software. If you are only evaluating Catalog Creator, the Free Trial you downloaded is fully-functional and all the
Where do I start? DIGICATION E-PORTFOLIO HELP GUIDE. Log in to Digication
You will be directed to the "Portfolio Settings! page. On this page you will fill out basic DIGICATION E-PORTFOLIO HELP GUIDE Where do I start? Log in to Digication Go to your school!s Digication login
Dreamweaver Tutorials Creating a Web Contact Form
Dreamweaver Tutorials This tutorial will explain how to create an online contact form. There are two pages involved: the form and the confirmation page. When a user presses the submit button on the form,
Creating Basic Reports with the SAP Query Tool
CHAPTER Creating Basic Reports with the SAP Query Tool In this chapter The SAP Query Tool 24 Creating a Basic List Query by Using the SAP Query Tool 24 Reviewing the Options on Each of the Five Basic Screens
Guide To Creating Academic Posters Using Microsoft PowerPoint 2010
Guide To Creating Academic Posters Using Microsoft PowerPoint 2010 INFORMATION SERVICES Version 3.0 July 2011 Table of Contents Section 1 - Introduction... 1 Section 2 - Initial Preparation... 2 2.1 Overall
User s Manual CAREpoint EMS Workstation D-Scribe Reporting System
1838021B User s Manual CAREpoint EMS Workstation D-Scribe Reporting System EDITORS NOTE FORM BUILDER IS A PART OF D-SCRIBE S REPORTING SYSTEM (D-SCRIBE S FORM BUILDER). FORMS WHICH ARE CREATED AND/OR USED
Microsoft Dynamics GP. Extender User s Guide
Microsoft Dynamics GP Extender User s Guide Copyright Copyright 2010 Microsoft. All rights reserved. Limitation of liability This document is provided as-is. Information and views expressed in this document,
So you say you want something printed...
So you say you want something printed... Well, that s great! You ve come to the right place. Whether you re having us design and edit your work, or you fancy yourself a designer and plan to hand over your
How to Prepare a Book for Press With Scribus
This tutorial will offer you some advice on how to use Scribus to create print-ready files for our print program. Books can be prepped for Blackand-White, Standard Color and Premium color. Whether you
Salesforce Customer Portal Implementation Guide
Salesforce Customer Portal Implementation Guide Salesforce, Winter 16 @salesforcedocs Last updated: December 10, 2015 Copyright 2000 2015 salesforce.com, inc. All rights reserved. Salesforce is a registered
Guide to design and layout
Plain English Campaign: Guide to design and layout Copyright Plain English Campaign Guide to design and layout This is only a basic guide. If you have any suggestions, corrections or improvements, please
Adobe Dreamweaver CC 14 Tutorial
Adobe Dreamweaver CC 14 Tutorial GETTING STARTED This tutorial focuses on the basic steps involved in creating an attractive, functional website. In using this tutorial you will learn to design a site
Eloqua Insight: Advanced Analyzer User Guide
Eloqua Insight: Advanced Analyzer User Guide Table of Contents About this User Guide... 5 Introduction to Analyzer User... 6 Beyond Basic Grids and Graphs... 6 The Benefits of Eloqua Insight... 6 Reporting
TLMC WORKSHOP: THESIS FORMATTING IN WORD 2010
Table of Contents Introduction... 2 Getting Help... 2 Tips... 2 Working with Styles... 3 Applying a Style... 3 Choosing Which Styles to Use... 3 Modifying a Style... 4 Creating A New Style... 4 Setting
HOW TO PAGE A DOCUMENT IN MICROSOFT WORD
1 HOW TO PAGE A DOCUMENT IN MICROSOFT WORD 1 PAGING A WHOLE DOCUMENT FROM 1 TO Z (Including the first page) 1.1 Arabic Numbers (a) Click the Insert tab. (b) Go to the Header & Footer Section and click
bbc Creating a Purchase Order Form Adobe LiveCycle Designer ES2 November 2009 Version 9
bbc Adobe LiveCycle Designer ES2 November 2009 Version 9 2009 Adobe Systems Incorporated. All rights reserved. Adobe LiveCycle Designer ES2 (9.0) for Microsoft Windows November 2009 This tutorial is licensed
How to Copyright Your Book
Need a Bar Code? Same thing. After you ve obtained your numerical ISBN, that number can be used to create a barcode for your back cover. A barcode is a graphic of vertical lines that can be scanned for
PDF Forms Advantages and application possibilities of electronic forms in PDF format
White Paper PDF Forms Advantages and application possibilities of electronic forms in PDF format Copyright 2002-2009 soft Xpansion GmbH & Co. KG White Paper PDF Forms 1 Table of Contents Usage of Forms...
Forms & Surveys. Schoolwires Centricity2
Forms & Surveys Schoolwires Centricity2 Trademark tice Schoolwires, the Schoolwires logos, and the unique trade dress of Schoolwires are the trademarks, service marks, trade dress and logos of Schoolwires,
Microsoft Access 2010 handout
Microsoft Access 2010 handout Access 2010 is a relational database program you can use to create and manage large quantities of data. You can use Access to manage anything from a home inventory to a giant
First Bytes Programming Lab 2
First Bytes Programming Lab 2 This lab is available online at www.cs.utexas.edu/users/scottm/firstbytes. Introduction: In this lab you will investigate the properties of colors and how they are displayed
Creating Acrobat Forms Acrobat 9 Professional
Creating Acrobat Forms Acrobat 9 Professional Acrobat forms typically have an origin from another program, like Word, Illustrator, Publisher etc. Doesn t matter. You design the form in another application
Website Editor User Guide
CONTENTS Minimum System Requirements... 3 Design Your Website... 3 Choosing your Theme... 4 Choosing your Header Style... 4-5 Website Content Editor... 6 Text Editor Toolbar features... 6 Main Menu Items...
ECDL / ICDL Word Processing Syllabus Version 5.0
ECDL / ICDL Word Processing Syllabus Version 5.0 Purpose This document details the syllabus for ECDL / ICDL Word Processing. The syllabus describes, through learning outcomes, the knowledge and skills
paragraph(s). The bottom mark is for all following lines in that paragraph. The rectangle below the marks moves both marks at the same time.
MS Word, Part 3 & 4 Office 2007 Line Numbering Sometimes it can be helpful to have every line numbered. That way, if someone else is reviewing your document they can tell you exactly which lines they have
MANUSCRIPT TITLE (CENTERED, 14 POINT BOLD, SANS SERIF FONT, MAJUSCULE)
IGVC2014-ROBOTNAME INTRODUCTION MANUSCRIPT TITLE (CENTERED, 14 POINT BOLD, SANS SERIF FONT, MAJUSCULE) University Name Student Name(s) Faculty Name(s) & E-mail IGVC is using a modified version of the American
Best Practice. 2004-2010 Pentasoft Corp. Avactis Ecommerce Shopping Cart Software. All Rights Reserved.
Best Practice 2004-2010 Pentasoft Corp. Avactis Ecommerce Shopping Cart Software. All Rights Reserved. 1. Introduction 2. Five simple steps to create an Avactis template 2.1. Header and menu design 2.2.
ifix Alarm History Viewer Version 1.0
INSTALLATION AND DESCRIPTION ifix Alarm History Viewer Version 1.0 File: Documentation - ifix Alarm History Viewer - Version 1.0 Revision: 1.0 Date: 01/11/12 Inh.: Dipl.-Ing. Bernhard Wurm An der Landwehr
Blackbaud StudentInformationSystem. Reports Guide for Admissions Office
Blackbaud StudentInformationSystem Reports Guide for Admissions Office 102811 2011 Blackbaud, Inc. This publication, or any part thereof, may not be reproduced or transmitted in any form or by any means,
Nintex Forms 2013 Help
Nintex Forms 2013 Help Last updated: Friday, April 17, 2015 1 Administration and Configuration 1.1 Licensing settings 1.2 Activating Nintex Forms 1.3 Web Application activation settings 1.4 Manage device
www.fricke-parks.com
P R E S S File Uploads to FP Press FTP instructions are effective as of 11/1/2010. All older sites are discontinued. Please note: Anonymous logins are not available at this time. For Fetch users, fill
Creating a Newsletter with Microsoft Word
Creating a Newsletter with Microsoft Word Frank Schneemann In this assignment we are going to use Microsoft Word to create a newsletter that can be used in your classroom instruction. If you already know
How to create and personalize a PDF portfolio
How to create and personalize a PDF portfolio Creating and organizing a PDF portfolio is a simple process as simple as dragging and dropping files from one folder to another. To drag files into an empty
Logi Ad Hoc Reporting Report Design Guide
Logi Ad Hoc Reporting Report Design Guide Version 10.2 Last Updated: May 2012 Page 2 Table of Contents INTRODUCTION... 4 What is Logi Ad Hoc Reporting?... 5 CHAPTER 1 Getting Started... 6 Learning the
Access Tutorial 3 Maintaining and Querying a Database. Microsoft Office 2013 Enhanced
Access Tutorial 3 Maintaining and Querying a Database Microsoft Office 2013 Enhanced Objectives Session 3.1 Find, modify, and delete records in a table Hide and unhide fields in a datasheet Work in the
User's Guide (PC Software)
User's Guide (PC Software) Starting and Closing Connection and Memory Card Management Security Settings Contents and Folder Operations Troubleshooting Appendix When in Trouble Malfunction? Follow the following
Installing and using the driver
8/00 Rev. 2.08-00 MANUAL Installation,Using, page 1 Installing and using the driver System Requirements... 2 Installing the printer driver... 3 Extracting the driver files... 3 Install a printer driver
