summaryrefslogtreecommitdiff
path: root/texmf-dist/doc/latex/acrotex/eformman.tex
blob: de094e149272a57e966d099b7d019f0836ee958f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
% makeindex < aebpro_man.idx > aebpro_man.ind
\documentclass{article}
\usepackage[fleqn]{amsmath}
\usepackage[%
    web={centertitlepage,designv,
        forcolorpaper,latextoc,pro,useui},
    exerquiz,aebxmp
]{aeb_pro}
\usepackage[dblevel=0]{aeb_mlink}
\usepackage[altbullet]{lucidbry}
%\usepackage{myriadpro}

\setlength{\marginparpush}{3pt}
\setlength{\mathindent}{\the\parindent}

%\previewOn\pmpvOn

\usepackage{graphicx,array,longtable}
%\usepackage[usecmtt]{myriadpro}

\usepackage{xbmks}
\DeclareInitView{layoutmag={navitab:UseOutlines}}
\xbmksetup{colors={int=red},styles={intbf}}

\def\STRUT{\rule{0pt}{14pt}}
\def\negSTRUT{\rule[-8pt]{0pt}{0pt}}
\def\mSTRUT{\makebox[0pt][l]{\phantom{$\frac00$}}}
\let\vrbnormal\sffamily
\let\uif\textsf
\let\key\texttt


%\makeatletter
%\renewcommand*\l@subsection{\@dottedtocline{2}{2.5em}{3.5em}}
%\renewcommand*\l@subsubsection{\@dottedtocline{4}{5em}{1em}}
%\def\numberline#1{\hb@xt@2.5em{#1\hfil}}
%\makeatother
\makeatletter
\let\gob\@gobble
\renewcommand*\l@subsection{\@dottedtocline{2}{2em}{3.5em}}
\renewcommand*\l@subsubsection{\@dottedtocline{4}{5.5em}{1.5em}}
\renewcommand\@pnumwidth{2.55em}
\renewcommand*\l@section[2]{%
  \ifnum \c@tocdepth >\z@
    \addpenalty\@secpenalty
    \addvspace{1.0em \@plus\p@}%
    \setlength\@tempdima{2em}%{1.5em}%
    \begingroup
      \parindent \z@ \rightskip \@pnumwidth
      \parfillskip -\@pnumwidth
      \leavevmode \bfseries
      \advance\leftskip\@tempdima
      \hskip -\leftskip
      #1\nobreak\hfil \nobreak\hb@xt@\@pnumwidth{\hss #2}\par
    \endgroup
  \fi}
\makeatother

\hfuzz=1pt

\setlongtables

\usepackage{makeidx}
\makeindex
\usepackage{acroman}

\usepackage[active]{srcltx}

\urlstyle{rm}

\def\tutpath{doc/tutorial}
\def\tutpathi{tutorial}
\def\expath{../examples}

\let\tops\texorpdfstring
\DeclareDocInfo
{
    university={\AcroTeX.Net\protect\\[1ex]eforms and insdljs Documentation},
    title={Support for AcroForms and Links, and for\tops{\protect\\[2ex]}{ }Document JavaScript and Open Page Events},
    author={D. P. Story},
    email={dpstory@acrotex.net},
    subject={Documentation for the eforms and insdljs packages},
    talksite={\url{www.acrotex.net}},
    version={2.0},
    prepared={2021/05/29},
    preparedLabel={Distribution Dated:},
    keywords={LaTeX, hyperref, PDF, exercises, quizzes},
    copyrightStatus=True,
    copyrightNotice={Copyright (C) \the\year, D. P. Story},
    copyrightInfoURL={http://www.acrotex.net}
}
%\revisionLabel{Distribution Dated:}
\def\AEBBook{\textsl{{Acro\!\TeX} eDucation System Tools: {\LaTeX} for interactive PDF documents}}

\setlength{\marginparwidth}{62.5pt}
%\addtolength{\marginparwidth}{6pt}


\renewcommand\hproportionwebtitle{.75}
\universityLayout{fontsize=Large,fontfamily=sffamily}
\titleLayout{fontsize=LARGE,fontfamily=sffamily}
\authorLayout{fontsize=Large,fontfamily=sffamily}
\tocLayout{fontsize=Large,color=aeb,fontfamily=sffamily}
\sectionLayout{indent=-62.5pt,fontsize=large,color=aeb,fontfamily=sffamily}
\subsectionLayout{indent=-31.25pt,color=aeb,fontfamily=sffamily}
\subsubsectionLayout{indent=0pt,color=aeb,fontfamily=sffamily}
\subsubDefaultDing{\tops{$\bullet$}{\textrm\textbullet}}

\def\verygoodbreak{%
\vskip0pt plus1in\goodbreak\vskip0pt plus-1in}

\hyphenation{Java-Script}

\def\AcroT{Acro\!\TeX}\def\cAcroT{{\textcolor{blue}{\AcroT}}}
\def\AcroEB{\AcroT{} eDucation Bundle}\def\cAcroEB{\textcolor{blue}{\AcroEB}}
\def\AcroB{\AcroT{} Bundle}\def\cAcroB{\textcolor{blue}{\AcroB}}
\def\bUrl{http://www.math.uakron.edu/~dpstory}
\definePath{\urlAcroTeXBlog}{http://www.acrotex.net/blog}


\makeatletter
\let\bslash\@backslashchar
\renewcommand{\paragraph}{\@startsection{paragraph}{4}{0pt}{6pt}{-3pt}{\bfseries}}

% Begin definition of \appendixsubsection
\newcounter{appendixsubsection} %\setcounter{appendixsubsection}{0}
\def\theappendixsubsection{\Alph{appendixsubsection}}
\def\theHappendixsubsection{\Alph{appendixsubsection}}
\newcommand\appendixsubsection{%
   \renewcommand{\@seccntformat}[1]{\csname the##1\endcsname.\enspace}%
   \@startsection{appendixsubsection}{1}{\z@}%
   {-2.5ex\@plus -1ex \@minus -.2ex}%
   {1ex \@plus .2ex}%
   {\normalfont\normalsize\bfseries\color{blue}}}
\let\appendixsubsectionmark=\@gobble
\expandafter\def\csname toclevel@appendixsubsection\endcsname{1}

\let\l@appendixsubsection=\l@section
\def\web@appendixsubsection#1#2#3{\web@parse#1\\\par\penalty-50 \hspace*{\@tempdima}\mbox{}%
        \textbf{\makebox[0pt][r]{\makebox[\@tempdima][r]{\hyperlink{#3}{\numberline.\enspace}}}\web@title}\endgraf}
% end definition of appendixsubsection

\newcommand{\aebDescriptionlabel}[1]{%
    \setlength\dimen@{\amtIndent+\labelsep}%
    {\hspace*{\dimen@}#1}}
\newenvironment{aebDescript}
    {\begin{list}{}{\setlength{\labelwidth}{0pt}%
%        \setlength{\leftmargin}{\leftmargin}%
        \setlength{\leftmargin}{\leftmargin+\amtIndent}%
        \setlength\itemindent{-\leftmargin}%
        \let\makelabel\aebDescriptionlabel
    }}{\end{list}}

\def\hardspace{{\fontfamily{cmtt}\selectfont\symbol{32}}}
\def\AcroBlog{{Acro\!\TeX} Blog}
%\newlength{\aebdimen}
\def\anglemeta#1{$\langle\textit{\texttt{#1}}\rangle$}
\def\meta#1{\textit{\texttt{#1}}}
\let\pkg\textsf
\let\env\texttt
\let\opt\texttt
\let\app\textsf
\def\AEB{\textsf{AeB}}
\def\AcroTeX{Acro\!\TeX}
\def\HTML{HTML}\def\FDF{FDF}
\def\PDF{PDF}\def\URL{URL}
%\let\amtIndent\leftmargini
\edef\amtIndent{\the\parindent}
\def\bNH{\begin{NoHyper}}\def\eNH{\end{NoHyper}}
\def\nhnameref#1{\bNH\nameref{#1}\eNH}
\def\nhNameref#1{\bNH\Nameref{#1}\eNH}
\def\nhurl#1{\bNH\url{#1}\eNH}
\def\grayV#1{\textcolor{gray}{#1}}
\def\darg#1{\{#1\}}
\def\parboxValign{t}
\renewcommand*{\backrefalt}[4]{%
    \ifcase #1\or
       See page~#2.\else See pages~#2.\fi
}
\newenvironment{aebQuote}
   {\list{}{\leftmargin\amtIndent}%
    \item\relax}{\endlist}
\def\parboxValign{t}
\newcommand{\FmtMP}[2][0pt]{\mbox{}\marginpar{%\raggedleft
    \raisebox{.5\baselineskip+#1}{%
    \expandafter\parbox\expandafter[\parboxValign]%
        {\marginparwidth}{\aebbkFmtMp#2}}}}
\def\aebbkFmtMp{\kern0pt\itshape\small
    \color{blue}\raggedleft\hspace{0pt}}
\def\dps{$\mbox{$\mathfrak D$\kern-.3em\mbox{$\mathfrak P$}%
   \kern-.6em \hbox{$\mathcal S$}}$}
\def\FitItIn{\eq@fititin}
\def\endredpoint{\FitItIn{{\large\ifusebw\color{black}\else\color{red}\fi$\blacktriangleleft$}}}

\def\pb{pushbutton}

%\advance\marginparwidth16pt

\makeatother

\hypersetup{linktocpage}

%\newenvironment{sverbatim}
%{\par\footnotesize\verbatim}{\endverbatim}

%\newcommand\redpoint{\par\ifdim\lastskip>0pt\relax\vskip-\lastskip\fi
%\vskip\medskipamount\noindent
%  \makebox[\parindent][l]{\large\color{red}$\blacktriangleright$}}
%\newcommand\handpoint{\par\ifdim\lastskip>0pt\relax\vskip-\lastskip\fi
%\vskip\medskipamount\noindent
%  \makebox[\parindent][l]{\large\color{blue}\ding{042}}}
%\newcommand\newtopic{\par\ifdim\lastskip>0pt\relax\vskip-\lastskip\fi
%\vskip\medskipamount\noindent
%}

\def\cs#1{\texttt{\bslash#1}}
\def\Cs#1{\hyperlink{#1}{\cs{#1}}}
\def\tableCs#1{\hyperlink{table#1}{\cs{#1}}}
\def\targ#1#2?{\hypertarget{#2}{\bslash#2}#1}

\def\dps{$\mbox{$\mathfrak D$\kern-.3em\mbox{$\mathfrak P$}%
   \kern-.6em \hbox{$\mathcal S$}}$}

\def\eForm{\textsf{eForm}}


\def\OpenToHere{\OpenAction{\JS{this.gotoNamedDest("Here")}}}
\def\OpenHere{\hypertarget{Here}{\strut}}%\OpenToHere

\makeatletter
\let\web@copyright\@gobble
%\let\web@revision\@gobble
\renewcommand\webdirectory
{%
    \par\ifeqforpaper\else\minimumskip\fi\vspace{\stretch{1}}%
    \begin{flushleft}\textbf{\large\web@directory}%
    \vspace{-3pt}
    \begin{itemize}\setlength{\itemsep}{-3pt}%
        \bfseries
        \item \leavevmode\hyperlink{webtoc}{\web@toc}%
        \item \web@article
        \item[] \rule[2pt]{2.25in}{.4pt}
        \item \textsf{\href{apb_man.pdf}{APB}} Documentation
        \item \href{webeqman.pdf}{\AcroEB} Documentation
    \end{itemize}
    \end{flushleft}
}
%\renewcommand\titlepageTrailer
%{%
%    \web@copyright\ \copyright\ \webcopyrightyears\ \webversion
%        \hfill\url{http://www.acrotex.net}\\
%    \web@revision\ \@date \hfill\href{mailto:\webemail}{\webemail}
%}
\DesignTitlePageTrailer
{%
    ul=Copyright \copyright\ \webcopyrightyears,
    ur=\thewebemail,
    lr=\url{http://www.acrotex.net},
    ll={\web@revision\ \aeb@prepared},
    raise=-25pt
}

\makeatother

\newcounter{exampleno}
\def\theexampleno{\arabic{exampleno}}
\newcommand\Example{\refstepcounter{exampleno}%
\paragraph*{Example~\arabic{exampleno}.}}

\definecolor{aeb}{rgb}{0.24,0.38,0.68}%bleu
\universityColor{aeb}
\tocColor{aeb}

\everyCheckBox{\BC{.690 .769 .871}\BG{.941 1 .941}\textColor{1 0 0}}
\everyRadioButton{\BC{.690 .769 .871}\BG{.941 1 .941}\textColor{0 0 1}\symbolchoice{star}}

\reversemarginpar
\mlMarksOff

\chngDocObjectTo{\newDO}{doc}
\begin{docassembly}
var titleOfManual="The AeB eforms MANUAL";
var manualfilename="Manual_BG_Print_eforms.pdf";
var manualtemplate="Manual_BG_Blue.pdf"; // Blue, Green, Brown
var _pathToBlank="C:/Users/Public/Documents/ManualBGs/"+manualtemplate;
var doc;
var buildIt=false;
if ( buildIt ) {
    console.println("Creating new " + manualfilename + " file.");
    doc = \appopenDoc({cPath: _pathToBlank, bHidden: true});
    var _path=this.path;
    var pos=_path.lastIndexOf("/");
    _path=_path.substring(0,pos)+"/"+manualfilename;
    \docSaveAs\newDO({ cPath: _path });
    doc.closeDoc();
    doc = \appopenDoc({cPath: manualfilename, oDoc:this, bHidden: true});
    f=doc.getField("ManualTitle");
    f.value=titleOfManual;
    doc.flattenPages();
    \docSaveAs\newDO({ cPath: manualfilename });
    doc.closeDoc();
} else {
    console.println("Using the current "+manualfilename+" file.");
}
var _path=this.path;
var pos=_path.lastIndexOf("/");
_path=_path.substring(0,pos)+"/"+manualfilename;
\addWatermarkFromFile({
    bOnTop:false,
    bOnPrint:false,
    cDIPath:_path
});
this.removeField("topstxtR");
this.removeField("pbDemoR");
\executeSave();
\end{docassembly}
\begin{document}

\maketitle

\pdfbookmarkx[1]{Title Page}[action={\Named{FirstPage}}]{TitlePage}
\pdfbookmarkx[1]{AeB Manual}[action={\GoToR/F(aeb_man.pdf)/D[0 /Fit]},color=blue,style={bf}]{AEB}
\pdfbookmarkx[1]{Links to AcroTeX.Net}[action={/S/GoTo/D(undefined)},%
  color=magenta,style={bf}]{acrotex}
\belowpdfbookmarkx{http://www.acrotex.net}[action={\URI{http://www.acrotex.net}},%
  color=magenta,style={bf}]{home}
\belowpdfbookmarkx{http://blog.acrotex.net}[action={\URI{http://blog.acrotex.net}},%
  color=magenta,style={bf}]{blog}

\selectColors{linkColor=black}

\tableofcontents

\selectColors{linkColor=webgreen}

\part{PDF Links and Forms}

%\section{Introduction}

In \hypertarget{eformsPkg}{this} document we describe the support for \app{Acrobat} form elements
in an {\cAcroT} document. The \textit{PDF Reference} indicates there
are four different categories of fields for a total of seven types
of fields.
\begin{questions}

\setbox0=\hbox{(d)}
\def\I#1{\makebox[\wd0]{\color{blue}(\hfil#1\hfil)}\ }

    \item \textbf{Button Fields}
        \begin{description}
            \item[\I{a}] \textbf{Push Button}
            \item[\I{b}] \textbf{Check Box}
            \item[\I{c}] \textbf{Radio Button}
        \end{description}
    \item \textbf{Choice Fields}
        \begin{description}
            \item[\I{a}] \textbf{List Box}
            \item[\I{b}] \textbf{Combo Box}
        \end{description}
    \item \textbf{Text Fields}
    \item \textbf{Signature Fields}

\end{questions}
The {\cAcroB} now supports \textit{signature fields}. Using the
command \cs{sigField}, an unsigned signature field is created.
The field can be signed, either by using \app{Acrobat}, or programmatically
from a {\LaTeX} source, but you need to use \textsf{aeb\_pro} and to
create the PDF using \app{Acrobat} Distiller.

The \textsf{hyperref} Package (Rahtz, Oberdiek \textit{et al})
provides support for the same set of form fields; however, not all
features of these fields can be accessed through the
\textsf{hyperref} commands.  I was determined to write my own set
of commands which would be sufficiently comprehensive and
extendable to suit all the needs of the \cAcroB.  All the quiz
environments have been modified to use this new set of form
commands, in this way, there is a uniform treatment of all form
fields in the \cAcroB.

\redpoint The demo files for {\eForm} support are
\texttt{eqform.tex}, for those using the \textsf{\app{Acrobat}
Distiller} to create a PDF document, and \texttt{eqform\_pd.tex},
for those who use \textsf{pdftex} or \textsf{dvipdfm}.

\newtopic\textbf{\textcolor{red}{Online Resources:}} The following online
resources are recommended:
\begin{itemize}
  \item \href{https://developer.mozilla.org/en/JavaScript}{Core JavaScript Reference} at
  Mozilla Developer Center.
  \item \href{http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/wwhelp/wwhimpl/js/html/wwhelp.htm?&accessible=true}
  {\emph{JavaScript for \app{Acrobat} API Reference}} at the \app{Acrobat} Developer Center. In the navigation panel
  on the left, select JavaScript.
  \item \href{\urlAcroTeXBlog/?cat=5}{PDF Blog},
  by D. P. Story.
  \item \href{\urlAcroTeXBlog/?cat=24}{AeB Blog},
  by D. P. Story.
\end{itemize}

\section{Package Requirement and Options}

Prior to \textsf{Exerquiz} version 5.9, \textsf{eforms} was
an integral part of \textsf{Exerquiz}. I've now separated the two, making
\textsf{eforms} into a stand-alone package that is called by
\textsf{Exerquiz}.

\subsection{Package Requirements}

The \textsf{eforms} package requires \textsf{hyperref} (a newer version)
and \textsf{insdljs}, a package that is part of the {\cAcroB}.

\subsection{Package Options}

The \textsf{eforms} package has the usual driver options:
\begin{Verbatim}[xleftmargin=\amtIndent]
dvipsone, dvips, pdftex, dvipdfm, dvipdfmx, xetex
\end{Verbatim}
The package also works correctly with the \textsf{luatex} executable.
Informing the package what driver you are using is important, because each
driver has its own code that needs to be used to create form fields. For
dvips, you should use
\begin{Verbatim}[xleftmargin=\amtIndent]
\usepackage[dvips]{eforms}
\end{Verbatim}
The \textsf{eforms} package now does automatic detection of
\textsf{pdftex} (including luatex) and \textsf{xetex}. If the \textsf{web}
or \textsf{exerquiz} package is used, \textsf{eforms} will use the driver
defined in these earlier included packages.

\newtopic A minimal document is
\begin{Verbatim}[xleftmargin=\amtIndent,commandchars={!()}]
\documentclass{article}
\usepackage{eforms}  % <--!uif( the driver is pdftex, lualatex, or xetex)
\begin{document}
    %!uif( Content containing form fields, such as!dots)
    Don't \pushButton[\CA{Push Me}]{myButton}{}{12bp},
    I fall down easily.
\end{document}
\end{Verbatim}
\noindent The \textsf{eforms} package brings in the \textsf{hyperref} package
and passes it the driver, so there is no need to specify
\textsf{hyperref}, usually. If you wish to introduce \textsf{hyperref}
yourself with specific options, place it before \textsf{eforms}.

If you use the \textsf{exerquiz} package, \textsf{exerquiz} brings in the
\textsf{eforms} package and passes the driver to it.

\subsection{The \texttt{preview} option}

%Use the \texttt{preview} option if you use a \texttt{dvi} previewer
%to view your document.

When the \opt{preview} option is taken, a frame box is drawn around any form
field created by \pkg{eforms}, making the position of the field visible in
the DVI previewer or {\PDF} viewer. Being see to view the position on a form
element enables you to determine whether any additional adjustments are
needed to the position of the field. \emph{Turn off this option} when you build the
final version of your {\PDF} file.

This option was originally developed for those using a DVI previewer, it is
also useful for those using PDF creators \app{pdflatex}, \app{xelatex}, or
\app{lualatex}. Modern {\LaTeX} users employ quicker {\PDF} viewers such as \app{sumatraPDF} or
\app{PDF-Exchange}; these PDF viewers do not create form appearances as \app{Adobe Reader} and \app{Acrobat}
do; consequently, an outline of the positions of the fields is most welcome.

The \texttt{preview} option just sets a switch (\cs{ifpreview}\FmtMP{\cs{ifpreview}}), which can conveniently be
turned off and on using the commands \cs{previewOn}\FmtMP{\cs{previewOn}} and \cs{previewOff}
within the document itself. Related to \cs{previewOn} and \cs{previewOff}\FmtMP{\cs{previewOff}} is
the command \cs{pmpvOn} (poor man's preview), covered in the next paragraph.

\paragraph*{Poor man's preview.}\label{para:pmpv}

The \cs{pushButton} command of \pkg{eforms} produces a push
button;\footnote{Push buttons are covered in Section~\ref{s:BtnFlds}, beginning on
page~\pageref{ss:Pbs}.} a common key to use is the \cs{CA} key, the
value of which captions the button. As a companion to \cs{previewOn},
\pkg{eforms} defines \cs{pmpvOn}\FmtMP{\cs{pmpvOn}} and
\cs{pmpvOff}\FmtMP{\cs{pmpvOff}}; when \cs{previewOn} is in effect,
expanding \cs{pmpvOn} causes the value of the \cs{CA} key to be typeset into
the {\pb} preview; for example,\bgroup\makeatletter
\def\@PMPV{Push Me}\settowidth{\@tempdima}{\,Push Me\,}\edef\x{\the\@tempdima}%
\def\1{\makebox[0pt][l]{\hskip\linewidth\makebox[0pt][r]
{\previewOff\pmpvOff\pushButton[\autoCenter{n}\CA{Push Me}]{pbDemoL}{}{13bp}\quad
  \previewOn\pmpvOn\pushButton[\autoCenter{n}\CA{Push Me}]{pbDemoR}{}{13bp}\hspace{40pt}}}}%\ef@Bbox{\x}{13bp}
\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars=!()]
!1\pushButton[\CA{Push Me}]{pbDemo}{}{13bp}
\end{Verbatim}
The button on the left is the normal appearance of the push button after
\app{Reader/Acrobat} has supplied its appearance, the ``button'' on the right
is how the button would appear in \app{sumatraPDF}, for example, just after
{\PDF} creation using \app{pdflatex}, \app{xelatex}, or \app{lualatex}, or in
a DVI previewer after latexing.\egroup

There are `poor man's previews' for other fields that support a \cs{V} or
\cs{CA} key (push buttons, text fields, list boxes, combo boxes, check boxes
and radio button fields). In each case, the argument of the key is
\emph{typeset into the document} beneath the field when \cs{pmpvOn} is
expanded prior. The arguments of \cs{V} and \cs{CA} recognize a local command
\cs{tops}\FmtMP{\cs{tops}} (\cs{textorpdfstring}) to offer an alternate
string that is typeset:
\begin{quote}
\textField[\V{\tops{preview value}{real value}}]{topstxtL}{1.5in}{13bp}\quad\previewOn\pmpvOn
\textField[\V{\tops{preview value}{real value}}]{topstxtR}{1.5in}{13bp}\\[6bp]\small
\verb|\textField[\V{\tops{preview value}{display value}}|\\
\null\qquad\verb|\DV{real value}]{topstxt}{1.5in}{13bp}|
\end{quote}
The field on the left shows how the text field actually appears
within \app{Adobe Reader}, and the rectangle on the right is how
that same field appears in a non-conforming PDF reader, such as
\app{sumatraPDF}. The alias \cs{tops} should only be used within
the \cs{V} and \cs{CA} keys.

For check box and radio button fields, the \cs{tops} command is not supported
within the \cs{V} key. For these types of fields, the value key is typically
a mark: a check, an cross, a star, and so on. The \pkg{eforms} package defines the
declarative command \cs{pmpvMrk\darg{\ameta{mrk}}} that takes one argument \ameta{mrk}, the (preview) mark
to be used. The package declares \verb|\pmpvMrk{X}|, another good choice is
\verb|\pmpvMrk{$\checkmark$}|.

In the modern era of {\LaTeX}, it is customary by some to use
\app{sumatraPDF} or some other {\PDF} viewer during development; however, you
should always open your final {\PDF} (which was built with
\cs{previewOff}\cs{pmpvOff}) in \app{Adobe Reader DC} (or in \app{Acrobat}),
save it to obtain the correct appearances of the fields placed in the
document.


\subsection{The \texttt{useui} option}

The \texttt{useui} option includes the \textsf{xkeyval} package, and
defines a number of key-value pairs that are used in the optional
arguments of the form fields and links. These key-value pairs are
more ``user-friendly'' to use. See
\hyperref[useui]{Section~\ref*{useui}}, page~\pageref*{useui}, for a
description of these key-value pairs.

\subsection{The \texttt{unicode} option of \textsf{hyperref}}

The \textsf{eforms} package will obey the \texttt{unicode} option of
\textsf{hyperref}. Whenever this option is taken in hyperref, for
certain keys (namely, \cs{V}, \cs{DV}, \cs{TU}, \cs{CA}, \cs{RC}, and
\cs{AC}), standard latex markup may be used to enter the values of
these keys, for example, in a text field, you might set
\verb!\V{J\"{u}rgen}!. This key-value pair will produce a field
value of ``J\"{u}rgen'' in that text field.


\section{Form Fields}

The \texttt{eforms} support for {\eForm} defines seven basic (and internal)
commands for creating the seven types of form elements. These seven are used
as ``building blocks'' for defining all buttons, check boxes, radio buttons
and text fields used in the \texttt{exerquiz} quizzes; and for defining seven
user-commands: \cs{listBox}, \cs{comboBox}, \cs{pushButton}, \cs{checkBox},
\cs{radioButton}, \cs{textField}, and \cs{sigField}. These user commands are
the topic of the subsequent sections.

Each of the above listed field commands has an optional first
parameter that is used to modify the appearance of the field,
and/or to add actions to the field.  This is a ``local''
capability, i.e., a way of modifying an individual field. There is
also a ``global'' mechanism. Each field type has its own
\cs{every\anglemeta{FieldTypeName}} command. For example, all buttons
created by \cs{pushButton}  can be modified using the
\cs{everyPushButton} command. See the sections on
\nameref{CheckBoxes} and \nameref{RadioButtons} for examples and
additional comments.

\redpoint The local modifications (the ones inserted into the
field by the first parameter) are read \textit{after} the global
modifications, in this way, the local modifications overwrite the
global ones.

\paragraph*{Key-value Pairs.} The optional first parameter of each of the form and link commands take
two styles of key-values:
\begin{enumerate}
    \item \textsf{eforms} KVP: This is the key-value system originally developed, each KVP has the form
        \cs{\anglemeta{key}\darg{\meta{val}}}. Through these keys, you can set the appearance of a form or link, and
        set the actions as well.

     \item[] The \cs{presets} key is useful for developing collections of pre-defined
        key-value pairs for insertion into the optional parameter list. For example,
\begin{Verbatim}[xleftmargin=\amtIndent]
\def\myFavFive{%
    \BC{1 0 0}\BG{0 1 0}\textColor{1 0 0}\Q{2}\CA{Push Me}}
\end{Verbatim}
Later, a button can be created using these preset values:
\begin{Verbatim}[xleftmargin=\amtIndent]
\pushButton[\presets{\myFavFive}
    \A{\JS{app.alert("AcroTeX rocks!")}}]{pb1}{}{11bp}
\end{Verbatim}

    \item[] The \textsf{eforms} KVP system is explained throughout the manual, a complete listing
    of all supported KVPs is found in the \hyperref[appendix]{Appendices}, page~\pageref{appendix}.

    \item \textsf{xkeyval} KVP: When the \texttt{useui} option is taken, key-value pairs are
        defined of the form \texttt{\anglemeta{key}[=\anglemeta{value}]}. The key-value pairs are actually a value of
        a special \textsf{eforms} key, \cs{ui}. The value of \cs{ui} consists of a comma-delimited list of
        \textsf{xkeyval} key-value pairs.

    \item[] This style of key-value pairs also has
        a \texttt{presets} key, useful for developing collections of pre-defined
        key-value pairs for insertion into the optional parameter list. For example,
\begin{Verbatim}[xleftmargin=\amtIndent]
\def\myFavFive{%
    bordercolor={1 0 0},bgcolor={0 1 0},
    textcolor={1 0 0},align={right},uptxt={Push Me}}
\end{Verbatim}
Later, a button can be created using these preset values:
\begin{Verbatim}[xleftmargin=\amtIndent]
\pushButton[\ui{presets=\myFavFive,
    js={app.alert("AcroTeX rocks!")}}]{pb1}{}{11bp}
\end{Verbatim}

    \item[] The \textsf{xkeyval} KVP system is described in \mlNameref{useui}.

\end{enumerate}
\redpoint The first (optional) parameter is read in first, but only after ``sanitizing'' certain
characters that have special meaning to {\LaTeX}, these are \texttt{\string~}, \texttt{\#},
and \texttt{\&}; each of these may appear as part of a URL, or may appear in JavaScript code.
Within the first parameter, these three character can be used freely, without escaping them.

\subsection{Button Fields}\label{s:BtnFlds}

Buttons are form elements that the user interacts with using only a
mouse. There are three types of buttons: push buttons, check boxes
and radio buttons.

\subsubsection{Push Buttons}\label{ss:Pbs}

The push button is a button field that has no
value, it is neither on nor off. Generally, push buttons are used
to initiate some action, such as JavaScript action.

%\settowidth{\aebdimen}{\cs{pushButton[\#1]\darg{\#2}\darg{\#3}\darg{\#4}}}
\bVerb\takeMeasure{\string\cs{pushButton[\#1]\darg{\#2}\darg{\#3}\darg{\#4}}}%
\begin{dCmd}[commandchars=!()]{\bxSize}
\pushButton[#1]{#2}{#3}{#4}
\end{dCmd}
\endgroup
\PD
\begin{enumerate}
\item[\texttt{\#1}:] optional, used to enter any modification of appearance/actions
\item[\texttt{\#2}:] the title of the button field
\item[\texttt{\#3}:] the width of the bounding rectangle
\item[\texttt{\#4}:] the height of the bounding rectangle
\end{enumerate}

\paragraph*{Default Appearance:} The default appearance of
a push button is determined by the following:
\begin{Verbatim}[xleftmargin=\amtIndent]
\W{1}\S{B}\F{\FPrint}\BC{0 0 0}
\H{P}\BG{.7529 .7529 .7529}
\end{Verbatim}

\paragraph*{Key Variables:} The first (optional) parameter can be
used to modify the default appearance of a button field and to add
some actions. Following is a list of the variables used within the
brackets of this optional argument for the pushbutton: \tableCs{Ff},
\tableCs{F}, \Cs{H}, \Cs{TU}, \Cs{W}, \Cs{S}, \Cs{R}, \Cs{BC},
\Cs{BG}, \Cs{CA}, \Cs{RC}, \Cs{AC}, \Cs{mkIns}, \Cs{textFont},
\Cs{textSize}, \Cs{textColor}, \Cs{A}, \Cs{AA} and \Cs{rawPDF}.
See the \hyperlink{kv}{Support Key Variables} table for
descriptions and notes on each of these variables.

\handpoint If the \textit{width} argument (\texttt{\#3}) is left
empty, the {\LaTeX} code attempts to determine the appropriate
width based on the width of the text given by \Cs{CA}, \Cs{RC} and
\Cs{AC}. See \textbf{Example~2}, below.

\paragraph*{Global Modification:} \cs{everyPushButton\darg{\anglemeta{KV-pairs}}}

\Example This example resets all forms in this document:
    \pushButton[\CA{Push}\AC{Me}\RC{Reset}\A{/S/ResetForm}]{myButton}{36bp}{12bp}
\begin{Verbatim}[xleftmargin=\amtIndent]
\pushButton[\CA{Push}\AC{Me}\RC{Reset}\A{/S/ResetForm}]
    {myButton}{36bp}{12bp}
\end{Verbatim}

\Example Button with empty \textit{width} argument:
    \pushButton[\CA{Push}\AC{Me}\RC{Reset}\A{/S/ResetForm}]{myButton}{}{12bp}
\begin{Verbatim}[xleftmargin=\amtIndent]
\pushButton[\CA{Push}\AC{Me}\RC{Reset}\A{/S/ResetForm}]
    {myButton}{}{12bp}
\end{Verbatim}
Refer to the \pkg{icon-appr} package to supply icon appearances to push buttons created by
the \pkg{eforms} package.

\subsubsection{Check Boxes}\label{CheckBoxes}

A check box is a type of button that has one of two values,
``off'' or ``on''.  The value of the field when the field is
``off'' is \texttt{Off}; the value of the ``on'' state can be
defined by the user.

%\settowidth{\aebdimen}{\cs{checkBox[\#1]\darg{\#2}\darg{\#3}\darg{\#4}\darg{\#5}}}
\bVerb\takeMeasure{\cs{checkBox[\#1]\darg{\#2}\darg{\#3}\darg{\#4}\darg{\#5}}}
\begin{dCmd}{\bxSize}
\checkBox[#1]{#2}{#3}{#4}{#5}
\end{dCmd}
\endgroup
\PD
\begin{enumerate}
\item[\texttt{\#1}:] optional, used to enter any modification of appearance/actions
\item[\texttt{\#2}:] the title of the check box button
\item[\texttt{\#3}:] the width of the bounding rectangle
\item[\texttt{\#4}:] the height of the bounding rectangle
\item[\texttt{\#5}:] the name of the ``on'' state (the export value)
\end{enumerate}

\paragraph*{Default Appearance:} The default appearance of
a standard check box is determined by the following:
\begin{Verbatim}[xleftmargin=\amtIndent]
\W{1}\S{S}\BC{0 0 0}\F{\FPrint}
\end{Verbatim}

\paragraph*{Key Variables:} The first (optional) parameter can be
used to modify the default appearance of a check box and to add
some actions. Following is a list of the variables used within the
brackets of this optional argument for the check box: \tableCs{Ff},
\tableCs{F}, \Cs{TU}, \Cs{W}, \Cs{S}, \Cs{MK}, \Cs{DA}, \Cs{AP},
\Cs{AS}, \Cs{R}, \Cs{textFont}, \Cs{textSize}, \Cs{textColor},
\Cs{DV}, \Cs{V}, \Cs{A}, \Cs{AA} and \Cs{rawPDF}. See the
\hyperlink{kv}{Supported Key Variables} table for descriptions and
notes on each of these variables.

\paragraph*{Global Modification:} \cs{everyCheckBox\darg{\anglemeta{KV-pairs}}}

\Example  Are you married? Yes: \checkBox[\symbolchoice{circle}]{myCheck}{10bp}{10bp}{On}
\begin{Verbatim}[xleftmargin=\amtIndent]
\checkBox[\symbolchoice{circle}]{myCheck}{10bp}{10bp}{On}
\end{Verbatim}
\noindent In the example, the appearance of this check box was
modified through the global modification scheme. The following
command appears in the preamble of this document:
\begin{Verbatim}[xleftmargin=\amtIndent]
\everyCheckBox{
    \BC{.690 .769 .871}     % border color
    \BG{.941 1 .941}        % background color
    \textColor{1 0 0}       % text color
}
\end{Verbatim}
Refer to the \pkg{icon-appr} package to supply icon appearances to checkbox buttons created by
the \pkg{eforms} package.


\subsubsection{Radio Buttons}\label{RadioButtons}

A radio button field is similar to a check box, but is meant to be
used in unison with one or more additional radio buttons.

%\settowidth{\aebdimen}{\cs{radioButton[\#1]\darg{\#2}\darg{\#3}\darg{\#4}\darg{\#5}}}
\bVerb\takeMeasure{\cs{radioButton[\#1]\darg{\#2}\darg{\#3}\darg{\#4}\darg{\#5}}}
\begin{dCmd}{{\bxSize}}
\radioButton[#1]{#2}{#3}{#4}{#5}
\end{dCmd}
\endgroup
\PD
\begin{enumerate}
\item[\texttt{\#1}:] optional, used to enter any modification of appearance/actions
\item[\texttt{\#2}:] the title of the radio button
\item[\texttt{\#3}:] the width of the bounding rectangle
\item[\texttt{\#4}:] the height of the bounding rectangle
\item[\texttt{\#5}:] the name of the ``on'' state (the export value)
\end{enumerate}
\redpoint A collection of radio buttons meant to be used in unison
need to all have the same title (parameter~\texttt{\#2}) but
different export values (parameter~\texttt{\#5)}.

\paragraph*{Default Appearance:} The default appearance of
a standard radio button is determined by the following:
\begin{Verbatim}[xleftmargin=\amtIndent]
\W{1}\S{S}\BC{0 0 0}\F{\FPrint}
\end{Verbatim}

\paragraph*{Key Variables:} The first (optional) parameter can be
used to modify the default appearance of a radio button and to add
some actions. Following is a list of the variables used within the
brackets of this optional argument for the radio button: \tableCs{Ff},
\tableCs{F}, \Cs{TU}, \Cs{W}, \Cs{S}, \Cs{MK}, \Cs{DA}, \Cs{AP},
\Cs{AS}, \Cs{R}, \Cs{textFont}, \Cs{textSize}, \Cs{textColor},
\Cs{DV}, \Cs{V}, \Cs{A}, \Cs{AA} and \Cs{rawPDF}. See the
\hyperlink{kv}{Supported Key Variables} table for descriptions and
notes on each of these variables.

%\redpoint \cs{Ff} \textbf{Field flags.}  The values
%{250606175054} appropriate to a radio button are \Cs{FfNoToggleToOff} (if set,
%one radio button must be set at all times) and
%\Cs{FfRadiosInUnison} (if set, radio buttons with the same value
%will be turned on or off in unison, PDF 1.5).

\paragraph*{Global Modification:} \cs{everyRadioButton\darg{\anglemeta{KV-pairs}}}

\Example What is your gender? Male: \radioButton{myRadio}{10bp}{10bp}{Male} %[\Ff{\FfNoToggleToOff}]
    Female: \radioButton{myRadio}{10bp}{10bp}{Female}
    Neither: \radioButton[\A{\JS{app.alert("You can't be 'neither'! I'm resetting the field, guess again!");\r
    this.resetForm(["myRadio"])}}]{myRadio}{10bp}{10bp}{Neither}

\begin{Verbatim}[xleftmargin=\amtIndent]
Male: \radioButton{myRadio}{10bp}{10bp}{Male}
Female: \radioButton{myRadio}{10bp}{10bp}{Female}
Neither: \radioButton[\A{\JS{app.alert("You can't be 'neither'!
    I'm resetting the field, guess again!");\r
    this.resetForm(["myRadio"])}}]{myRadio}{10bp}{10bp}{Neither}
\end{Verbatim}
\noindent In the example, the appearance of these radio button fields was
modified through the global modification scheme. The following
command appears in the preamble of this document:
\begin{Verbatim}[xleftmargin=\amtIndent]
\everyRadioButton{
    \BC{.690 .769 .871}     % border color
    \BG{.941 1 .941}        % background color
    \textColor{0 0 1}       % text color
    \symbolchoice{star}     % check symbol
}
\end{Verbatim}
Refer to the \pkg{icon-appr} package to supply icon appearances to radio button fields created by
the \pkg{eforms} package.

\subsection{Choice Fields}

A choice field is a list of text items, one or more of which can
be selected by the user.

\subsubsection{List Boxes}

A scrollable list box is a type of choice field in which several
of the choices are visible in a rectangle.  A scroll bar becomes
available if any of the items in the list are not visible in the
rectangle provided.

%\settowidth{\aebdimen}{\cs{listBox[\#1]\darg{\#2}\darg{\#3}\darg{\#4}\darg{\#5}}}
\bVerb\takeMeasure{\cs{listBox[\#1]\darg{\#2}\darg{\#3}\darg{\#4}\darg{\#5}}}%
\begin{dCmd}{\bxSize}
\listBox[#1]{#2}{#3}{#4}{#5}
\end{dCmd}
\endgroup
\PD
\begin{enumerate}
\item[\texttt{\#1}:] optional, used to enter any modification of appearance/actions
\item[\texttt{\#2}:] the title of the list box
\item[\texttt{\#3}:] the width of the bounding rectangle
\item[\texttt{\#4}:] the height of the bounding rectangle
\item[\texttt{\#5}:] an array of appearance/values of list.
\end{enumerate}
\newtopic The fifth parameter needs more explanation. The value of this
parameter which defines the items in the list---their appearance
text and their export values---take two forms:
\begin{questions}
    \item An array of arrays:
\begin{Verbatim}[xleftmargin=\amtIndent]
[(v1)(item1)][(v2)(item2)]...[(vn)(itemn)]
\end{Verbatim}
        The first entry in the two member array is the export value of the item, the second
        is the appearance text of that item.
    \item An array of strings:
\begin{Verbatim}[xleftmargin=\amtIndent]
(item1)(item2)...(itemn)
\end{Verbatim}
        In this case, the export value is the same as the appearance text.
\end{questions}

\paragraph*{Default Appearance:} The default appearance of
a standard list box is determined by the following:
\begin{Verbatim}[xleftmargin=\amtIndent]
\W{1}\S{I}\F{\FPrint}\BC{0 0 0}
\end{Verbatim}

\paragraph*{Key Variables:} The first (optional) parameter can be
used to modify the default appearance of a list and to add some
actions. Following is a list of the variables used within the
brackets of this optional argument for the list box: \tableCs{Ff},
\tableCs{F}, \Cs{TU}, \Cs{W}, \Cs{S}, \Cs{R}, \Cs{BC}, \Cs{BG},
\Cs{mkIns}, \Cs{textFont}, \Cs{textSize}, \Cs{textColor}, \Cs{DV},
\Cs{V}, \Cs{A} and \Cs{AA}. See the \hyperlink{kv}{Supported Key
Variables} table for descriptions and notes on each of these
variables.

\redpoint \cs{Ff} \textbf{Field flags.} Values appropriate to a
list box are \Cs{FfCommitOnSelChange} (commits
immediately after selection, PDF 1.5); \Cs{FfSort} (sorts\footnote
{This flag really is not useful unless you have the full \app{Acrobat} application, the
\texttt{Sort} \texttt{items} check box is checked in the Options
tab of the Fields Properties dialog for the field.
Initially, the items are listed in the same order as listed in the
\texttt{\#5} argument; the \app{Acrobat} application will sort the list
if you view the \textit{Fields Properties} for the field and click
\texttt{OK}. Be sure to save the changes.\label{FfSortfoot}}the
items); \Cs{FfMultiSelect} (allows more than one value to be
selected, PDF 1.4). It is important to note
that the flags \Cs{FfMultiSelect} and \Cs{FfCommitOnSelChange}
cannot both be in effect. See the \hyperref[appendix]{Appendix}
for a complete list of values for the
\hyperlink{tableFf}{\textsf{Ff} flag}.

\paragraph*{Global Modification:} \cs{everyListBox\darg{\anglemeta{KV-pairs}}}

\Example List Box (Version 5.0 Required):
\hfill\smash[b]{\raisebox{-45bp}{\listBox[\autoCenter{n}\DV{1}\V{1}\BG{0.98 0.92 0.73}\BC{0 .6 0}
  \Ff\FfSort
  \AA{\AAKeystroke{%
    if(!event.willCommit)app.alert(%
      "You chose \\"" + event.change\r
      + "\\""+", which has an export value of "
      + event.changeEx);}}]
      {myList}{1in}{55bp}{[(1)(Socks)][(2)(Shoes)][(3)(Pants)][(4)(Shirt)][(5)(Tie)]}}}
\begin{Verbatim}[xleftmargin=\amtIndent]
\listBox[\autoCenter{n}\DV{1}\V{1}
  \BG{0.98 0.92 0.73}\BC{0 .6 0}
  \AA{\AAKeystroke{%
    if(!event.willCommit)app.alert(%
      "You chose \\"" + event.change\r
      + "\\""+", which has an export value of "
      + event.changeEx);}}]{myList}{1in}{55bp}
      {[(1)(Socks)][(2)(Shoes)][(3)(Pants)][(4)(Shirt)][(5)(Tie)]}
\end{Verbatim}


\subsubsection{Combo Boxes}

A combo box is a drop down list of items that can optionally have
an editable text box for the user to type in a value other than
the predefined choices.

%\settowidth{\aebdimen}{\cs{comboBox[\#1]\darg{\#2}\darg{\#3}\darg{\#4}\darg{\#5}}}
\bVerb\takeMeasure{\cs{comboBox[\#1]\darg{\#2}\darg{\#3}\darg{\#4}\darg{\#5}}}%
\begin{dCmd}{\aebdimen+2\fboxsep+2\fboxrule}
\comboBox[#1]{#2}{#3}{#4}{#5}
\end{dCmd}
\endgroup
\PD
\begin{enumerate}
\item[\texttt{\#1}:] optional, used to enter any modification of appearance/actions
\item[\texttt{\#2}:] the title of the combo box
\item[\texttt{\#3}:] the width of the bounding rectangle
\item[\texttt{\#4}:] the height of the bounding rectangle
\item[\texttt{\#5}:] an array of appearance/values of list
\end{enumerate}
\newtopic The fifth parameter needs more explanation. The value of this
parameter which defines the items in the list---their appearance text
and their export values---take two forms:
\begin{questions}
    \item An array of arrays:
\begin{Verbatim}[xleftmargin=\amtIndent]
[(v1)(item1)][(v2)(item2)]...[(vn)(itemn)]
\end{Verbatim}
        The first entry in the two member array is the export value of the item, the second
        is the appearance text of that item.
    \item An array of strings:
\begin{Verbatim}[xleftmargin=\amtIndent]
(item1)(item2)...(itemn)
\end{Verbatim}
        In this case, the export value is the same as the appearance text.
\end{questions}

\paragraph*{Default Appearance:} The default appearance of
a standard combo box is determined by the following:
\begin{Verbatim}[xleftmargin=\amtIndent]
\W{1}\S{I}\F{\FPrint}\BC{0 0 0}
\end{Verbatim}

\paragraph*{Key Variables:} The first (optional) parameter can be
used to modify the default appearance of a list and to add some
actions. Following is a list of the variables used within the
brackets of this optional argument for the list box: \tableCs{Ff},
\tableCs{F}, \Cs{TU}, \Cs{W}, \Cs{S}, \Cs{R}, \Cs{BC}, \Cs{BG},
\Cs{mkIns}, \Cs{textFont}, \Cs{textSize}, \Cs{textColor}, \Cs{DV}
and \Cs{V}, \Cs{A} and \Cs{AA}. See the \hyperlink{kv}{Support Key
Variables} table for descriptions and notes on each of these
variables.

\redpoint \cs{Ff} \textbf{Field flags.} Values appropriate to a
combo box are \Cs{FfEdit} (allows the user to type in a choice);
\Cs{FfDoNotSpellCheck} (turn spell check off, applicable only if
\Cs{FfEdit} is set);
\Cs{FfCommitOnSelChange} (commits immediately after selection);
 and \Cs{FfSort} (sorts the
items, see~\hyperref[FfSortfoot]{footnote~\ref*{FfSortfoot}}, page~\pageref*{FfSortfoot}).
See the \hyperref[appendix]{Appendix} for a complete list of values
for the \hyperlink{tableFf}{\textsf{Ff} flag}.

\paragraph*{Global Modification:} \cs{everyComboBox\darg{\anglemeta{KV-pairs}}}

\begin{defineJS}{\getComboJS}
var f = this.getField("myCombo");
var a = f.currentValueIndices;
if ( a == -1 )
    app.alert("You've typed in \\"" + f.value +"\\".");
else
    app.alert("Selection: " + f.getItemAt(a, false)
        + " (export value: " + f.getItemAt(a, true)+").");
\end{defineJS}

\Example \label{defineJSEx} Editable combo box (Version 5.0):
    \comboBox[\Ff\FfEdit\DV{1}\V{1}\BG{0.98 0.92 0.73}\BC{0 .6 0}]
    {myCombo}{.8in}{11bp}{[(1)(Socks)][(2)(Shoes)][(3)(Pants)][(4)(Shirt)][(5)(Tie)]}\kern1bp%
    \pushButton[\BC{0 .6 0}\CA{Get}\RC{Combo}\AC{Box}\A{\JS{\getComboJS}}]
    {myComboButton}{33bp}{11bp}
\begin{Verbatim}[xleftmargin=\amtIndent]
\comboBox[\Ff\FfEdit\DV{1}\V{1}
\BG{0.98 0.92 0.73}\BC{0 .6 0}]{myCombo}{1in}{11bp}
{[(1)(Socks)][(2)(Shoes)][(3)(Pants)][(4)(Shirt)][(5)(Tie)]}\kern1bp%
% Follow up with a pushbutton
\pushButton[\BC{0 .6 0}\CA{Get}\AC{Combo}\RC{Box}\A{\JS{\getComboJS}}]
{myComboButton}{33bp}{11bp}
\end{Verbatim}
\newtopic The JavaScript action for the button is given below:
\begin{Verbatim}[xleftmargin=\amtIndent]
\begin{defineJS}{\getComboJS}
var f = this.getField("myCombo");
var a = f.currentValueIndices;
if ( a == -1 )
    app.alert("You've typed in \\"" + f.value +"\\".");
else
    app.alert("Selection: " + f.getItemAt(a, false)
        + " (export value: " + f.getItemAt(a, true)+").");
\end{defineJS}
\end{Verbatim}

\subsection{Text Fields}

A text field is the way a user can enter text into a form.

%\settowidth{\aebdimen}{\cs{textField[\#1]\darg{\#2}\darg{\#3}\darg{\#4}}}
\bVerb\takeMeasure{\cs{textField[\#1]\darg{\#2}\darg{\#3}\darg{\#4}}}%
\begin{dCmd}{\bxSize}
\textField[#1]{#2}{#3}{#4}
\end{dCmd}
\endgroup
\PD
\begin{enumerate}
\item[\texttt{\#1}:] optional, used to enter any modification of appearance/actions
\item[\texttt{\#2}:] the title of the text field
\item[\texttt{\#3}:] the width of the bounding rectangle
\item[\texttt{\#4}:] the height of the bounding rectangle
\end{enumerate}

\paragraph*{Default Appearance:} The default appearance of
a standard text field is determined by the following:
\begin{Verbatim}[xleftmargin=\amtIndent]
\F{\FPrint}\BC{0 0 0}\W{1}\S{S}
\end{Verbatim}

\paragraph*{Key Variables:} The first (optional) parameter can be
used to modify the default appearance of a text field and to add some
actions. Following is a list of the variables used within the
brackets of this optional argument for the text field: \tableCs{Ff},
\tableCs{F}, \Cs{TU}, \Cs{Q}, \Cs{W}, \Cs{S}, \Cs{MaxLen}, \Cs{R},
\Cs{BC}, \Cs{BG}, \Cs{mkIns}, \Cs{textFont}, \Cs{textSize},
\Cs{textColor}, \Cs{DV}, \Cs{V}, \Cs{A}, \Cs{AA} and \Cs{rawPDF}.
See the \hyperlink{kv}{Supported Key Variables} table for
descriptions and notes on each of these variables.

\redpoint \cs{Ff} \textbf{Field flags.}  There are several values
appropriate to a text field:\ \Cs{FfMultiline} (create a multiline
text field); \Cs{FfPassword} (create a password field);
\Cs{FfFileSelect} (select a file from the local hard drive as the
value of the text field, PDF 1.4); \Cs{FfComb} (if set, the text field
becomes a comb field, the number of combs is determined by the
value of \Cs{MaxLen}, PDF 1.5); \Cs{FfDoNotSpellCheck}
(automatic spell check is not performed, PDF 1.4);
\Cs{FfDoNotScroll} (disable the scrolling of long text, this
limits the amount of text that can be entered to the width of the
text field provided, PDF 1.4); \Cs{FfRichText} (allows rich text
to be entered into the text field, PDF 1.5).

\paragraph*{Global Modification:} \cs{everyTextField\darg{\anglemeta{KV-pairs}}}

\Example Enter Name:
    \textField
       [\BC{0 0 1}
        \BG{0.98 0.92 0.73}
        \textColor{1 0 0}
       ]{myText}{1.5in}{12bp}
\begin{Verbatim}[xleftmargin=\amtIndent]
\textField
    [\BC{0 0 1}\BG{0.98 0.92 0.73}
     \textColor{1 0 0}
    ]{myText}{1.5in}{12bp}
\end{Verbatim}


\Example An example of a calculation using a Calculate script. (Calculate works correctly
with drivers \texttt{dvips}, \texttt{dvipsone}, or \texttt{dvipdfm} are used.)

\newtopic\begin{tabular}{@{\hspace{20pt}}rl}
Number 1: & \textField[\AA{%
    \AAKeystroke{AFNumber_Keystroke(1,1,0,0,"",true)}
    \AAFormat{AFNumber_Format(1,1,0,0,"",true)}}]{num.1}{1in}{11bp} \\[6pt]
%
Number 2: & \textField[\AA{%
    \AAKeystroke{AFNumber_Keystroke(1,1,0,0,"",true)}
    \AAFormat{AFNumber_Format(1,1,0,0,"",true)}}]{num.2}{1in}{11bp}\\[6pt]
%
Total:    & \textField[\AA{%
    \AAKeystroke{AFNumber_Keystroke(1,1,0,0,"",true)}
    \AAFormat{AFNumber_Format(1,1,0,0,"",true)}
    \AACalculate{AFSimple_Calculate("SUM", new Array("num"))}
}]{totalNum}{1in}{11bp}
\end{tabular}

\newtopic The listing for this list of three text fields is\medskip
\begin{Verbatim}[xleftmargin=\amtIndent]
\textField[\AA{%
    \AAKeystroke{AFNumber_Keystroke(1,1,0,0,"",true)}
    \AAFormat{AFNumber_Format(1,1,0,0,"",true)}}
]{num.1}{1in}{11bp}
\textField[\AA{%
    \AAKeystroke{AFNumber_Keystroke(1,1,0,0,"",true)}
    \AAFormat{AFNumber_Format(1,1,0,0,"",true)}}
]{num.2}{1in}{11bp}
\textField[\AA{%
    \AAKeystroke{AFNumber_Keystroke(1,1,0,0,"",true)}
    \AAFormat{AFNumber_Format(1,1,0,0,"",true)}
    \AACalculate{AFSimple_Calculate("SUM", new Array("num"))}
]{sum}{1in}{11bp}
\end{Verbatim}

\subsection{Signature Fields}\label{sigfields}

A signature field is a field that can be digitally signed.

%\settowidth{\aebdimen}{\cs{sigField[\#1]\darg{\#2}\darg{\#3}\darg{\#4}}}
\bVerb\takeMeasure{\cs{sigField[\#1]\darg{\#2}\darg{\#3}\darg{\#4}}}%
\begin{dCmd}{\bxSize}
\sigField[#1]{#2}{#3}{#4}
\end{dCmd}
\endgroup
\PD
\begin{enumerate}
\item[\texttt{\#1}:] optional, used to enter any modification of appearance/actions
\item[\texttt{\#2}:] the title of the signature field
\item[\texttt{\#3}:] the width of the bounding rectangle
\item[\texttt{\#4}:] the height of the bounding rectangle
\end{enumerate}

\paragraph*{Default Appearance:} The default appearance of
a standard signature field is determined by the following:
\begin{Verbatim}[xleftmargin=\amtIndent]
\F{\FPrint}\BC{}\BG{}\W{1}\S{S}
\end{Verbatim}

\paragraph*{Key Variables:} The first (optional) parameter can be
used to modify the default appearance of a signature field and to add some
actions. Following is a list of the variables used within the
brackets of this optional argument for the signature field:
\tableCs{F}, \Cs{TU}, \Cs{W}, \Cs{S}, \Cs{R}, \Cs{Lock},
\Cs{BC}, \Cs{BG}, \Cs{mkIns}, \Cs{textFont}, \Cs{textSize},
\Cs{textColor}, \Cs{DV}, \Cs{A}, \Cs{AA} and \Cs{rawPDF}.
See the \hyperlink{kv}{Supported Key Variables} table for
descriptions and notes on each of these variables.

\paragraph*{Global Modification:} \cs{everySigField\darg{\anglemeta{KV-pairs}}}

\Example Sign here:\\[3pt]
    \sigField[\BC{0 0 0}]{mySig}{2in}{4\baselineskip}\hfill
    \begin{minipage}{\linewidth-2in-10bp}
    \verb!\sigField[\BC{0 0 0}]!\\
    \verb!  {mySig}{2in}{4\baselineskip}!
    \end{minipage}

\newtopic To sign this field, use the \app{Acrobat} user interface, or use the
package \textsf{aeb\_pro}, and the following \texttt{docassembly} code:

\begin{Verbatim}[xleftmargin=\amtIndent]
\begin{docassembly}
\signInfo{
    cSigFieldName: "mySig", ohandler: security.PPKLiteHandler,
    cert: "D_P_Story.pfx", password: "dps017",
    oInfo: { location: "Niceville, FL",
      reason: "I am approving this document",
      contactInfo: "dpstory@acrotex.net",
      appearance: "My Signature" }
};
\signatureSign
\end{docassembly}
\end{Verbatim}

\begin{itemize}
  \item \texttt{cSigFieldName} is the name of the field to be signed.
  \item \texttt{ohandler} is the name of the security handler to be
    used to sign the field, usually, this is \texttt{security.PPKLiteHandler};
    \texttt{security.PPKLiteHandler} is used if \texttt{ohandler} is not listed in the property list.
  \item \texttt{cert} is the name of the Digital ID certificate file to be used.
  The extension for this file is \texttt{.pfx} (Windows) and \texttt{.p12} (Mac OS).
  These files reside in the folder,
\begin{Verbatim}[xleftmargin=\amtIndent]
app.getPath( {cCategory:"user"})/Security
\end{Verbatim}
However, just enter the file name, such as \texttt{cert:} \texttt{"D\_P\_Story.pfx"}.
\item \texttt{password}: The Digital ID requires a password to access and to use.
For example: \texttt{password:} \texttt{"dps017"}.
\item \texttt{oInfo} is a JavaScript object with various properties to be filled in,
\texttt{location}, \texttt{reason}, \texttt{contactInfo}, and \texttt{appearance}.
The \texttt{appearance} is important, through it, you can choose a particular appearance
for the digital signature, including a custom signature that you've created. In the example
above, we have \texttt{appearance: "My Signature"}.  \texttt{My Signature} is the name I've
given a particular digital ID of mine. If the \texttt{appearance} property is not
included in \texttt{oInfo}, \app{Acrobat} will use the one named \texttt{"Standard Text"}.
\end{itemize}

\Important Additional information on signatures can be found
at the \mlhref{http://www.adobe.com/go/acrobat_developer}{\mbox{\app{Acrobat}} Developer Center};
or go to the \href{http://www.adobe.com/go/acrobat_security}{Security page};
in particular, see the document \textit{Digital Signature User Guide for \app{Acrobat} 9.0
and Adobe Reader 9.0}. Other comments on the topic of signature fields:
\begin{itemize}
\item The open key \cs{textSize} is recognized, but is change to 0.
\item The Signed tab of the Digital Signatures Properties dialog box, lists
an entry titled ``This script executes when the field is signed.'' This
JavaScript is implemented through the format script of the \texttt{AA} key.
Thus,
\begin{Verbatim}[xleftmargin=\amtIndent]
\AA{\AAFormat{console.println("Signed!");}}
\end{Verbatim}
places message in the console when the field is signed.

\item The \cs{Lock} key can be used to lock various fields when the document
is signed.
\begin{Verbatim}[xleftmargin=\amtIndent,numbers=left,commandchars=!()]
\Lock{/Action/All}
\Lock{/Action/IncludeFields{!ameta(field!SUB1),!ameta(field!SUB2),...}}
\Lock{/Action/ExcludeFields{!ameta(field!SUB1),!ameta(field!SUB2),...}}
\end{Verbatim}
\begin{itemize}
    \item In (1), all fields are locked when the signature field is signed.
    \item In (2), only the listed fields are locked when the signature
        field is signed.
    \item In (3), all fields, except the ones listed, are locked when the
        signature field is signed.
\end{itemize}
%The \texttt{/Fields} key is required when the action is either \texttt{/Include} or \texttt{/Exclude}.
\end{itemize}


\subsection{Obtaining a uniform look across all workflows}\label{s:efuniformWF}

In this section, several commands are
presented that help you layout {\PDF} forms, as created by \pkg{eforms}, in a
way that is consistent across all workflows (\app{dvips}/\penalty0
\app{Distiller}, \app{pdflatex}, \app{lualatex}, and \app{xelatex}).

\bVerb\takeMeasure{\string\makeXasPDOn\qquad\string\vcgBdry[\ameta{length}]}%
\settowidth{\aebdimen}{\cs{makeXasPDOn}}%
\def\1{\rlap{\ttfamily\hskip\aebdimen\qquad\string\cgBdry*[\ameta{length}]}}%
\def\2{\rlap{\ttfamily\hskip\aebdimen\qquad\string\vcgBdry[\ameta{length}]}}%
\def\3{\rlap{\hskip\linewidth\ding{182}}}
\def\4{\rlap{\hskip\linewidth\ding{183}}}
\def\5{\rlap{\hskip\linewidth\ding{184}}}
\def\6{\rlap{\hskip\linewidth\ding{185}}}
\def\7{\rlap{\hskip\linewidth\ding{186}}}
\xdef\panelWidth{\the\linewidth}%
\begin{dCmd}[commandchars=!()]{\bxSize}
!3\makeXasPDOn!qquad\makeXasPDOff
!4\makePDasXOn!qquad\makePDasXOff
!5!1\olBdry
!6!2\volBdry
!7\efKern{!ameta(length!SUB1)}{!ameta(length!SUB2)}
\end{dCmd}
\endgroup

\paragraph*{Matching dimensions of form fields.}
The form fields created by \app{xelatex} are smaller than the ones with the
same dimensions created the other {\PDF} creators (\app{pdflatex},
\app{lualatex}, or \app{dvips}/\penalty0\app{Distiller}). To obtain a uniform
look across all workflows, you can either increase the size of the
\app{xelatex} form fields, or decrease the size of the form fields created by
non-\app{xelatex} workflows. The first two lines of the display (\ding{182}
and \ding{183}) address the issue that different workflows produce different
sized form fields even though their dimensions are the same.
\begin{itemize}

    \item Expanding the command \cs{makeXasPDOn} increases the size of the
        form fields created by \app{xelatex} to make them the same size as
        those created by the other applications\app{pdflatex} or; while
        \cs{makeXasPDOff} turns off this feature, the fields created by
        \app{xelatex} are smaller than the ones otherwise created by the
        other workflows.

        The \pkg{eforms} package expands \cs{makeXasPDOn} as the default behavior.

    \item Expanding the command \cs{makePDasXOn} decreases the size of the
        created by non-\app{xelatex} workflows to make them the same size
        as those created by \app{xelatex}; while \cs{makeXasPDOff} turns
        off this feature, the fields created by non-\app{xelatex} workflows
        are larger than the ones created by \app{xelatex}.
\end{itemize}

\paragraph*{Setting the horizontal relationship between fields.} When one form field follows another
on the same line, the space between them becomes an issue. There are three
problems addressed in this paragraph:
\begin{itemize}
    \item You\FmtMP{\cs{olBdry} described, illustrated} want the two fields, which have the same border thickness
        (usually 1\,bp), to overlap borders, like so,
    \begin{quote} %\previewtrue
    \textField{txt1}{30bp}{10bp}\olBdry\textField{txt2}{30bp}{10bp}\\[3pt]
    \footnotesize\cs{textField\darg{txt1}\darg{30bp}\darg{10bp}}\textbf{\cs{olBdry}}\\
    \cs{textField\darg{txt2}\darg{30bp}\darg{10bp}}
    \end{quote}
    use the \cs{olBdry} command (\textbf{o}ver\textbf{l}ay
    \textbf{b}oun\textbf{d}a\textbf{ry}), as listed in line~\ding{184} in
    the display above. Overlapping the border lines is only useful if the
    border colors are the same.

%\promoteNewPage[\baselineskip]

    \item When\FmtMP{\cs{cgBdry} described, illustrated} the border colors
        are different, you can place neighboring fields contiguously. To
        make the field have contiguous border lines, use the \cs{cgBdry}
        command (\textbf{c}onti\textbf{g}uous
        \textbf{b}oun\textbf{d}a\textbf{ry}), as listed in line \ding{184}
        in the above display.
    \begin{aebQuote}
    \def\ci{red}\def\cii{blue}
    \textField[\BC{\ci}]{txt3}{30bp}{10bp}\cgBdry\textField[\BC{\cii}]{txt4}{30bp}{10bp}\\[3pt]
    \footnotesize\cs{textField[\string\BC\darg{\ci}]\darg{txt3}\darg{30bp}\darg{10bp}}\textbf{\cs{cgBdry}}\\
    \cs{textField[\string\BC\darg{\cii}]\darg{txt4}\darg{30bp}\darg{10bp}}
    \end{aebQuote}

    \item The\FmtMP{\cs{olBdry} continued} third case is where you want the field to be separated by a
        nonzero length, in this case, the optional first argument
        \cs{cgBdry[\ameta{length}]} is used; \cs{cgBdry} positions the two neighboring
        field contiguously, then moves the right-field \ameta{length} to the right.
    \begin{quote}
    \textField{txt5}{30bp}{10bp}\cgBdry[1in]\textField{txt6}{30bp}{10bp}\\[3pt]
    \footnotesize\cs{textField\darg{txt5}\darg{30bp}\darg{10bp}}\textbf{\cs{cgBdry[1in]}}\\
    \cs{textField\darg{txt6}\darg{30bp}\darg{10bp}}
    \end{quote}
    The two fields are separated by 1\,inch.
\end{itemize}

\paragraph*{Setting the vertical relationship between fields.} In a similar
manner, the space between two fields on consecutive lines may be precisely
controlled. Both \cs{volBdry} and \cs{vcgBdry} (line~\ding{185} in the
display) start a new paragraph. The \cs{volBdry}\FmtMP{\cs{volBdry}
described} command positions the two fields so that their borders exactly
overlap (assuming the same border width), while the \cs{vcgBdry} command
positions them so the borders are contiguous. The optional argument for
\cs{vcgBdry[\ameta{length}]}\FmtMP{\cs{vcgBdry} described} allows for a
separation of exactly \ameta{length}, assuming \cs{parskip} is 0\,pt.
\begin{quote}\def\ci{red}\def\cii{blue}
\settowidth\aebdimen{\footnotesize\ttfamily\ameta{field\SUB1}\cs{vcgBdry[6pt]}\ameta{field\SUB2}}\edef\widthi{\the\aebdimen}%
\def\1{\makebox[0pt][l]{\footnotesize\hskip\widthi\quad\vrbnormal(overlay borders)}}%
\def\2{\makebox[0pt][l]{\footnotesize\hskip\widthi\quad\vrbnormal(contiguous borders)}}%
\def\3{\makebox[0pt][l]{\footnotesize\hskip\widthi\quad\vrbnormal(6pt separation)}}%
\parbox{36pt}{\textField{txt7}{30bp}{10bp}\volBdry\textField{txt8}{30bp}{10bp}}\quad
\1\footnotesize\ameta{field\SUB1}\textbf{\cs{volBdry}}\ameta{field\SUB2}\\[6pt]
\parbox{36pt}{\textField[\BC{\ci}]{txt8}{30bp}{10bp}\vcgBdry
\textField[\BC{\cii}]{txt9}{30bp}{10bp}}\quad
\2\footnotesize\ameta{field\SUB1}\textbf{\cs{vcgBdry}}\ameta{field\SUB2}\\[6pt]
\parbox{36pt}{\textField{txt10}{30bp}{10bp}\vcgBdry[6pt]
\textField{txt11}{30bp}{10bp}}\quad
\3\footnotesize\ameta{field\SUB1}\textbf{\cs{vcgBdry[6pt]}}\ameta{field\SUB2}
\end{quote}
If \cs{parskip} is not 0\,pt, use the star form,
\cs{vcgBdry*[\ameta{length}]}\FmtMP{\cs{vcgBdry*} described}, on the last line of form fields; when the star
argument is present, \cs{vcgBdry} performs the subtraction
\texttt{\ameta{length}-\cs{parskip}}, in that way, there is exactly
\ameta{length} of vertical space between the last form field and the next paragraph.

%\begin{example}%\recordExample{eforms/positioning-fields.pdf}
%The commands of this section are illustrated in the sample file associated with the
%example.\noexskip\eqfititin{\exrtnlabelformat}
%\end{example}

\paragraph*{On the \cs{efKern} command.} The \cs{efKern}
command listed in above display, line~\ding{186}, is a general command that
can be used to induce driver-dependent spacing. It is designed to provide
spacing between fields and gives finer control over the ``intelligent'' and
automatic spacing provided by \cs{olBdry} and \cs{cgBdry}. When \emph{not
compiled} with the \texttt{xetex} option, \cs{efKern} expands to
\cs{kern\ameta{length\SUB1}}, and when \emph{compiled with} the
\texttt{xetex} option, \cs{efKern} expands to \cs{kern\ameta{length\SUB2}}.

\verygoodbreak


\section{Link Annotations}\label{linkAnnots}

The \textsf{eforms} package has several link commands that are
sufficiently general that they can be given arbitrary appearances,
and can perform a wide range of actions.

The borders of the link commands can be controlled through optional
parameter, their default appearance follow the same pattern of
hyperref: If the \texttt{colorlinks} option is used (in
\textsf{hyperref}) then the border is invisible by default;
otherwise, there is a visible border.

When the \texttt{colorlinks} option is chosen (in hyperref), the
link text is colored using the command \cs{defaultlinkcolor}, this
is a named color. \cs{defaultlinkcolor} has a definition of
\begin{Verbatim}[xleftmargin=\amtIndent]
\newcommand{\defaultlinkcolor}{\@linkcolor}
\end{Verbatim}
where \cs{@linkcolor} is a command defined in
\textsf{hyperref}, and is defined to be \texttt{red}. This can be
redefined as desired.\footnote{The {\Web} package redefines
\cs{@linkcolor} to be a flavor of green.}

The first link command is a general link for text, or any
{\LaTeX} content. It is used, for example, by the \textsf{aeb\_mlink}
package to create multiple-line links.

%\settowidth{\aebdimen}{\cs{setLinkText[\meta{options}]\darg{\meta{link\_text}}}}
\bVerb\takeMeasure{\cs{setLinkText[\meta{options}]\darg{\meta{link\_text}}}}%
\begin{dCmd}[commandchars=!()]{\bxSize}
\setLink[!meta(options)]{!meta(link_text)}
!grayV(\setLinkText[!meta(options)]{!meta(link_text)})
\end{dCmd}
\eVerb
Both link commands are the same, the use of the second one, \cs{setLinkText} (grayed out), is
discouraged in favor of the use of \cs{setLink}.

\PD The command has two arguments, the first is optional. The first
parameter takes key-value pairs to change appearance and define
actions. The default appearance of this link is \verb!\S{S}\Border{0 0 0}!,
an invisible yet solid border line. (The visibility of the border is
actually controlled by the \texttt{colorlinks} option of
\textsf{hyperref}, as explained above.) The second parameter is the
link text. This argument does not have to be text, it can be
anything that takes up space, such as a graphic or \cs{parbox}.

\Example \setLink[\A{\JS{app.alert("AcroTeX rocks!")}}
    \linktxtcolor{blue}\Color{0 0 1}\W1\S{U}\H{P}]{Push me!}
\bVerb\def\rB{]}\takeMeasure{\quad\string\linktxtcolor\darg{blue}\string\Color\darg{0 0 1}\string\W1\string\S\darg{U}\string\H\darg{P}\rB\darg{Push me!}}%
\begin{dCmd*}[commandchars={~@$}]{\bxSize}
\setLink[\A{\JS{app.alert("AcroTeX rocks!")}}
~quad\linktxtcolor{blue}\Color{0 0 1}\W1\S{U}\H{P}]{Push me!}
\end{dCmd*}
\endgroup

\exAeBBlogPDF{p=371} Additional examples of \cs{setLink} may be found in the
rather comprehensive article \textit{Support for Links in AeB/eForms},
\texttt{\href{\urlAcroTeXBlog/?p=371}{aeb\_links.pdf}}, found on the
{\AcroBlog} website.

\newtopic\indent The next link command is a convenience command to put the link content into a parbox,
the parameters enable you to set the width, height and position of material in the box.

%\settowidth{\aebdimen}{\cs{setLinkBbox[\meta{options}]\darg{\meta{width}}\darg{\meta{height}}}}
\bVerb\takeMeasure{\cs{setLinkBbox[\meta{options}]\darg{\meta{width}}\darg{\meta{height}}}}%
\begin{dCmd}[commandchars=!()]{\bxSize}
\setLinkBbox[!meta(options)]{!meta(width)}{!meta(height)}
!quad[!meta(position)]{!meta(link_content)}
\end{dCmd}
\endgroup
\PD The command has five arguments, the first is optional.
\begin{aebDescript}
\item [\meta{options}] are optional key-value pairs to change the appearance or action
 of this link.
\item [\meta{width}] is the width of the \cs{parbox}.
\item [\meta{height}] is the height of the \cs{parbox}.
\item [\meta{position}] is the positioning parameter of the \cs{parbox} (\texttt{b}, \texttt{c}, \texttt{t}).
\item [\meta{link\_content}] is the text or object to be enclosed in a \cs{parbox}
\end{aebDescript}

\Example \setLinkBbox[\W{1}\Color{1 0 0}\A{\JS{app.alert("Thank you for using AcroTeX!")}}]{50bp}{30bp}[c]{\centering Press Me!}
\bVerb\takeMeasure{\quad\string\A\darg{\string\JS\darg{app.alert("Thank you for using AcroTeX!")}}}%
\begin{dCmd*}[commandchars={~@$}]{\bxSize}
\setLinkBbox[\W{1}\Color{1 0 0}
~quad\A{\JS{app.alert("Thank you for using AcroTeX!")}}
]{50bp}{30bp}[c]{\centering Press Me!}
\end{dCmd*}
\endgroup

\section{Actions}\label{Actions}

A form field may simply gather data from the user; additionally,
it may perform one or more \textit{actions}. Actions include
execute JavaScript code, going to a particular page in a document,
open a file, execute a menu item, reset a form, play media or a
sound, and so on.  Beginning with \app{Acrobat}~5.0, most actions can be
performed using JavaScript methods.

An action is initiated by a \textit{trigger}, a field may have
many actions, each with a separate trigger. The different triggers
are discussed in \nameref{triggers}, and the various types of
actions available are covered in the
section~\nameref{actiontypes}.

\subsection{Trigger Events}\label{triggers}

Event actions are initiated by \textit{triggers}. For fields,
there are ten different triggers.
\begin{questions}
    \item \textbf{Mouse Enter:} The event is triggered when mouse
    enters the region defined by the bounding rectangle. The
    \cs{AAMouseEnter} key is used within the argument of \Cs{AA}
    to define a mouse enter event:
\begin{Verbatim}[xleftmargin=\amtIndent]
\textField[\AA{\AAMouseEnter{%
    \JS{app.alert("You've entered my text field, get out!")}}}]
    {myText}{1.5in}{12bp}
\end{Verbatim}
    \item \textbf{Mouse Exit:} The event is triggered when mouse
    exits the region defined by the bounding rectangle. The
    \cs{AAMouseExit} key is used within the argument \Cs{AA} to
    define a mouse exit event:
\begin{Verbatim}[xleftmargin=\amtIndent]
\textField[\AA{\AAMouseExit{%
    \JS{app.alert("You've exited my domain, never return!")}}}]
    {myText}{1.5in}{12bp}
\end{Verbatim}
    \item \textbf{Mouse Down:} The event is triggered when the
    (left) mouse button is pushed down while the mouse is within the
    bounding rectangle of the field. The \cs{AAMouseDown} key is
    used within the argument of \Cs{AA} to define a mouse down
    event:
\begin{Verbatim}[xleftmargin=\amtIndent]
\pushButton[\AA{\AAMouseDown{\JS{app.alert("Mouse Down!")}}}]
    {myButton}{30bp}{12bp}
\end{Verbatim}
    \item \textbf{Mouse Up:} The event is triggered when the
    (left) mouse  button is released while the mouse is within the
    bounding rectangle of the field. The \Cs{A} key (or
    \cs{AAMouseUp} key is used within the argument of \Cs{AA}) is
    used to define a mouse up event:
\begin{Verbatim}[xleftmargin=\amtIndent]
\pushButton[\A{\JS{app.alert("Mouse Up!")}}]
    {myButton}{30bp}{12bp}
\end{Verbatim}
The same code can be performed as follows:
\begin{Verbatim}[xleftmargin=\amtIndent]
\pushButton[\AA{\AAMouseUp{\JS{app.alert("Mouse Up!")}}}]
    {myButton}{30bp}{12bp}
\end{Verbatim}
When both types of mouse up actions are defined for the same
field, the one defined by \Cs{A} is the one that is executed.

    \item \textbf{On Focus:} The event is triggered when the field
    comes into focus (either by tabbing from another field, or
    clicking the mouse within the bounding rectangle. The \cs{AAOnFocus}
    key is used within the argument of \Cs{AA} to define an `on focus'
    event:
\begin{Verbatim}[xleftmargin=\amtIndent]
\textField[\AA{\AAOnFocus{\JS{%
    app.alert("Please enter some data!")}}}]
{myText}{1.5in}{12bp}
\end{Verbatim}

    \item \textbf{On Blur:} The event is triggered when the field
    loses focus (either by tabbing to another field, by clicking
    somewhere outside the field, or (in the case of a text field,
    for example) pressing the \texttt{Enter} button. The \cs{AAOnBlur}
    key is used within the argument of \Cs{AA} to define an `on blur'
    event:
\begin{Verbatim}[xleftmargin=\amtIndent]
\textField[\AA{\AAOnBlur{%
    \JS{app.alert("Thanks for the data, I think!")}}}]
{myText}{1.5in}{12bp}
\end{Verbatim}

    \item \textbf{Format:}\label{format} The format event is the event that
    occurs when text is entered into a text or combo box; during
    this event, optionally defined JavaScript code is executed to
    format the appearance of the text within the field. The
    \cs{AAFormat} key is used within the argument of \Cs{AA} to
    define a format event:
\begin{Verbatim}[xleftmargin=\amtIndent]
\textField[\AA{%
    \AAKeystroke{AFNumber_Keystroke(2,0,1,0,"\\u0024",true);}
    \AAFormat{AFNumber_Format(2,0,1,0,"\\u0024",true);}}]
{myText}{1.5in}{12bp}
\end{Verbatim}
The above example creates a text field which will accept only a
number into it and which will format the number into U.S.
currency.

    \item \textbf{Keystroke:} This keystroke event is the event
    that occurs when individual keystroke is entered into a choice
    field (list or combo) or a text field; during this event,
    optionally defined JavaScript can be used to process the
    keystroke. The \cs{AAKeystroke} key is used within the
    argument of \Cs{AA} to define a keystroke event; see the format
    example above.

    \item \textbf{Validate:} The validate event is an event for
    which JavaScript code can be defined to validate the data that
    has been entered (text and combo fields only). The
    \cs{AAVali\-date} key is used within the argument of \Cs{AA} to
    define a validate event:
\begin{Verbatim}[xleftmargin=\amtIndent]
\textField[\AA{%
  \AAKeystroke{AFNumber_Keystroke(2,0,1,0,"\\u0024",true);}
  \AAFormat{AFNumber_Format(2,0,1,0,"\\u0024",true);}
  \AAValidate{%
    if (event.value > 1000 || event.value < -1000) {\r\t
      app.alert("Invalid value, rejecting your value!");\r\t
      event.rc = false;\r
    }}
}]{myText}{1.5in}{12bp}
\end{Verbatim}

    \item \textbf{Calculate:} The calculate event is an event for
    which JavaScript code can be defined to make automatic
    calculations based on entries of one or more fields (text and
    combo fields only). The \cs{AACalculate} key is used within the
    argument of \Cs{AA} to define a calculate event:
\begin{Verbatim}[xleftmargin=\amtIndent]
\textField[\AA{%
  \AAKeystroke{AFNumber_Keystroke(2,0,1,0,"\\u0024",true);}
  \AAFormat{AFNumber_Format(2,0,1,0,"\\u0024",true);}
  \AACalculate{AFSimple_Calculate("SUM",new Array("Prices"));}
}]{myText}{1.5in}{12bp}
\end{Verbatim}
    \item \textbf{PageOpen:} (The \textbf{PO} key, Table 8.10, PDF 1.5) An
        action to be performed when the page containing the annotation
        is opened (for example, when the user navigates to it from the
        next or previous page or by means of a link annotation or outline
        item). The action is executed after the page's open action. The
        \cs{AAPageOpen} key is used within the argument of \Cs{AA} to
        define an annotation page open event:
    \item \textbf{PageClose:} (The \textbf{PC} key, Table 8.10, PDF 1.5) An
        action to be performed when the page containing the annotation
        is closed (for example, when the user navigates to the next or
        previous page, or follows a link annotation or outline item).
        The action is executed before the page's close action.
        \cs{AAPageClose} key is used within the argument of \Cs{AA} to
        define an annotation page close event.
    \item \textbf{PageVisible:} (The \textbf{PV} key, Table 8.10,
        PDF 1.5) An action to be performed when the page containing the
        annotation becomes visible in the viewer application's user
        interface. \cs{AAPageVisible} key is used within the
        argument of \Cs{AA} to define an annotation page visible event.
    \item \textbf{PageInvisible:} (The \textbf{PI} key, Table 8.10,
        PDF 1.5) An action to be performed when the page containing
        the annotation is no longer visible in the viewer
        application's user interface. \cs{AAPageInvisible} key is used
        within the argument of \Cs{AA} to define an annotation page
        invisible event.
    \item[] Below is a simple example of usage. The actions write to the console.
\begin{Verbatim}[xleftmargin=\amtIndent]
\textField[\AA{%
    \AAPageOpen{console.println("Page \thepage: PO");}
    \AAPageClose{console.println("Page \thepage: PC");}
    \AAPageVisible{console.println("Page \thepage: PV");}
    \AAPageInvisible{console.println("Page \thepage: PI");}
    }]{tf\thepage}{2in}{11bp}
}
\end{Verbatim}
\end{questions}
Additional examples appear in the file \texttt{eqforms.tex}.

\subsection{Action Types}\label{actiontypes}

The following is only a partial listing of the action types, as
given in \textsf{Table~8.36} of the \textit{PDF
Reference}~\cite{tech:PDFRef}. The entire list and the details of
usage can be obtained from the \textit{PDF Reference}.

\begin{center}
\begin{tabular}{>{\ttfamily\small}l>{\small}l}
\multicolumn{1}{>{\bfseries}l}{Action Type} & \multicolumn{1}{>{\bfseries}l}{Description}\\\hline
GoTo & Go to a destination in the current document\\
GoToR& Go to a destination in another document\\
Launch& Launch an application, usually to open a file\\
URI&Resolve a uniform resource identifier\\
Named & Execute an action predefined by the viewer\\
SubmitForm & Send data to a uniform resource locator\\
JavaScript & Execute a JavaScript script (PDF 1.3)\\
\end{tabular}
\end{center}
Examples of each type of action follow.

\redpoint{\texttt{GoTo}:} Go to a (named or explicit) destination
within the current document. In this example, we `go to' the named
destination \texttt{toc.1}, which references the table of contents
pages. This button goes to a \textit{named destination}:
\pushButton[\CA{Go}\AC{Now!}\RC{to TOC}\A{/S/GoTo/D(toc.1)}]{myButton1}{}{10bp}
\begin{Verbatim}[xleftmargin=\amtIndent]
\pushButton[\CA{Go}\AC{Now!}\RC{to TOC}
    \A{/S/GoTo/D(toc.1)}]{myButton1}{}{10bp}
\end{Verbatim}
\noindent For a named destination, the value of the \texttt{/D} key is a string, \texttt{(toc.1)}
in the above example, that specifies the destination name.

The following is an example of an \textit{explicit destination}:
\pushButton[\CA{Go}\AC{Now!}\RC{to Page 3}\A{/S/GoTo/D[{Page3}/Fit]}]{myButton1}{}{10bp}
\begin{Verbatim}[xleftmargin=\amtIndent]
\pushButton[\CA{Go}\AC{Now!}\RC{to Page 3}
\A{/S/GoTo/D[{Page3}/Fit]}]{myButton1}{}{10bp}
\end{Verbatim}
\noindent The value of the destination key \texttt{/D} is an array
referencing a page number (\verb+{Page3}+) and a view
(\texttt{/Fit}).

For a \texttt{GoTo} action, the first entry in the destination
array, \texttt{\char123Page3\char125}, is an indirect reference to
a page, the notation \texttt{\char123Page3\char125} is understood
by the \textsf{distiller}. For  \textsf{dvipdfm}, use the \texttt{@page}
primitive:
\begin{Verbatim}[xleftmargin=\amtIndent]
\makeatletter\def\Page#1{@page#1}\makeatother
\pushButton[\CA{Go}\AC{Now!}\RC{to Page 3}
\A{/S/GoTo/D[\Page3/Fit]}]{myButton1}{}{10bp}
\end{Verbatim}
\noindent \textsf{pdftex} has no mechanism for inserting
indirect page references.

See section~8.5.3, `Go-To Actions', of the \textit{PDF
Reference}~\cite{tech:PDFRef} for details of the syntax of
\texttt{GoTo}, and section~8.2.1 for documentation on explicit and
named destinations.

\redpoint{\texttt{GoToR}:} Go to a (named or explicit) destination in a remote
document. In this example, we `go to a remote' destination, a
\textit{named destination} in another document.
\pushButton[\CA{Go}\AC{Now!}\RC{to TOC}\A{/S/GoToR/F(webeqtst.pdf)/D(webtoc)}]{myButton2}{}{10bp}
\begin{Verbatim}[xleftmargin=\amtIndent]
\pushButton[\CA{Go}\AC{Now!}\RC{to TOC}
    \pushButton[\CA{Go}\AC{Now!}\RC{to TOC}
    \A{/S/GoToR/F(webeqtst.pdf)/D(webtoc)]{myButton2}{}{10bp}
\end{Verbatim}
\noindent This example illustrates an \textit{explicit destination};
the following button jumps to page~3 in another document:
\pushButton[\CA{Go}\AC{Now!}\RC{to Page 3}\A{/S/GoToR/F(webeqtst.pdf)/D[2/Fit]}]{myButton2}{}{10bp}
\begin{Verbatim}[xleftmargin=\amtIndent]
\pushButton[\CA{Go}\AC{Now!}\RC{to Page 3}
\A{/S/GoToR/F(webeqtst.pdf)/D[2/Fit]}]{myButton2}{}{10bp}
\end{Verbatim}
\noindent The value of the destination key \texttt{/D} is an array
referencing a page number and a view (\texttt{/Fit}).

For an \textit{explicit destination}, the \textit{PDF
Reference}~\cite{tech:PDFRef} specifies that the first entry in
the destination array should be a page number (as contrasted with
an indirect reference to a page number, for the case of
\texttt{GoTo}). The destination, \texttt{/D[2/Fit]} would correctly work
for \textsf{distiller}, \textsf{dvipdfm} and \textsf{pdftex}.

See section~8.5.3, `Remote Go-To Actions', of the \textit{PDF
Reference}~\cite{tech:PDFRef} for details of the syntax of
\texttt{GoToR}, and section~8.2.1 for documentation on explicit
and named destinations.

\redpoint{\texttt{Launch}:} Launch an application (`Open a file').
In this example, we open a {\TeX} file using the application
associated with the \texttt{.tex} extension:
\pushButton[\CA{Go}\AC{TeX Doc!}\RC{to a}\A{/S/Launch/F(webeqtst.tex)}]{myButton3}{}{10bp}
\begin{Verbatim}[xleftmargin=\amtIndent]
\pushButton[\CA{Go}\AC{Now!}\RC{to TOC}
\A{/S/Launch/F(webeqtst.tex)}]{myButton3}{}{10bp}
\end{Verbatim}
\noindent See section~8.5.3, `Launch Actions', of the \textit{PDF Reference}~\cite{tech:PDFRef}
for details of the syntax.

\redpoint{\texttt{URI}:} Open a web link. In this example, we go to the Adobe web site:
\pushButton[\CA{Go}\AC{Adobe!}\RC{To}\A{/S/URI/URI(http://www.adobe.com/)}]{myButton4}{}{10bp}
\begin{Verbatim}[xleftmargin=\amtIndent]
\pushButton[\CA{Go}\AC{Adobe!}\RC{To}
\A{/S/URI/URI(http://www.adobe.com/)}]{myButton4}{}{10bp}
\end{Verbatim}
\noindent See section~8.5.3, `URI Actions', of the \textit{PDF
Reference}~\cite{tech:PDFRef} for details of the syntax.

\app{Acrobat} (Adobe Reader) also support open parameters, using these key-value pairs,
we can go to a specific page in a PDF on the web, and even search for words, for example
\pushButton[\CA{Go & Search}\A{/S/URI/URI(http://www.math.uakron.edu/~dpstory/acrotex/aeb_man.pdf#page=8&search=AcroTeX web exerquiz)}]{myButton4a}{}{10bp}
opens the AeB Manual on the Internet, goes to page 8, and searches for the words
AcroTeX, web, and exerquiz.
\begin{Verbatim}[xleftmargin=\amtIndent]
\pushButton[\CA{Go & Search}
\A{/S/URI/URI(http://www.math.uakron.edu/~dpstory/
    acrotex/aeb_man.pdf#page=8&search=AcroTeX web exerquiz)}]
    {myButton4a}{}{10bp}
\end{Verbatim}
The same can be accomplished using \cs{setLink}.

\redpoint{\texttt{Named}:} Execute a `named' action (i.e., a menu
item). Named actions listed in the \textit{PDF Reference} are
\texttt{NextPage}, \texttt{PrevPage}, \texttt{FirstPage} and
\texttt{LastPage}. A complete list of named actions can be
obtained by executing the code \texttt{app.listMenuItems()} in
the JavaScript console of \app{Acrobat} (Pro).
\pushButton[\CA{Go}\AC{Previous!}\RC{To}\A{/S/Named/N/PrevPage}]{myButton5}{}{10bp}
\begin{Verbatim}[xleftmargin=\amtIndent]
\pushButton[\CA{Go}\AC{Previous!}\RC{To}
\A{/S/Named/N/PrevPage}]{myButton5}{}{10bp}
\end{Verbatim}
\newtopic See section~8.5.3, `Named Actions,' of the \textit{PDF
Reference}~\cite{tech:PDFRef} for details of the syntax. The named
actions listed in the PDF Reference are \texttt{NextPage},
\texttt{PrevPage}, \texttt{FirstPage}, and \texttt{LastPage}.

In theory, any menu item can be executed as a named actions; there
are several factors to be taken into consideration: (1) Not all menu
items available to \app{Acrobat} are listed on the menu bar of Adobe
Reader, when choosing a name event to use, you should decide if the
application executing the named action supports that action; (2) In
recent versions, starting with version 7, there have been security
restrictions on the execution of menu items, the so-called ``white
list.'' Only named actions listed on the white list are allowed to
execute.  The white list for version 8.0 is

\begin{small}
\begin{longtable}{@{}>{\small\ttfamily}l>{\small}l>{\small}l@{}}
\multicolumn{3}{>{\bfseries}c}{Named Actions on Whitelist}\\\hline
\endfirsthead
\multicolumn{3}{>{\bfseries}c}{Named Actions on Whitelist}\\\hline
\endhead
AcroSendMail:SendMail  & LastPage                  &  ShowHideToolbarCommenting         \\
ActualSize             & NextPage                  &  ShowHideToolbarData               \\
AddFileAttachment      & OneColumn                 &  ShowHideToolbarEdit               \\
BookmarkShowLocation   & OpenOrganizer             &  ShowHideToolbarEditing            \\
Close                  & PageSetup                 &  ShowHideToolbarFile               \\
CropPages              & PrevPage                  &  ShowHideToolbarFind               \\
DeletePages            & Print                     &  ShowHideToolbarForms              \\
ExtractPages           & PropertyToolbar           &  ShowHideToolbarMeasuring          \\
Find                   & Quit                      &  ShowHideToolbarNavigation         \\
FindCurrentBookmark    & ReplacePages              &  ShowHideToolbarPageDisplay        \\
FindSearch             & RotatePages               &  ShowHideToolbarPrintProduction    \\
FirstPage              & SaveAs                    &  ShowHideToolbarRedaction          \\
FitHeight              & Scan                      &  ShowHideToolbarTasks              \\
FitPage                & ShowHideAnnotManager      &  ShowHideToolbarTypewriter         \\
FitVisible             & ShowHideArticles          &  SinglePage                        \\
FitWidth               & ShowHideBookmarks         &  Spelling                          \\
FullScreen             & ShowHideFields            &  Spelling:Check                    \\
GeneralInfo            & ShowHideFileAttachment    &  TwoColumns                        \\
GeneralPrefs           & ShowHideModelTree         &  TwoPages                          \\
GoBack                 & ShowHideOptCont           &  Web2PDF:OpenURL                   \\
GoForward              & ShowHideSignatures        &  ZoomTo                            \\
GoToPage               & ShowHideThumbnails        &  ZoomViewIn                        \\
InsertPages            & ShowHideToolbarBasicTools &  ZoomViewOut
\end{longtable}
\end{small}
In addition to the Whitelist for version 8, the following menu items are added for version 9.

\begin{small}
\begin{longtable}{>{\small\ttfamily}l>{\small}l>{\small}l}
\multicolumn{3}{>{\bfseries}c}{Named Actions on Whitelist}\\\hline
\endfirsthead
\multicolumn{3}{>{\bfseries}c}{Named Actions on Whitelist}\\\hline
\endhead
Annots:Tool:InkMenuItem & CollectionShowRoot    & HandMenuItem\\
CollectionDetails       & DocHelpUserGuide      & HelpReader\\
CollectionHome          & GoBackDoc             & rolReadPage\\
CollectionPreview       & GoForwardDoc          & ZoomDragMenuItem\\
\end{longtable}
\end{small}
\newtopic As mentioned before, some of these are for \app{Acrobat} only, others are available for Adobe Reader. I'll
let you sort them out. If you try to execute a named action that is not on the white list, the action will
silently fail.

\definePath{\URL}{http://www.math.uakron.edu/~dpstory}

\redpoint{\texttt{SubmitForm}:} Submit forms Action. In this example, we submit
a URL to a CGI, which then sends the requested file back to the browser:\\[1ex]
\comboBox[\DV{\URL}\V{\URL}\BG{webyellow}\BC{webgreen}]
{dest}{1.75in}{11bp}{%
 [(\URL)( Homepage of D. P. Story)]
 [(\URL/acrotex.html)( AcroTeX Homepage)]
 [(\URL/webeq.html)( AcroTeX Bundle)]
 [(\URL/acrotex/examples/webeqtst.pdf)( Exerquiz Demo file {(PDF)})]
}\kern1bp%
\pushButton[\BC{webgreen}\CA{Go!}
\A{\JS{app.alert("This example no longer works!");}}]{redirect}{33bp}{11bp}

\newtopic\textbf{\textcolor{red}{Note:}} This script no longer works, server-side scripting
at the \texttt{uakron.edu} server is no longer permitted (for security reasons). The
verbatim lisiting of the code as it used to be when it worked.
\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
\definePath{\URL}{http://www.math.uakron.edu/~dpstory}
\comboBox[\DV{\URL}\V{\URL}\BG{webyellow}\BC{webgreen}]
{dest}{1.75in}{11bp}{%
    [(\URL)( Homepage of D. P. Story)]
    [(\URL/acrotex.html)( AcroTeX Homepage)]
    [(\URL/webeq.html)( AcroTeX Bundle)]
    [(\URL/acrotex/examples/webeqtst.pdf)(Exerquiz Demo file {(PDF)})]
}\kern1bp\pushButton[\BC{webgreen}\CA{Go!}
\A{/S/SubmitForm/F(http://www.math.uakron.edu/cgi-bin/nph-cgiwrap/%
dpstory/scripts/nph-redir.cgi)/Fields[(dest)]/Flags 4}]
{redirect}{33bp}{11bp}
\end{Verbatim}
\noindent See section~8.6.4 of the \textit{PDF Reference}~\cite{tech:PDFRef}
for details of the syntax for `Submit Actions'.

\redpoint{\texttt{JavaScript}:} Execute a JavaScript action. This is perhaps
the most important type of action.  In this example,
the previous example is duplicated using the \texttt{Doc.getURL()} method, we don't
need to submit to a CGI.\\[1ex]
\comboBox[\DV{\URL}\V{\URL}\BG{webyellow}\BC{webgreen}]
{dest}{1.75in}{11bp}{%
    [(\URL)( Homepage of D. P. Story)]
    [(\URL/acrotex.html)( AcroTeX Homepage)]
    [(\URL/webeq.html)( AcroTeX Bundle)]
    [(\URL/acrotex/examples/webeqtst.pdf)( Exerquiz Demo file {(PDF)})]
}\kern1bp%
\pushButton[\BC{webgreen}\CA{Go!}
\A{\JS{%
    var f = this.getField("dest");\r
    app.launchURL(f.value,false);
}}]{redirect}{33bp}{11bp}
\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small]
\definePath{\URL}{http://www.math.uakron.edu/~dpstory}
\comboBox[\DV{\URL}\V{\URL}\BG{webyellow}\BC{webgreen}]
{dest}{1.75in}{11bp}{%
    [(\URL)( Homepage of D. P. Story)]
    [(\URL/acrotex.html)( AcroTeX Homepage)]
    [(\URL/webeq.html)( AcroTeX Bundle)]
    [(\URL/acrotex/examples/webeqtst.pdf)(Exerquiz Demo file {(PDF)})]
}\kern1bp\pushButton[\BC{webgreen}\CA{Go!}
\A{\JS{%
    var f = this.getField("dest");\r
    app.launchURL(f.value,false);
}}]{redirect}{33bp}{11bp}
\end{Verbatim}
\newtopic\hypertarget{JSdefined}{Note} the use of the convenience
command \cs{JS}, defined in the \textsf{insldjs} package, it expands to the correct syntax:
\texttt{/S/JavaScript/JS(\#1)}, where \texttt{\#1} is the argument
of \cs{JS}.

Most all actions can be performed using JavaScript, the reader is
referred to the \textit{JavaScript for \app{Acrobat} API
Reference}~\cite{tech:AcroJSRef}.

\section{JavaScript}

\app{Acrobat} JavaScript is the cross-platform scripting language of the
\app{Acrobat} suite of products. For \app{Acrobat} 5.0 or later, \app{Acrobat}
JavaScript based on JavaScript version 1.5 of ISO-16262 (formerly
known as ECMAScript), and adds extensions to the core language to
manipulate \app{Acrobat} forms, pages, documents, and even the viewer
application.

Web-based references to core JavaScript are the \textit{Core
JavaScript Guide}~\cite{tech:NetscapeJSGuide} and the \textit{Core
JavaScript Reference}~\cite{tech:NetscapeJSReference}. For \app{Acrobat}
JavaScript, we refer you to the \textit{Developing \app{Acrobat}
Applications using JavaScript}~\cite{tech:AcroJSGuide} and the
\textit{JavaScript for \app{Acrobat} API Reference}~\cite{tech:AcroJSRef}.

\verygoodbreak

\subsection{Support of JavaScript}

The {\cAcroEB} has extensive support for JavaScript, not only for
JavaScript executed in response to a field trigger, but for
document level and open page actions as well.  As the topic of this
document is \textsf{eForm} support, the reader is referred to the
documentation in the \textsf{insdljs} package, which is distributed with
the {\cAcroB}.

\subsubsection{The Convenience Command
    \tops{\protect\cs{JS}}{\CMD{JS}}}\label{convienceJS}

The syntax for writing JavaScript actions is
\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!~@]
\pushButton[\A{/S/JavaScript/JS(!anglemeta~script@)}]
    {jsEx}{22bp}{11bp}
\end{Verbatim}
Notice the code is enclosed in matching parentheses.
\hyperlink{JSdefined}{As noted earlier}, {\cAcroT} defines the command
\cs{JS} as a convenience for this very common actions; the above example
becomes:
\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
\pushButton[\A{\JS{!anglemeta(script)}}]{jsEx}{22bp}{11bp}
\end{Verbatim}
\noindent The code is now enclosed in matching braces.

\subsubsection{Inserting Simple JavaScript}

Actions are introduced into a field command through its optional
first parameter. JavaScript actions, in particular, can be
inserted by a mouse up\footnote{Other types of possible actions
are discussed and illustrated in \Nameref{Actions}.} action, for
example, using the \Cs{A} and \hyperref[convienceJS]{\cs{JS}}
commands.

The ``environment'' for entering JavaScript is not a verbatim
environment: `\verb+\+' is the usual {\TeX} escape character and
expandable commands are expanded; active characters are expanded
(which is usually not what you want); and primitive commands
appear verbatim (so you can use, for example, `\verb+{+' and
`\verb+}+). Within the optional argument, the macro
\cs{makeJSspecials}, which can be redefined, is expanded; the
macro makes several special definitions: (1) it defines \verb+\\+ to be
`\verb+\\+'; (2) defines \cs{r} to be the JavaScript escape
sequence for new line; and (3) defines \cs{t} to be the JavaScript
escape sequence for tab.

\Example\label{ex:formattedBtn} \pushButton[\CA{Sum}\A{\JS{%
        var n = app.response("Enter a positive integer", "Summing the first \\"n\\" integers");\r
        if ( n != null ) {\r\t
            var sum = 0;\r\t
            for ( var i=1; i <= n; i++ ) {\r\t\t
                sum += i;\r\t
            }\r
        app.alert("The sum of the first n = " + n + " integers is " + sum + ".", 3);
        }
    }}]{jsSum}{22bp}{11bp}

\smallskip\noindent The verbatim listing for this button is
\begin{Verbatim}[xleftmargin=\amtIndent]
\pushButton[\CA{Sum}\A{\JS{%
    var n = app.response("Enter a positive integer",
        "Summing the first \\"n\\" integers");\r
    if ( n != null ) {\r\t
        var sum = 0;\r\t
        for ( var i=1; i <= n; i++ ) {\r\t\t
            sum += i;\r\t
        }\r
    app.alert("The sum of the first n = " + n
        + " integers is " + sum + ".", 3);
    }
}}]{jsSum}{22bp}{11bp}
\end{Verbatim}

\paragraph*{Code Comments.} Within the JavaScript string, we want
literal double quotes \texttt{"}, to avoid \texttt{"} being
interpreted as the end of the string (or the beginning of a string)
we have to double escape the double quotes, as in \verb+\\"+.  (This
is not necessary when entering code in the JavaScript editor if you
have the \app{Acrobat} application.)  I try to write JavaScript that I can easily
read, edit, and debug in the JavaScript editor (available in
the full \app{Acrobat} application); for this reason, I've added in new
lines and tabbing (\cs{r} and \cs{t}). Many people, however, have
only the Adobe Reader and cannot see their code to debug it; in this
case, the formatting is really not needed.

%\newtopic Consider the following code
%\begin{Verbatim}[xleftmargin=\amtIndent]
%    \pushButton[\A{\JS{var x = "~"}}]{jsTilde}{22bp}{11bp}
%\end{Verbatim}
%\noindent In {\LaTeX}, `\texttt{\~}' is an active character. JavaScript above appears
%within the JavaScript editor as
%\begin{Verbatim}[xleftmargin=\amtIndent]
%var x = "protect unhbox voidb@x penalty @M  {}"
%\end{Verbatim}
%\noindent Not good! Using `\verb+\~+' or `\verb+\\~+ fairs no better.
%The work around is to use \verb!\string~!.
%\begin{Verbatim}[xleftmargin=\amtIndent]
%    \pushButton[\A{\JS{var x = "\jslit~"}}]{jsTilde}{22bp}{11bp}
%\end{Verbatim}

\newtopic Needless to say, the following sample will not compile because we do not have
matching braces.
\begin{Verbatim}[xleftmargin=\amtIndent]
\pushButton[\A{\JS{var x = "{"}}]{jsBrace}{22bp}{11bp}
\end{Verbatim}
\noindent The work around here is
\begin{Verbatim}[xleftmargin=\amtIndent]
\pushButton[\A{\JS{var x = "\jslit\{"}}]{jsBrace}{22bp}{11bp}
\end{Verbatim}

\newtopic In the above work about, the \cs{jslit} command (for JavaScript literal) is used. This command is defined only within the optional arguments of a form field. The definition of \cs{jslit} is \verb!\let\jslit\string!


\subsubsection{Inserting Complex or Lengthy JavaScript}\label{lengthyJS}

For JavaScript that is more complex or lengthy, the
\textsf{insdljs} Package, distributed with the \cAcroB, has the
verbatim \texttt{defineJS} environment. Details and idiosyncracies of this
environment are documented in \Nameref{defineJS}. The
example given in \hyperref[defineJSEx]{Example~\ref*{defineJSEx}} will suffice; the verbatim listing
is reproduced here for convenience.

\redpoint First, we define the JavaScript action and name it
\cs{getComboJS} for the button (prior to defining the field,
possibly in the preamble, or in style files):
\begin{Verbatim}[xleftmargin=\amtIndent]
\begin{defineJS}{\getComboJS}
    var f = this.getField("myCombo");
    var a = f.currentValueIndices;
    if ( a == -1 )
        app.alert("You've typed in \\"" + f.value +"\\".");
    else
        app.alert("Selection: " + f.getItemAt(a, false)
            + " (export value: " + f.getItemAt(a, true)+").");
\end{defineJS}
\end{Verbatim}
\noindent There is no need for the \cs{r} and \cs{t} commands to format the JavaScript;
the environment obeys lines and spaces; contrast this example with \textbf{Example~\ref*{ex:formattedBtn}},
page~\pageref{ex:formattedBtn}.

Now we can define our fields, a combo box (not shown) and button, in
this example. It is the button that uses the JavaScript defined
above.
\begin{Verbatim}[xleftmargin=\amtIndent]
\pushButton[\BC{0 .6 0}\CA{Get}\AC{Combo}\RC{Box}
    \A{\JS{\getComboJS}}]{myComboButton}{33bp}{11bp}
\end{Verbatim}
\noindent Within the argument of \cs{JS} we insert the macro
command, \verb!\JS{\getComboJS}!
for our JavaScript defined earlier in the
\texttt{defineJS} environment

%\redpoint The demo file \href{examples/definejs.pdf}{definejs.pdf}
%(source \texttt{definejs.tex}) has additional examples of this
%environment.

\exAeBBlogPDF{p=875} The demo file
\texttt{\href{\urlAcroTeXBlog/?p=875}{aeb\_links.pdf}}, with source attached,
is found on the {\AcroBlog} website.


\subsection{Defining JavaScript Strings with
    \tops{\protect\cs}{\CMD}{flJSStr} and \tops{\protect\cs}{\CMD}{dlJSStr}}

The \pkg{insdljs} package defines \cs{flJSStr} and \cs{dlJSStr} to
help create JavaScript strings that contain Latin~1 glyphs (or for the
general purpose of defining JavaScript strings).
\bVerb\takeMeasure{\string\flJSStr*[\ameta{options}]\darg{\cs{\ameta{cmd}}}\darg{\ameta{JS\_string}}}%
\def\1{\rlap{\hskip\linewidth\sffamily(Field level)}}%
\def\2{\rlap{\hskip\linewidth\sffamily(Document level)}}%
\begin{dCmd}[commandchars=!()]{\bxSize}
!1\flJSStr*[!ameta(options)]{\!ameta(cmd)}{!ameta(JS_string)}
!2\dlJSStr*[!ameta(options)]{\!ameta(cmd)}{!ameta(JS_string)}
\end{dCmd}
\eVerb The previously documented \cs{defineJSStr} command is now an alias for
\cs{flJSStr}. Each command defines a new command \cs{\ameta{cmd}} with body
\meta{JS\_string}. The command \cs{flJSStr} is designed to define JavaScript
strings that are passed through the optional argument of a form field or link
annotation, whereas \cs{dlJSStr} is used for a Document JavaScript string,
that is, one that is inserted into a \env{insDLJS} environment of the
\pkg{insdljs} package. Document JavaScript is implemented differently
depending on the driver used, as a result, \cs{dlJSStr} is more driver
dependent than is \cs{flJSStr}.

\paragraph*{Options discussed.} When the optional star (\texttt{*}) is present, the
\meta{JS\_string} argument is passed to \cs{pdfstringdef} before the
definition of \cs{\ameta{cmd}}. The \meta{options} argument may consist of
one or more of the keywords \texttt{quotes}, \texttt{noquotes},
\texttt{parens}, \texttt{noparens}. By default, \ameta{JS\_String} is enclosed
in double quotes, unless the option \opt{noquotes} is taken.
The \texttt{parens} option causes \pkg{insdljs} to enclose \meta{JS\_string} in parentheses; while
\texttt{noparens} specifies not to enclose the string in parentheses. The default is \opt{noparens}.

\CmdDescription Prior to defining \cs{\ameta{cmd}}, there are a number of
definitions that occur locally:
\begin{itemize}
  \item \cs{uXXXX} is recognized as a unicode escape sequence. So, within the JavaScript string,
  unicode can be entered directly, for example, \cs{u00FC} is the u-umlaut.

  \item Backslash is still the tex escape character, so any commands
  in the JavaScript string get expanded. You can delay the expansion
  by using \cs{protect}. Expansion occurs when the tex compiler
  actually expands \cs{\anglemeta{CMD}}.

  \item \cs{r} (carriage return), \cs{n} (line feed) and, \cs{t}
  (tab) can be used to format the message, as desired.

  \item Use the \cs{cs} command to write a word containing a literal backslash in it;
  for example, to get \cs{LaTeX} to appear in a JavaScript string, you must type \verb!\cs{LaTeX}!
  in the JavaScript string.
  \item The JavaScript string is enclosed in double quotes (\texttt{"}), if you want
  a literal double quote, use \verb!\\"! to get a literal double quote
  to appear in a JavaScript string. For example,
\begin{Verbatim}[xleftmargin=\amtIndent]
\flJSStr{\myMessage}
    {My name is \\"Stan\\" and I'm \\"the man.\\"}
\end{Verbatim}

  \item The command \cs{jslit} is recognized within the JavaScript string. Using \cs{jslit}
  (short for JavaScript literal), you can insert, for example, unbalanced braces:
\begin{Verbatim}[xleftmargin=\amtIndent]
\flJSStr{\myMessage}
    {You forgot the left brace \\"\jslit\{\\",
     please insert it.}
\end{Verbatim}
The definition of \cs{jslit} is \verb!\let\jslit\string!.
\end{itemize}

\section{The \texttt{useui} option: A User-Friendly Interface}\label{useui}

\def\myFavFive{%
bordercolor={1 0 0},bgcolor={0 1 0},
textcolor={1 0 0},align={right},
uptxt={Push Me}}


To use the ``user-friendly'' interface, the \texttt{useui} option must be taken. The key-value pairs
described below are enclosed as the argument of the special \cs{ui} key.  For example,
\bVerb\takeMeasure{{\quad}bordercolor=\darg{1 0 0},bgcolor=\darg{0 1 0},}%
\begin{dCmd*}[commandchars={!@^}]{\bxSize}
\pushButton[\ui{%
@!quad^bordercolor={1 0 0},bgcolor={0 1 0},
@!quad^textcolor={1 0 0},align={right},
@!quad^uptxt={Push Me},
@!quad^js={app.alert("AcroTeX rocks!")}
}]{pb1}{}{11bp}
\end{dCmd*}
\endgroup\newtopic You can develop your own set of appearances and use the \texttt{presets} key to conveniently set these.
For example,
\begin{Verbatim}[xleftmargin=\amtIndent]
\def\myFavFive{%
    bordercolor={1 0 0},bgcolor={0 1 0},
    textcolor={1 0 0},align={right},
    uptxt={Push Me}
}
\end{Verbatim}
Later, a push button can use this preset, like so,
\begin{Verbatim}[xleftmargin=\amtIndent]
\pushButton[\ui{presets=\myFavFive,
    js={app.alert("AcroTeX rocks!")}}]{pb1}{}{11bp}
\end{Verbatim}
\newtopic which produces \pushButton[\ui{presets=\myFavFive, js={app.alert("AcroTeX rocks!")}}]{pb1}{}{11bp}\,
\footnote{The reader is reminded once again that the author has no understanding of colors.}

\newtopic You can mix your \cs{myFavFive} with different key-value pairs, such as a JavaScript action.

\handpoint In each of the subsequent subsections, the \pkg{eforms} key to its user-friendly counterpart is
displayed in the margin. Some of the user-friendly are a combination of
\pkg{eforms} KVs and are not represented in the margin in this case.

\subsection{The Appearance Tab}

We present these key-value pairs to model the user-interface of \app{Acrobat}.


%\settowidth{\aebdimen}{\ttfamily border=visible|invisible}
\bVerb\takeMeasure{border=visible|invisible}%
\begin{dCmd}[commandchars=!()]{\bxSize}
border=visible|invisible
\end{dCmd}
\endgroup
\CmdDescription Used with link annotations and determines whether the border
surrounding the bounding box of the link is visible. In the case of a link,
this is the Link Type: \textsf{Visible Rectangle} or \textsf{Invisible
Rectangle}. If you set border equal to \texttt{invisible}, that will set
border line width to zero \verb!\W{0}!. For forms, this key has no
counterpart in the user interface.

If this key is not specified, the \textsf{eforms}
follows the rule: If \texttt{colorlinks} option of  \textsf{hyperref} is used, the border is invisible;
otherwise, it is visible (and the default \texttt{linewidth} is 1). Use the border key to override
this behavior.

\settowidth{\aebdimen}{\ttfamily linewidth=thin|medium|thick}%
\def\1{\llap{\Cs{W}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1linewidth=thin|medium|thick
\end{dCmd}
\CmdDescription The \texttt{linewidth} of the border around a link
or a form. The user interface choices are \texttt{thin},
\texttt{medium}, and \texttt{thick}. This key-value is ignored if the
document author has set the border to \texttt{invisible}.

\settowidth{\aebdimen}{\ttfamily highlight=none|invert|outline|inset|push}%
\def\1{\llap{\Cs{H}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1highlight=none|invert|outline|inset|push
\end{dCmd}
\CmdDescription The highlight type for links and forms, choices are
\texttt{none}, \texttt{invert}, \texttt{outline}, \texttt{inset} and
\texttt{push}. The term \texttt{inset} is used with links, and
\texttt{push} is used with forms. They each have the same key value pair.

\settowidth{\aebdimen}{\ttfamily bordercolor=\anglemeta{num}\hardspace\anglemeta{num}\hardspace\anglemeta{num}}%
\def\1{\llap{\smash{\parbox[c]{2\marginparwidth}{\raggedright\hfill\shortstack[l]{\Cs{BC}\,(forms) or\\\Cs{Color}\,(links)}}}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1bordercolor=!anglemeta(num)!hardspace!anglemeta(num)!hardspace!anglemeta(num)
\end{dCmd}
\CmdDescription The color of the border, when visible, in RGB color space.
For example, \texttt{bordercolor=1 0 0}, is the color red.

\settowidth{\aebdimen}{\ttfamily linestyle=solid|dashed|underlined|beveled|inset}%
\def\1{\llap{\Cs{S}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1linestyle=solid|dashed|underlined|beveled|inset
\end{dCmd}
\CmdDescription  The line style of the border, possible values are \texttt{solid},\texttt{dashed},
\texttt{underlined}, \texttt{beveled},and \texttt{inset}. Links do not support
the \texttt{beveled} option.

\settowidth{\aebdimen}{\ttfamily dasharray=\anglemeta{num}[\hardspace\anglemeta{num}]}%
\def\1{\llap{\Cs{D}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1dasharray=!anglemeta(num)[!hardspace!anglemeta(num)]
\end{dCmd}
\CmdDescription When a line style of \texttt{dashed} is chosen, you can specify a dash array.
The default is 3.0, which means a repeating pattern of 3 points of line, followed by 3 points of space.
A value of \texttt{dasharray=3~2} means three points of line, followed
by two points of space. When this key is used without a value, the value is 3.0.
When the \texttt{dashed} key is not present, 3.0 is used.

linktxtcolor

\settowidth{\aebdimen}{\ttfamily linktxtcolor=\anglemeta{named\_color}}%
\def\1{\llap{\Cs{linktxtcolor}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1linktxtcolor=!anglemeta(named_color)
\end{dCmd}
\CmdDescription Set the color of the link text. Ignored if the
\texttt{colorlinks} option of hyperref has not been taken.  The
value of \texttt{linktxtcolor} is a named color. For example,
\texttt{linktxtcolor=red}. The default is \verb|\@linkcolor| from hyperref.
This default can be changed by redefining \cs{@linkcolor}, or
redefining \cs{defaultlinkcolor}. If \verb!linktxtcolor={}! (an
empty argument), or simply \texttt{linktxtcolor}, no color is
applied to the text, the color of the text will be whatever the current color is.

\settowidth{\aebdimen}{\ttfamily annotflags=hidden|print|-print|noview|lock}%
\def\1{\llap{\Cs{F}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1annotflags=hidden|print|-print|noview|lock
\end{dCmd}

\CmdDescription This is a bit field, possible values are \texttt{hidden}, \texttt{print},
\texttt{-print}, \texttt{noview}, and \texttt{lock}. \textit{Multiple values can
be specified}. The values are ``or-ed'' together. Most all forms are printable
by default. If you don't want a form field to print specify \texttt{-print}.
For example, \verb|annotflags={-print,lock}| makes the field not printable and is
locked, so the field cannot be moved through the UI.


\settowidth{\aebdimen}{\ttfamily fieldflags=readonly|required|noexport|multiline|password|}%
\def\1{\llap{\Cs{Ff}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1fieldflags=readonly|required|noexport|multiline|password|
     notoggleoff|radio|pushbutton|combo|edit|
     sort|fileselect|multiselect|nospellcheck|
     noscrolling|comb|radiosinunison|commitonchange|
     richtext
\end{dCmd}
\CmdDescription There are a large number of field flags (\texttt{Ff}) that set a
number of properties of a field. This is a multiple-selection key as well. The
values are ``or-ed'' together.

Normally, a document author would not specify \texttt{radio},
\texttt{pushbutton} or \texttt{combo}. These properties are used by
\textsf{eforms} to construct a radio button field, a push button and a combo
box. The others can be used as appropriate.

\settowidth{\aebdimen}{\ttfamily maxlength=\anglemeta{num}}%
\def\1{\llap{\Cs{MaxLen}\hspace{\marginparsep}}}%%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1maxlength=!anglemeta(num)
\end{dCmd}
\CmdDescription Use \texttt{maxlength} to limit the number of characters input into a text field.
Example: \texttt{maxlength=12}. When the \texttt{fieldflags} is set to \texttt{comb}, the value
of \texttt{maxlength} determines the number of combs in the field.


\settowidth{\aebdimen}{\ttfamily tooltip=\anglemeta{string}}%
\def\1{\llap{\Cs{TU}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1tooltip=!anglemeta(string)
\end{dCmd}
\CmdDescription Enter a text value to appear as a tool tip. A tool
tip is text that appears in a frame when the user hovers the mouse
over the field. The link annotation does not have a tool tip
feature. Enclose in parentheses if the text string contains a comma;
for example, \verb|tooltip={Hi, press me and see what happens!}|.
The \texttt{tooltip} key obeys the \texttt{unicode} option. If the
unicode option of hyperref is in effect, then setting
\begin{Verbatim}[xleftmargin=\amtIndent]
tooltip = {J\"{u}rgen, press me and see what happens!}
\end{Verbatim}
\noindent yields a tool tip of ``J\"{u}rgen, press me and see what happens!''

\settowidth{\aebdimen}{\ttfamily default=\anglemeta{string}}%
\def\1{\llap{\Cs{DV}\hspace{\marginparsep}}}%
\def\2{\llap{\Cs{V}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1default=!anglemeta(string)
!2value=!anglemeta(string)
\end{dCmd}
\CmdDescription Set default value of a field (text, list, combobox)
using the \texttt{default} key. The default value is the value used
for the field when the field is reset. Example:
\texttt{default=Name}.

The \texttt{value} key is used to set the current value of a
field (text, list, combobox). Example: \texttt{value=AcroTeX}. % unicode

These two keys obey the \texttt{unicode} option.
If the unicode option of hyperref is in effect, then setting
\verb|value = \texteuro\ 1 000 000| sets the (initial) value of this field to
``\char1 \ 1 000 000''.

\settowidth{\aebdimen}{\ttfamily rotate=0|90|180|270}
\def\1{\llap{\Cs{R}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1rotate=0|90|180|270
\end{dCmd}
\CmdDescription Set the orientation of the field, values are 0, 90, 180 and 270. If 90 or 270
are chosen, the height and width of the field need to be reversed. This is not
done automatically by \textsf{eforms}

\settowidth{\aebdimen}{\ttfamily bgcolor=\anglemeta{num}\hardspace\anglemeta{num}\hardspace\anglemeta{num}}
\def\1{\llap{\Cs{BG}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1bgcolor=!anglemeta(num)!hardspace!anglemeta(num)!hardspace!anglemeta(num)
\end{dCmd}
\CmdDescription The background color of a form field. This is a RGB color value.

\settowidth{\aebdimen}{\ttfamily rollovertxt=\anglemeta{string}}
\def\1{\llap{\Cs{CA}\hspace{\marginparsep}}}%
\def\2{\llap{\Cs{AC}\hspace{\marginparsep}}}%
\def\3{\llap{\Cs{RC}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1uptxt=!anglemeta(string)
!2downtxt=!anglemeta(string)
!3rollovertxt=!anglemeta(string)
\end{dCmd}
\CmdDescription The normal (mouse up), mouse down and rollover text
for a button field. All three of these keys obey the \texttt{unicode} option.
If the \opt{unicode} option of \pkg{hyperref} is in effect, then setting
\verb!uptxt = J\"{u}rgen! yields a normal caption of ``J\"{u}rgen'' on the button.

% \texttt{eqforms\_pro.tex}


\newtopic \textbf{Push buttons only.} The following list of keys are used for
creating custom appearances on button faces. \app{Acrobat} Distiller required for
this set. The example files
\marginpar{\mbox{\makebox[0pt][l]{\textcolor{blue}{\Pisymbol{webd}{254}}}\raisebox{-2pt}{\color{red}{{\zqacr
b\hspace{9.5pt}}}}}}\texttt{\href{\urlAcroTeXBlog/?p=879}{eqforms.pdf}} and
\texttt{\href{\urlAcroTeXBlog/?p=1291}{eqforms\_pro.pdf}} illustrate the
creation of icons as button appearances. In the latter PDF,
\texttt{eqforms\_pro.pdf}, \textsf{\app{Acrobat} Distiller} is required to be the
PDF creator.
\begin{itemize}
\item[]
\settowidth{\aebdimen}{\ttfamily importicons=\anglemeta{yes|no}}
\def\1{\llap{\Cs{I}\hspace{\marginparsep}}}%
\def\2{\llap{\Cs{RI}\hspace{\marginparsep}}}%
\def\3{\llap{\Cs{IX}\hspace{\marginparsep}}}%
\def\4{\llap{\Cs{importIcons}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1normappr=!anglemeta(string)
!2rollappr=!anglemeta(string)
!3downappr=!anglemeta(string)
!4importicons=!anglemeta(!upshape(yes|no))
\end{dCmd}
\item[]\CmdDescription The normal, rollover, and down appearances of the button face icon. The value of each
key is an indirect reference to a form XObject. Normally, you can use the \texttt{graphicxsp} package
to embed graphics and give a symbolic name which is used as the value of these keys. \texttt{importIcons}
is a special key used in conjunction with importing icons using JavaScript methods.

\item[]
\settowidth{\aebdimen}{\ttfamily layout=labelonly|icononly|icontop|iconbottom|}
\def\1{\llap{\Cs{TP}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1layout=labelonly|icononly|icontop|iconbottom|
       iconleft|iconright|labelover
\end{dCmd}
\item[]\CmdDescription The value of this key determines the layout of the icon relative to the label (or caption).
    The default is \texttt{labelonly}, if if you define icons, you need to set layout to something
    other than \texttt{labelonly}.

\item[]
\settowidth{\aebdimen}{\ttfamily scalewhen=always|never|iconbig|iconsmall}
\def\1{\llap{\Cs{SW}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1scalewhen=always|never|iconbig|iconsmall
\end{dCmd}
\item[]\CmdDescription The value of this key tells when to scale the icon. The \texttt{iconbig}
    scales the icon when it is too big for the bounding rectangle; while
    \texttt{iconsmsll} scales the icon when it is too small for the bounding rectangle.
    The default is \texttt{always}.

\item[]
\settowidth{\aebdimen}{\ttfamily scale=proportional|nonproportional}
\def\1{\llap{\Cs{ST}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1scale=proportional|nonproportional
\end{dCmd}
\item[]\CmdDescription This parameter sets the scale type, either \texttt{proportional} scaling, where
the aspect ratio of the icon is preserved; or \texttt{nonproportional} scaling is used. The
default is \texttt{proportional}.

\item[]
\settowidth{\aebdimen}{\ttfamily position=\anglemeta{x}\hardspace\anglemeta{y})}
\def\1{\llap{\Cs{PA}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1position=!anglemeta(x)!hardspace!anglemeta(y)
\end{dCmd}
\item[]\CmdDescription Both \anglemeta{x} and \anglemeta{y} are numbers
    between 0 and 1, inclusive, and separated by a space (not a comma). They
    indicate the fraction of the left over space to allocate at the left
    and bottom of the icon. A value of \verb!{0.0 0.0}! positions the
    icon at the bottom-left corner; a value of \verb!{0.5 0.5}! centers
    it within the rectangle. This entry is only used of the icon is
    scaled proportionally. The default is \verb!{0.5 0.5}!.

\item[]
\settowidth{\aebdimen}{\ttfamily fitbounds=true|false}
\def\1{\llap{\Cs{FB}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1fitbounds=true|false
\end{dCmd}
\item[]\CmdDescription A Boolean value, if \texttt{true}, indicates
    that the button appearance should be scaled to fit fully
    within the bounds of the field's bounding rectangle without
    taking into consideration the line width of the border. The
    default is \texttt{false}. \texttt{fitbounds} is the same as \texttt{fitbounds=true}.

\end{itemize}

\newtopic \textbf{Check boxes and Radio Buttons Only.} The following
list of keys are used for creating custom appearances on check boxes and
radio buttons. \app{Acrobat} Distiller required for this set. The example files
\marginpar{\mbox{\makebox[0pt][l]{\textcolor{blue}{\Pisymbol{webd}{254}}}\raisebox{-2pt}{\color{red}{{\zqacr
b\hspace{9.5pt}}}}}}\texttt{\href{\urlAcroTeXBlog/?p=879}{eqforms.pdf}} and
\texttt{\href{\urlAcroTeXBlog/?p=1291}{eqforms\_pro.pdf}} illustrate the
creation of these appearances. In the latter PDF, \texttt{eqforms\_pro.pdf},
\textsf{\app{Acrobat} Distiller} is required to be the PDF creator.

\begin{itemize}

\item[]
\settowidth{\aebdimen}{\ttfamily appr=\darg{ norm=\darg{on=\darg\anglemeta{normOnAppr}},off=\darg{\anglemeta{normOffAppr}}},}
\def\1{\llap{\Cs{AP}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1appr={ norm={on={!anglemeta(normOnAppr)},off={!anglemeta(normOffAppr)}},
       down={on={!anglemeta(downOnAppr)},off={!anglemeta(downOffAppr)}},
       roll={on={!anglemeta(rollOnAppr)},off={!anglemeta(rollOffAppr)}}}
\end{dCmd}
\item[] \CmdDescription The \texttt{norm} key is the normal appearance of the button;
        it has two appearances, the \texttt{on} and the \texttt{off} appearances. The
        \texttt{on} and \texttt{off} are indirect references to a form XObject. The other
        two keys, down and roll, are the down and rollover appearances, respectively; they
        have the same structure as \texttt{norm} does.

\item[] If \texttt{appr} is not specified, then, by default, the usual appearances of the
        buttons are used, as provided by \app{Acrobat}/AR.

\item[] The \texttt{down} and \texttt{roll} are optional, if you use \texttt{appr} at all, you should
        specify the norm appearance, both \texttt{on} and \texttt{off} appearances.

\end{itemize}

\settowidth{\aebdimen}{\ttfamily align=left|centered|right}%
\def\1{\llap{\Cs{Q}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1align=left|centered|right
\end{dCmd}
\CmdDescription The type of alignment of a text field. Permitted values are
\texttt{left}, \texttt{centered}, and \texttt{right}.


\settowidth{\aebdimen}{\ttfamily textcolor=\anglemeta{num}[\hardspace\anglemeta{num}\hardspace\anglemeta{num}[\hardspace\anglemeta{num}]]}%
\def\1{\llap{\Cs{textFont}\hspace{\marginparsep}}}%
\def\2{\llap{\Cs{textSize}\hspace{\marginparsep}}}%
\def\3{\llap{\Cs{textColor}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1textfont=!anglemeta(font_name)
!2textsize=!anglemeta(num)
!3textcolor=!anglemeta(num)[!hardspace!anglemeta(num)!hardspace!anglemeta(num)[!hardspace!anglemeta(num)]]
\end{dCmd}
\CmdDescription
The key \texttt{textfont} is the text font to be used with the text of the field,
while \texttt{textsize} is the text size to be used. A value of 0 means auto size.
The color of the text in the field. This can be in \textsf{G}, \textsf{RGB} or \textsf{CMYK} color
space by specifying 1, 3 or 4 numbers between 0 and 1.

\settowidth{\aebdimen}{\ttfamily autocenter=yes|no}%
\def\1{\llap{\Cs{autoCenter}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1autocenter=yes|no
\end{dCmd}
\CmdDescription This is a feature of \textsf{eforms}. Use
\texttt{autocenter=yes} (the default) to moderately center the bounding box,
and use \texttt{autocenter=no} otherwise.

\settowidth{\aebdimen}{\ttfamily inline=yes|no}%
\def\1{\llap{\Cs{inline}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1inline=yes|no
\end{dCmd}
\CmdDescription Same as \cs{autoCenter} (\texttt{autocenter}), but the algorithm
for positioning the field is more sophisticated. The default is \verb|autocenter=no|

To compare the last two (\texttt{autocenter} and \texttt{inline}), we present the following example:
\begin{quote}\settowidth{\dimen0}{Enter your first name:\ }%
\underbar{Enter your name:\ \textField[\V{D. P. Story}\DV{D. P. Story}\inline{y}]{ILtxt}{1.25in}{14bp}}\cgBdry[3bp](\texttt{inline=yes})\\[6bp]
\underbar{Enter your name:\ \textField[\V{D. P. Story}\DV{D. P. Story}]{ACtxt}{1.25in}{14bp}}\cgBdry[3bp](\texttt{autoCenter=yes})
\end{quote}


\settowidth{\aebdimen}{\ttfamily presets=\meta{\string\CMD}}
\def\1{\llap{\Cs{presets}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1presets=!meta(\CMD)
\end{dCmd}
\CmdDescription Set presets from inside a \cs{ui} argument. The value of \cs{ui} must be a user defined
command, which expands to a  comma-delimited list of ui-key-value pairs.

\Example Use the presets key to place pre-defined key-value pairs into the option
argument of a link. Define a command,
\begin{Verbatim}[xleftmargin=\amtIndent]
\def\myUIOpts{%
    border=visible,linktxtcolor=blue,
    linewidth=medium,highlight=outline,
    linestyle=dashed,bordercolor={1 0 0},
    js={app.alert("AcroTeX rocks!")}
}
\end{Verbatim}
Later, we can type,
\settowidth{\aebdimen}{\ttfamily \string\setLink[\string\ui\darg{presets=\darg{\string\myUIOpts}}]\darg{Press Me Again!!}}
\begin{dCmd*}{\aebdimen+2\fboxsep+2\fboxrule}
\setLink[\ui{presets={\myUIOpts}}]{Press Me Again!!}
\end{dCmd*}

\settowidth{\aebdimen}{\ttfamily symbolchoice=check|circle|cross|diamond|square|star}%
\def\1{\llap{\Cs{symbolchoice}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1symbolchoice=check|circle|cross|diamond|square|star
\end{dCmd}
\CmdDescription Used with a checkbox or radio button field. This sets the symbol
that appears in the field when the box is checked. Choices are
\texttt{check}, \texttt{circle}, \texttt{cross}, \texttt{diamond},
\texttt{square}, and \texttt{star}.

\settowidth{\aebdimen}{\ttfamily rectW=\ameta{length}}%
\def\1{\llap{\Cs{rectW}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1rectW=!ameta(length)
\end{dCmd}
\CmdDescription Resets the width of the field to \ameta{length}.

\settowidth{\aebdimen}{\ttfamily rectH=\ameta{length}}%
\def\1{\llap{\Cs{rectH}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1rectH=!ameta(length)
\end{dCmd}
\CmdDescription Resets the height of the field to \ameta{length}.

\settowidth{\aebdimen}{\ttfamily width=\ameta{length}}%
\def\1{\llap{\Cs{width}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1width=!ameta(length)
\end{dCmd}
\CmdDescription Sets the width of the field to \ameta{length} and
resets the height to maintain the same aspect ratio of the field. For example,
\begin{Verbatim}[fontsize=\small,commandchars=!()]
\pushButton{pb}{.5in}{1in}                 %!sffamily( width of .5in and height of 1in)
\pushButton[\width{1in}]{pb}{.5in}{1in}    %!sffamily( width of 1in and height of 2in)
\pushButton[\ui{width=1in}]{pb}{.5in}{1in} %!sffamily( same as above)
\end{Verbatim}

\settowidth{\aebdimen}{\ttfamily height=\ameta{length}}%
\def\1{\llap{\Cs{height}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1height=!ameta(length)
\end{dCmd}
\CmdDescription Sets the height of the field to \ameta{length} and
resets the width to maintain the same aspect ration of the field.

\settowidth{\aebdimen}{\ttfamily scalefactor=\ameta{pos-num}}%
\def\1{\llap{\Cs{scalefactor}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1scalefactor=!ameta(pos-num)
\end{dCmd}
\CmdDescription Multiplies the width and height of the field by a scale
factor of \ameta{pos-num}. For example, setting \texttt{scalefactor=2} doubles
the length of the width and height of the field.



\subsection{The Action Tab}

There are several common actions that are supported through the user-friendly interface, these
are \texttt{goto} actions, and JavaScript actions.


\settowidth{\aebdimen}{\ttfamily goto=\darg{\meta{KV-pairs}}}
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
goto={!meta(KV-pairs)}
\end{dCmd}
\CmdDescription This key incorporates jumps to pages and destinations within the current PDF file,
and to pages and destinations to another PDF file. these are
\KVP There are a number of key-value pairs that are recognized,
\texttt{file}, \texttt{targetdest}, \texttt{labeldest}, \texttt{page},
\texttt{view}, and \texttt{open}. A brief description of each follows.
\begin{enumerate}
  \item \texttt{file}: Specify a relative path to the PDF file. This will work on the Web if
        the position is the same relative to the calling file. If the \texttt{file} key is not present,
        the jump is to a page or destination in the current file.
  \item \texttt{url}: This key is used to create a weblink, similar to what \cs{href} does.
        The value of this key is a url (\texttt{http}, \texttt{https}, \texttt{mailto}, etc.).
        If the \texttt{url} key is present, only the \texttt{openparams} key is recognized.
  \item \texttt{openparams}: Open parameters that should be included with the URL, as passed by
        the \texttt{url} key. These parameters are key value pairs \texttt{key=value} and are separated
        by an ampersand (\texttt{\&}).
        See \emph{\href{http://www.adobe.com/devnet/acrobat/?view=documentation}{Parameters for Opening PDF Files}} for more information, examples are found below.
  \item \texttt{targetdest}: Jump to a target, perhaps created by \verb|\hypertarget|. For example,
        if we say \verb|\hypertarget{acrotex}{Welcome!}|, we jump to the
        \texttt{acrotex} named destination by specifying \texttt{targetdest=acrotex}.
  \item \texttt{labeldest}: Same as \texttt{targetdest}, but we jump to a destination specified by
        a latex label. For example, if we type \verb|\section{AcroTeX}\label{acrotex}|,
        we can jump to this section by specifying \texttt{labeldest=acrotex}.

  \item \texttt{page}: The page number to which the \texttt{goto}
      action is to jump. If we set \texttt{page=1}, we will jump to the
      first page of the document.

  \item \texttt{view}: The view can be set when the \texttt{page} key is used.
    Possible values are \texttt{fitpage}, \texttt{actualsize},
    \texttt{fitwidth}, \texttt{fitvisible}, and \texttt{inheritzoom}.
    These terms correspond to \app{Acrobat}'s UI. When jumping to a
    destination, the view is set by the destination code.

  \item \texttt{open}: This key is used when you specify the \texttt{file} key. The
    \texttt{open} key determines if a new window is opened or not when the PDF viewer
    jumps to the file. Possible values are \texttt{userpref} (use user preferences),
    \texttt{new} (open new window), \texttt{existing} (use the existing window).

\end{enumerate}

\Example The following are examples of the \texttt{goto} key.
\begin{itemize}
    \item \setLink[\ui{goto={file=aeb_man.pdf,page=8,view=fitwidth}}]{AeB Manual}
\begin{Verbatim}[xleftmargin=\amtIndent]
\setLink[\ui{goto={file=aeb_man.pdf,page=8,%
    view=fitwidth}}]{AeB Manual}
\end{Verbatim}
This link should work on your local hard drive and it should work on
the web, from within a web browser, assuming \texttt{aeb\_man.pdf} is
in the same folder as \texttt{eformman.pdf}.

\item \setLink[\ui{goto={url=http://www.math.uakron.edu/~dpstory/acrotex/aeb_man.pdf,
    openparams={page=8&search=AcroTeX web exerquiz}}}]{AeB Manual on Web}
\begin{Verbatim}[xleftmargin=\amtIndent]
\setLink[\ui{%
    goto={url=http://www.math.uakron.edu/~dpstory/%
        acrotex/aeb_man.pdf,%
    openparams={page=8&search=AcroTeX web exerquiz}}}
        ]{AeB Manual on Web}
\end{Verbatim}
Here, we open the AeB Manual that is on the web, go to page 8, and search for the words
\texttt{AcroTeX}, \texttt{web}, and \texttt{exerquiz}.  Notice that we don't have to
do anything special with the tilde (\texttt{\string~}) or the sharp (\texttt{\#}), both of
these are handled by the \textsf{eforms} package.
\end{itemize}


\settowidth{\aebdimen}{\ttfamily js=\darg{\anglemeta{script}}}%
\def\1{\llap{\ttfamily\Cs{A}\darg{\Cs{JS}\darg{\anglemeta{script}}}\hspace{\marginparsep}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1js={!anglemeta(script)}
\end{dCmd}
\CmdDescription A general purpose key to execute JavaScript actions on a mouse up trigger.
The argument is a JavaScript text string, for example,
\begin{Verbatim}[xleftmargin=\amtIndent]
js={app.alert("Hello World!")}
\end{Verbatim}
The value of \texttt{js} may be a macro containing JavaScript, which would include
a macro created by the \texttt{defineJS} environment of \textsf{insdljs}.

% Next up are additional actions, and there are a lot of them. All these
% take JavaScript code as their values.
\settowidth{\aebdimen}{\ttfamily pageinvisible=\darg{\anglemeta{script}}}
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
mouseup={!anglemeta(script)}
mousedown={!anglemeta(script)}
onenter={!anglemeta(script)}
onexit={!anglemeta(script)}
onfocus={!anglemeta(script)}
onblur={!anglemeta(script)}
format={!anglemeta(script)}
keystroke={!anglemeta(script)}
validate={!anglemeta(script)}
calculate={!anglemeta(script)}
pageopen={!anglemeta(script)}
pageclose={!anglemeta(script)}
pagevisible={!anglemeta(script)}
pageinvisible={!anglemeta(script)}
\end{dCmd}
\CmdDescription These are all additional actions (\texttt{AA}) of a form field, which take as their values
JavaScript code (\anglemeta{script}).
 \begin{itemize}
   \item \texttt{mouseup}: Executes its code with a mouse up event. If there is a JavaScript
         action defined by the \texttt{js} key (or the \verb|\A| key), the \texttt{js} (\verb|\A|) action is executed.
   \item \texttt{mousedown}: Executes its when the mouse is hovering over the field and the user clicks
         on the mouse.
   \item \texttt{onenter}: Executes its code when the user moves the mouse into the form field (the bounding rectangle).
   \item \texttt{onexit}: Executes its code when the user moves the mouse out of the form field (the bounding rectangle).
   \item \texttt{onfocus}: Executes its code when the user brings the field into focus.
   \item \texttt{onblur}: Executes its code when the user brings the field loses focus (the user tabs away from
         the field, or click outside the field).
   \item \texttt{format}: JavaScript to format the text that appears to
           the user in a text field or editable combo box.
   \item \texttt{keystroke}: JavaScript to process each keystroke in a text field or editable combo box.
   \item \texttt{validate}: JavaScript to validate the committed data input into a text field or editable combo box.
   \item \texttt{calculate}: JavaScript to make calculations based on the values of other fields.
   \item \texttt{pageopen}: JavaScript that executes when the page containing the field is opened.
   \item \texttt{pageclose}: JavaScript that executes when the page containing the field is closed.
   \item \texttt{pagevisible}: JavaScript that executes when the page containing the field first becomes visible to the user.
   \item \texttt{pageinvisible}: JavaScript that executes when the page containing the field is no longer visible to the user.
 \end{itemize}

 \subsection{The Signed Tab}

 A signature field has a Signed tab. On that tab is an option to mark a set of fields
 as readonly (locked). The locked key controls that option.

\settowidth{\aebdimen}{\ttfamily lock=\darg{\anglemeta{PDF KV-pairs}}}
\def\1{\llap{\Cs{Lock}\hspace{\marginparsep}}}%Lock
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
!1lock={!anglemeta(KV-pairs)}
\end{dCmd}

\CmdDescription The \texttt{lock} key is used with signature fields; use the
\key{action} key (with supported values of \texttt{all}, \texttt{include}, and \texttt{exclude})
and the \key{fields} key to determine the lock action.
\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()]
%!sffamily lock all fields in the doc
lock={action=all}
% !sffamily lock all fields listed by !texttt(fields) key
lock={action=include,fields={!ameta(field!SUB1),!ameta(field!SUB2),...}}
% !sffamily lock all fields not listed by !texttt(fields) key
lock={action=exclude,fields={!ameta(field!SUB1),!ameta(field!SUB2),...}}
\end{Verbatim}

\newtopic Another option that is included in the \uif{Signed tab} is titled ``\uif{This script executes
when field is signed.}''

This is an option that, through the user interface, is mutually exclusive from
locking fields. This option is implemented through the format event;
thus, to populate this option with JavaScript use the \texttt{format} key. For example,
\begin{Verbatim}[xleftmargin=\amtIndent]
format={app.alert("Thank you for signing this field.");}
\end{Verbatim}

\part{Setting the Tab Order}

The \hypertarget{taborderPkg}{\pkg{taborder}} package is an internal AeB package that is called by
both the \textsf{eforms} and the \texttt{annot\_pro packages}. The
\texttt{taborder} package sets the tab order for form fields and link
annotations (when the link is created by the command \cs{setLink}, defined
in the \textsf{eforms} package. The package works for all drivers when
setting tab order by column, row, or widget order. For setting tabbing
order by structure, only documents generated using the \textbf{pdfmark}
are supported; those using the \textsf{dvips} or \textsf{dvipsone} driver along with Adobe
Distiller.

\section{Setting the Tab Order}

The tabbing order of the fields is usually the order in which the fields were created. In rare cases, it may be desirable to set the order to one of the orders defined by the PDF Reference.
\settowidth{\aebdimen}{\ttfamily \string\setTabOrder\darg{c|C|r|R|s|S|w|W|a|A|unspecified}}
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
\setTabOrder{c|C|r|R|s|S|w|W|a|A|unspecified}
\end{dCmd}

\CmdDescription Command Description: This command is page oriented, it sets to the tab order of fields on
the page the TEX compiler executes this command. The permissible values of the parameter are
described below, taken verbatim from the \emph{PDF Reference}, the cross-references that appear in the
descriptions are references to the \emph{PDF Reference} document.
\begin{itemize}
\item \texttt{c|C} (column order): ``Annotations are visited in columns running vertically up and down
the page. Columns are ordered by the Direction entry in the viewer preferences dictionary
(see Section 8.1, `Viewer Preferences'). The first annotation visited is the one at the top of
the first column. When the end of a column is encountered, the first annotation in the next
column is visited.''
\item  \texttt{r|R} (row order): ``Annotations are visited in rows running horizontally across the page.
The direction within a row is determined by the Direction entry in the viewer preferences
dictionary (see Section 8.1, `Viewer Preferences'). The first annotation visited is the first
annotation in the topmost row. When the end of a row is encountered, the first annotation
in the next row is visited.''
\item \texttt{s|S} (structure order): ``Annotations are visited in the order in which they appear in the
structure tree (see Section 10.6, ``Logical Structure''). The order for annotations that are not
included in the structure tree is application-dependent.''
\item \texttt{w|W} (version 9.0, widget order): ``Widget annotations are visited in the order in which they
appear in the page Annots array, followed by other annotation types in row order.''
\item \texttt{a|A} (version 9.0, annotations array order): ``All annotations are visited in the order in which
they appear in the page Annots array.'' (In version 9.0, this key is not implemented.)
\item \texttt{unspecified|empty} The tab order follows the order of the annotations as listed in the
Annots array. For LATEX, this is the order in which the annotations were created. You get
the same result if the argument is left empty \verb!\setTabOrder{}!, or if \cs{setTabOrder} is
not used at all. If an unrecognized argument is passed to \cs{setTabOrder}, \texttt{unspecified}
is used.
\end{itemize}
The behavior of tabbing has changed over the years; documentation of tabbing behavior is given
in the \emph{Adobe Supplement to the ISO 32000, BaseVersion 1.7, ExtensionLevel 3}.\footnote{\url{http://www.adobe.com/devnet/acrobat/pdfs/PDF3200_2008.pdf}} See the section
Errors and Implementation Notes. Annotations include things like form fields (widget annotations), links (link annotations) and
the various types of comment annotations. See section 8.4.5 of the PDF Reference.

The \cs{setTabOrder} command is available for users of pdftex and dvipdfm, as well as users of dvipsone and dvips (with distiller); for row, column, and widget (version 9 or later), the PDF viewer does all the work on tabbing, for tabbing using structure, one necessarily needs structure, otherwise, the tabbing follows row order. For users of Adobe Distiller, the \texttt{taborder} package provides two ways for defining the structure order; on any page in which structure order is used, use only one of the following commands:
\settowidth{\aebdimen}{\ttfamily\string\setTabOrderByNumber}
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
\setTabOrderByList
\setTabOrderByNumber
\end{dCmd}

\subsection{Using \tops{\protect\cs{setTabOrderByList}}{\CMD{setTabOrderByList}}}

We illustrate with a simple example, followed by a verbatim listing of the code, and a discussion
afterward. We begin by placing two text fields in a row; normally,we would tab from the first one created
by the {\TeX} compiler to the next one created. We use structure to reverse the order of tabbing.

\setTabOrder{s}     % set tab order to structure
\setTabOrderByList  % the default initially

\textField[\V{text1}\objdef{otext1}]{text1}{1.25in}{11bp}\\[3bp]
\textField[\V{text2}\objdef{otext2}]{text2}{1.25in}{11bp}

\setStructTabOrder{% The list of the fields in the desired order
    {otext2}
    {otext1}
}
\newtopic The verbatim listing of the above form fields follows:
\begin{Verbatim}[xleftmargin=\amtIndent]
\setTabOrder{s}     % set tab order to structure
\setTabOrderByList  % the default initially

\textField[\V{text1}\objdef{otext1}]{text1}{1.25in}{11bp}\\[3bp]
\textField[\V{text2}\objdef{otext2}]{text2}{1.25in}{11bp}

\setStructTabOrder{% The list of the fields in the desired order
    {otext2}
    {otext1}
}
\end{Verbatim}
\newtopic We begin by specifying \verb!\setTabOrder{s}! structure tab order. In the optional argument of the two text fields, we specify an object name for each. These names must be unique throughout the whole document; they are used to reference the fields when setting up the tabbing order.

The \cs{setStructTabOrder} is used to set up the tabbing order, its arguments (enclosed in
braces) consists of a list of object names (which must exist on the current page). The order of
the object names is the order of visitation when you tab. PDF objects not referenced are visited
last after the structure tabbing is complete.

After all annotations have been created on a page, we use the \cs{setStructTabOrder} to
actually set the tab order; this is none by simply listing the object names, in the desired order, of
the annotations you want included in the tabbing order. These annotations can be fields, links,
and markup comments, like sticky notes.

The syntax for \cs{setStructTabOrder} is

\bgroup\obeyspaces%
\settowidth{\aebdimen}{\ttfamily    [type=\anglemeta{type},title=\anglemeta{title}]\darg{\anglemeta{oRef\_n}}}%
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
\setStructTabOrder{%
    [type=!anglemeta(type),title=!anglemeta(title)]{!anglemeta(oRef_1)}
    [type=!anglemeta(type),title=!anglemeta(title)]{!anglemeta(oRef_1)}
    ...
    [type=!anglemeta(type),title=!anglemeta(title)]{!anglemeta(oRef_n)}
}
\end{dCmd}
\egroup\newtopic Each argument has an optional argument, the required argument (\anglemeta{<oRef\_i>}) is an object name
of a previously defined PDF object, such as a form field (widget), a link, or an annotation. The
optional argument takes two optional key-value pairs: (1) The type is a declaration of the type
the PDF object is, the default is \texttt{Form} (you can use \texttt{Link} if its a link, and \texttt{Annot} if its a comment);
(2) \texttt{title} is the title of the structure, the value of title appears in the Tags panel of the \app{Acrobat}
user interface. The default title is to have no title.

\newtopic The demo file is \marginpar{\mbox{\makebox[0pt][l]{\textcolor{blue}{\Pisymbol{webd}{254}}}\raisebox{-2pt}{\color{red}{{\zqacr
b\hspace{9.5pt}}}}}}\texttt{\href{\urlAcroTeXBlog/?p=320}{settaborder.pdf}} for these tabbing features,
including tabbing using structure, has its source file attached to the PDF file.
The file is posted one the \href{\urlAcroTeXBlog}{AeB Blog}.

\subsection{Using \tops{\protect\cs{setTabOrderByNumber}}{\CMD{setTabOrderByNumber}}}

An alternate method for setting tab order by structure is to directly enter the tab order into the
optional argument of the field, link, or comment annotation.

\setTabOrder{s} % set tab order to structure
\setTabOrderByNumber

\textField[\V{text3}\objdef{otext3}\taborder{1}]{text3}{1.25in}{11bp}\\[3bp]
\textField[\V{text3}\objdef{otext4}\taborder{0}]{text4}{1.25in}{11bp}

\newtopic The verbatim listing of the above form fields follows:
\begin{Verbatim}[xleftmargin=\amtIndent,]
\setTabOrder{s} % set tab order to structure
\setTabOrderByNumber

\textField[\V{text3}\objdef{otext3}\taborder{1}]
    {text3}{1.25in}{11bp}\\[3bp]
\textField[\V{text3}\objdef{otext4}\taborder{0}]
    {text4}{1.25in}{11bp}
\end{Verbatim}
\newtopic Note the user of the \cs{objdef} and \cs{taborder} keys. The latter is used to set the order of tabbing.

\newtopic\textcolor{red}{\textbf{Important:}} When setting tab order, there must be an object with \verb!\taborder{0}!; from what I've been able to observe, if no PDF object has tab order zero, the tabbing reverts to what is listed in the Annots array, which is the order the PDF objects were created. If you specify 0, 0, 1, 2, 3\dots, then the two PDF objects with tab order of 0 are visited in the order they were created. Similarly, for the other tab values. A tab order of 0, 2, 3, 4\dots seems to work as well. The object labeled 2 will be visited after the object labeled 0.

%The demo file, \texttt{settaborder1.pdf}, for these tabbing features, including tabbing using structure, has its source file attached to the PDF file. The file is posted one the \href{http://www.math.uakron.edu/~dpstory/aebblog.html}{AeB Blog}.

\newtopic The demo file is \marginpar{\mbox{\makebox[0pt][l]{\textcolor{blue}{\Pisymbol{webd}{254}}}\raisebox{-2pt}{\color{red}{{\zqacr
b\hspace{9.5pt}}}}}}\texttt{\href{\urlAcroTeXBlog/?p=334}{settaborder1.pdf}} for these tabbing features, including tabbing using structure, has its source file attached to the PDF file. The file is posted one the \href{\urlAcroTeXBlog}{AeB Blog}.


%------------------ End PDF Forms and Link ----------------------------

\part{Document and Page JavaScript}

%\section{Introduction}

The \hypertarget{insdljsPkg}{\pkg{insdljs}} package provides support to {\LaTeX} in four areas:
\begin{enumerate}
  \item for embedding document level JavaScript into the PDF file created
      from a {\LaTeX} source, the \texttt{insDLJS} environment.
  \item for creating open page actions that are executed when the document
      is first opened to the first page, the \cs{OpenAction} command.
  \item for writing JavaScript code in an environment that preserves the
      formatting of the code, this is the \texttt{defineJS} environment.
  \item for executing JavaScript code once to perform post-distillation
      tasks, this is the \texttt{execJS} environment. This environment
      works only for document authors that use \app{Acrobat}/\app{Acrobat}
      Distiller to create PDF files.
\end{enumerate}

\newtopic This package defines a new environment, \texttt{insDLJS}, used
for inserting \app{Acrobat} JavaScript into a PDF file created from a
\LaTeX{} source. This package works correctly for users of \app{pdflatex},
\app{lualatex}, or \app{xelatex}.
\gob{For\FmtMP{\small\raggedleft\app{Acrobat} required for \app{dvips}} those
who use \app{dvips} to produce a Postscript file,
which is then distilled, you are required to have \app{Acrobat}~5.0 (or
later).}
For document authors that use the workflow
\begin{equation}\text{\ttfamily
tex\,->\,dvi\,->\,\app{dvips}\,->\,ps\,->\,\ameta{\upshape\app{Distiller}\string|\app{ps2pdf}}\,->\allowbreak
\,\app{PDF viewer}}\label{eq:AcrobatWF}
\end{equation}
to create a PDF document, if the document (or one of the packages it
imports) uses \uif{Document JavaScripts} created by this package, at the end
of the above workflow, the \app{PDF viewer} \emph{is required to be}
\app{Acrobat}\FmtMP{\app{Acrobat} required}.\footnote{Other PDF creation
workflows do not require \app{Acrobat} to embed \uif{Document JavaScripts}}
The role of \app{Acrobat} is to embed the \uif{Document JavaScripts} in the
document for the workflow of
\hyperref[eq:AcrobatWF]{display~\bNH\eqref{eq:AcrobatWF}\eNH}.
It is necessary to install the folder JavaScript file \texttt{aeb.js} (read
\texttt{\href{install_jsfiles.pdf}{install\_jsfiles.pdf}} for instructions)
and to possibly configure \app{Acrobat} (read
\texttt{\href{acrobat-in-workflow.pdf}{acrobat-in-workflow.pdf}} to see how
to do this). For additional discussion on this workflow, refer to the section
titled ``Concerning the use of \app{Acrobat}'' in the
\texttt{\href{aeb_man.pdf\#DistAcroWF}{AeB Manual}}.

\section{Package Options}

The \textsf{insdljs} supports five common ``drivers'': \texttt{dvipsone},
\texttt{dvips}, \texttt{pdftex} (including the executable
\textsf{lu(la)tex}), \texttt{dvipdfm}, \texttt{dvipdfmx}, \texttt{xetex}, and
\texttt{tex\-tures}. When using \texttt{dvips}, \app{Acrobat} Distiller and
\app{Acrobat} (version 5.0 or later) are required to embed the JavaScripts at
the document level. The other drivers have primitives that allow the
embedding of the JavaScripts.

\newtopic Other options are discussed in the following paragraphs.
\begin{description}\def\NH{\hspace{-\labelsep}}
\item\NH\opt{nodljs} turns off the embedding of the document level
    JavaScript. This might be useful, for creating a paper document that is
    not interactive. For a non-interactive paper document, no JS is needed.

\item\NH\opt{execJS} is a very useful option/feature if you know  how to use
    it.  Any JavaScript that is written in an \env{execJS} environment is
    executed once when the document is first opened in \app{Acrobat}, then
    discarded. AeB uses this for post-distillation document processing. The
    default is that the JavaScript in an \texttt{execJS} environment is not
    executed; using this option turns on this feature.

\item\NH\opt{usealtadobe} imports alternate naming for most of Adobe's
    built in functions. All of Adobe built in functions begin with `AF',
    when this option is taken, the same functions are defined, but prefixed
    with `EF'. For example, \texttt{AFNumber\_Keystroke()} has an alias of
    \texttt{EFNumber\_Keystroke()}, when the \opt{usealtadobe} option is
    specified.

    \textbf{Developer's Note.} Use this option when developing new code
    that use the Adobe built-in functions. For developers that have
    \app{Acrobat}, it is useful to specify this option and to refer to the
    built-in function using the special syntax,
    \[\cs{dl@EForAF4\ameta{no-AF-function-name}}\]
    For example, \cs{dl@EForAF4Number\_Keystroke(0,0,0,0,"",true)} expands to
    \[\texttt{EFNumber\_Keystroke(0,0,0,0,"",true)}\] if \opt{usealtadobe} is taken,
    and \[\texttt{AFNumber\_Keystroke(0,0,0,0,"",true)}\] otherwise.

\item\NH\opt{debug} causes the document JavaScript created by the
    {\AcroTeX} Bundle to generate more debugging messages to the JavaScript
    console.

\end{description}

\section{The \texttt{insDLJS} and \texttt{insDLJS*} Environments}

These are the main environments defined by this package. There are
two forms of the document level environment, the \texttt{insDLJS} and the
\texttt{insDLJS*}.  First, we discuss what a document JavaScript is.

\subsection{What is Document Level JavaScript?}
The document level is a location in the PDF document where scripts can be stored.
When the PDF document is opened, the document level functions are scanned, and any
``exposed script'' is executed.

Normally, the type of scripts you would place at the document level are
general purpose JavaScript functions, functions that are called repeatedly
or large special purpose functions.  Functions at the document level are
known throughout the document, so they can be called by links, form
buttons, page open actions, etc.

Variables declared within a JavaScript function have local scope, they are
not known outside that function. However, if you can declare variables and
initialize them at the document level outside of a function, these
variables will have document wide scope. Throughout the document, the
values of these global variables are known. For example, suppose the
following code is at the document level:
\begin{Verbatim}[xleftmargin=\amtIndent]
var myVar = 17;       // defined outside a function, global scope
function HelloWorld()
{
    var x = 3;        // defined inside a function, local scope
    app.alert("AcroTeX, by Hech!", 3);
}
\end{Verbatim}
Both the function \texttt{HelloWorld()} and the variable \texttt{myVar}
are known throughout the document. The function \texttt{HelloWorld()} can
be called by a mouse up button action; some form field, executing some
JavaScript, may access the value of \texttt{myVar} and/or change its
value.  The variable \texttt{x} is not known outside of the
\texttt{HelloWorld()} function.

\subsection{The \texttt{insDLJS} Environment}

The \texttt{insDLJS} is the simplest of the two environments. Any material
within the environment, eventually ends up in the \textsf{DLJS} section of the
PDF document.

The environment takes the \meta{base\_name} and writes the
file \texttt{\anglemeta{base\_name}.djs}. This file contains a verbatim
listing of the JavaScript within the environment, plus some lines
that change catcodes. The file is then input into the document at
\cs{AtBeginDocument}.

The case of \textsf{dvipsone} and \textsf{dvips} is a little different. A
\texttt{\anglemeta{base\_name}.djs} is written and input back, and a second file
\texttt{\anglemeta{base\_name}.fdf} is written. The second file is later input
into the PDF document after distillation.

The syntax of usage for this environment, which takes three
arguments, is given next.
\settowidth{\aebdimen}{\cs{begin\darg{insDLJS}[\meta{js\_var}]\darg{\meta{base\_name}}\darg{\meta{script\_name}}}}
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
\begin{insDLJS}[!meta(js_var)]{!meta(base_name)}{!meta(script_name)}
...
    !anglemeta(JavaScript functions or exposed code)
...
\end{insDLJS}
\end{dCmd}
\EnvDescription JavaScript code is written within the \texttt{insDLJS} environment.
The code is stored as document-level JavaScript, and is global to the document. Functions
and variables defined at the top-most level are known to other form elements in the document.

The \texttt{insDLJS} is a verbatim environment, with backslash (\verb!\!)
and percentage (\texttt{\%}) maintaining their usual {\LaTeX} meaning.
Commands defined in the {\LaTeX} source file, therefore, are expanded
before the JavaScript is embedded in the PDF file. The left and right
braces are set to normal characters, so the commands can't have any
argument, they should be just text macros.

\PD The environment takes three parameters, the first is optional, but required
when  using the \app{Acrobat} Distiller.
\begin{description}\def\NH{\hspace{-\labelsep}}%
\item\NH\texttt{[\meta{js\_var}]} is an
    optional parameter \emph{was required} for the \texttt{dvipsone}
    and \texttt{dvips} options; otherwise it is ignored. Its value
    must be the name of one of the functions or JavaScript variables
    defined in the environment. This is used to detect whether the
    \textsf{DLJS} has already been loaded by \app{Acrobat}.

\handpoint The \texttt{[\meta{js\_var}]} is now optional even for
    users of \textsf{dvipsone} and \textsf{dvips}. If one is not
    provided, then appropriate code is automatically generated.

\item\NH \meta{base\_name} is an alphabetic word with no spaces and limited
    to eight characters.\footnote{There is actually no limitation on the
    number of characters in the name, this is a legacy statement from the
    days of DOS, you remember DOS, don't you?}  It is used to build the
    names of auxiliary files and to build the names of macros used by the
    environment.

\item\NH\meta{script\_name} is the name of the JavaScript that you are
    embedding in the document. This title will appear in the document
    JavaScript dialog in \app{Acrobat}; unless you use \app{Acrobat}, you can't
    see this name in the user interface anyway. The
    \meta{script\_name} should be a string that is descriptive of
    the functionality of the code.
\end{description}

\paragraph*{Commenting.} Within the \texttt{insDLJS} environment, there
are two types of comment characters: (1) a \TeX{} comment (\verb|%|) and
(2) a JavaScript comment.   The JavaScript comments are `\texttt{//}', a
line comment, and `\texttt{/*...*/}' for more extensive commenting. These
comments will survive and be placed into the PDF file. In JavaScript the
`\verb|%|' is used as well, use \verb|\%| when you want to use the percent
character in a JavaScript statement, for example \verb|app.alert("\%.2f", 3.14159);|,
this statement will appear within your JavaScript code as \verb|app.alert("%.2f", 3.14159);|.


\Example The following is a minimal illustration of the use of the
new environment. Here we assume the document author is using pdftex,
and is not using the wonderful packages of \textsf{web},
\textsf{exerquiz} or \textsf{eforms}. In this case, the hyperref
package with driver in the option must be introduced first, followed
by \textsf{insdljs} with the same driver, of course. The optional argument
of the \texttt{insDLJS} environment is not used in this example.
\begin{Verbatim}[xleftmargin=\amtIndent]
\documentclass{article}
\usepackage[pdftex]{hyperref}
\usepackage[pdftex]{insdljs}

\newcommand\tugHello{Welcome to TUG 2001!}
\begin{insDLJS}{mydljs}{My Private DLJS}
function HelloWorld() { app.alert("\tugHello", 3); }
\end{insDLJS}
\begin{document}
\begin{Form}     % a hyperref environment, needed for \PushButton
% use built in form button of hyperref
Push \PushButton[name=myButton,onclick={HelloWorld();}]{Button}
\end{Form}
\end{document}
\end{Verbatim}
\noindent The Form environment and the \cs{PushButton} command are defined
in the hyperref package. The \textsf{insDLJS} uses the Form environment,
the \textsf{eforms} package defines its own \cs{pushButton} command.

\Example Here is the same example as above, but with \textsf{dvips} as the
driver and using the \textsf{eforms} package, which calls
\textsf{insdljs}. Note the  use of the optional argument in the
\texttt{insDLJS} environment, and the missing \textsf{hyperref} package
statement and \texttt{Form} environment, the \textsf{eforms} package
automatically inserts this code.
\begin{Verbatim}[xleftmargin=\amtIndent]
\documentclass{article}
\usepackage[dvips]{eforms}

\newcommand\tugHello{Welcome to TUG 2001!}
\begin{insDLJS}[HelloWorld]{mydljs}{My Private DLJS}
function HelloWorld() { app.alert("\tugHello", 3); }
\end{insDLJS}
\begin{document}
\pushButton[\CA{Push}\A{\JS{HelloWorld();}}]{Button}{}{11bp}
\end{document}
\end{Verbatim}

\subsection{The \texttt{insDLJS*} Environment}

The \texttt{insDLJS*} environment can be used to better organize,
edit and debug your JavaScript. It is suitable for package
developers who write a large amount of code package application.

If you have the full \app{Acrobat} product, you can open the DLJS edit
dialog. There you will see a listing of all DLJS contained in the
document. When you double click on one of the \textit{script names},
you enter the edit window, where you can edit all JavaScript
contained under that name.

\bgroup\obeyspaces%
\settowidth{\aebdimen}{\ttfamily    \anglemeta{JavaScript functions or exposed code}}
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
\begin{insDLJS*}[!meta(js_var)]{!meta(base_name)}
\begin{newsegment}{!meta(script_name_1)}
    !anglemeta(JavaScript functions or exposed code)
\end{newsegment}
\begin{newsegment}{!meta(script_name_2)}
    !anglemeta(JavaScript functions or exposed code)
\end{newsegment}
...
...
\begin{newsegment}{!meta(script_name_n)}
    !anglemeta(JavaScript functions or exposed code)
\end{newsegment}
\end{insDLJS*}
\end{dCmd}
\egroup
\PD The environment takes two parameters, the first is optional, but required
when  using the \app{Acrobat} Distiller. The nested environment \texttt{newsegment} takes
one required parameter.
\begin{description}\def\NH{\hspace{-\labelsep}}
\item\NH\texttt{[\meta{js\_var}]} is an optional parameter, its use is discouraged.

\item\NH\meta{base\_name} is an alphabetic word with no spaces and
    limited to eight characters. It is used to build the names of auxiliary
    files and to build the names of macros used by the environment.
\item\NH\meta{script\_name\_i} is the script name (title) that appears in
    the Document level JavaScript dialog of \app{Acrobat}.
\end{description}

\subsection{Escaping}

JavaScript uses the backslash as an escape character, just as does \TeX. The insdljs pacakge
tries to make the transition from {\TeX} to JavaScript as easy as possible. In the table below,
is a listing of the more useful characters represented by a backslash.

\begin{tabular}{ll}
Sequence & Character represented \\
\cs{t}   & horizontal tab (\cs{u0009}) \\
\cs{n}   & newline (\cs{u000A}) \\
\cs{r}   & carriage return (\cs{u000D}) \\
\cs{"}   & double quote (\cs{u0022}) \\
\cs{'}   & apostrophe or single quote (\cs{u0027}) \\
\verb|\\|     & backslash (\cs{u005C})\\
\cs{xXX} & the Latin-1 character specified by the two hexadecimal digits \texttt{XX} \\
\cs{uXXXX}& the unicode character specified by the four hexadecimal digits \texttt{XXXX} \\
\cs{XXX} & the Latin-1 character specified by the octal digits \texttt{XXX}, between \\
      & 1 and 377. \\
\end{tabular}

\newtopic Within a JavaScript string, these special characters should be double escaped, \verb|\\|, like so:

\newtopic \pushButton[\textFont{Arial}\CA{Push Me}\A{\JS{%
    app.alert("The \\"cost\\" of this package is \\u20AC 0.\\rThis, \\"\\\\\\" is a backslash");
}}]{demoEsc}{}{11bp}

\begin{Verbatim}[xleftmargin=\amtIndent]
\pushButton[\textFont{Arial}\CA{Push Me}\A{\JS{%
    app.alert("The \\"cost\\" of this package is \\u20AC 0.\\rThis,
    \\"\\\\\\" is a backslash");
}}]{demoEsc}{}{11bp}
\end{Verbatim}
\newtopic Note the double backslash of backslash, which comes out to four, count them four backslashes,
`'\verb|\\\\|''.

Again, both JavaScript and \TeX, certain punctuation marks have special meaning; in the case of
JavaScript, punctuation has a special meaning within regular expressions:
\begin{flushleft}
\textbf{Special Punctuation in Regular Expressions}
\begin{Verbatim}[xleftmargin=\amtIndent]
     ^ $ . * + ? = ! : | \ / ( ) [ ] { }
\end{Verbatim}
\end{flushleft}
\noindent When these occur in a regular expression, within a string, they need to be double escaped, \verb|\\|.
Outside of a sting, they need only be escaped.

\Example The following code searches through the string \texttt{str} and
replaces every occurrence of the period character with ``\verb|\.|''.
\begin{Verbatim}[xleftmargin=\amtIndent]
str = "AcroTeX rocks. AcroTeX rolls."
str = str.replace(/\./g, "\\.");
\end{Verbatim}
\noindent When this code is executed, the result is
``AcroTeX rocks\verb|\.| AcroTeX rolls\verb|\.|''.

\Example If one of these special characters appears outside a
JavaScript string, within a regular expression pattern, for example,
they need only be escaped. The code \verb|(/\)\^\(/.test(str))|
searches the string \texttt{str} for any occurrence of ``\verb!)^(!''
and returns \texttt{true} if such a pattern is found, \texttt{false}
otherwise. If \verb!str="(x+1)^(3)"!, the search returns \texttt{true}.

\subsection{Access and Debugging}
For those who do not have \textsf{\app{Acrobat}}, the application,
unless you are writing very simple code, writing and debugging
JavaScript will be very difficult.  From the \app{Acrobat} Reader,
there is no access to the document JavaScript. You will be
pretty much writing blind.

Normally, I develop the JavaScript from within \app{Acrobat}. The GUI editor
does check for syntax errors, giving you a chance to correct some simple
errors as you go. After I am satisfied with my code, I copy it from the
editor and paste it into a \texttt{insDLJS} environment. This is how the
JavaScript code of \textsf{exerquiz} was developed.

In my opinion, if you want to develop rather complicated code, having the
full \app{Acrobat} product is a must. (This implies that the Windows or Mac
platform is needed!)

\subsection{JavaScript References}

The JavaScript used by \app{Acrobat} consists of the core JavaScript plus \app{Acrobat}'s JavaScript extensions.
The \textit{Core JavaScript Reference}~\cite{tech:NetscapeJSReference} may be found at
\mlhref{http://developer.mozilla.org/en/docs/JavaScript}{Mozilla Developer Center}.
The documentation for the \app{Acrobat} extensions may be found in the guides
\textit{JavaScript for \app{Acrobat} API Reference}~\cite{tech:AcroJSRef}
and \textit{Developing \app{Acrobat} Applications using JavaScript}~\cite{tech:AcroJSGuide}, both of which I've had a hand in writing. These
are found at \href{http://www.adobe.com/devnet/acrobat/}{\app{Acrobat} Developer Center}. (Click on \textbf{JavaScript for \app{Acrobat}} in the right-hand navigation panel.)

\section{Open Action}

This package also defines an \cs{OpenAction} command to introduce actions that are
executed when the PDF document is  opened on page~1. The open action command only
applies to page~1.
\settowidth{\aebdimen}{\ttfamily\string\OpenAction\darg{\meta{action\_code}}}
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
\OpenAction{!meta(action_code)}
\end{dCmd}
\CmdLoc This command must appear in the preamble of the document.

\CmdDescription Executes the action(s) each time page~1 is
opened. The argument \texttt{<action\_code>} is any action subtype, as listed
in Section 8.5.3 of the \emph{PDF Reference, sixth edition, PDF
1.7}. Two common types are JavaScript and Named actions. The \cs{OpenAction}
command may be repeated, which will add to the list of open actions
to be executed at the opening of page~1.

Special commands are defined in \textsf{insdljs}, \cs{JS} and \cs{Named}, that
make it easy to specify these types of actions.

\Example \verb|\OpenAction{\JS{app.alert("Hello World!");}}|

\Example You can use \cs{r} and \cs{t}---carriage return and tab,
respectively---to format multiple lines of JavaScript:
\begin{Verbatim}[xleftmargin=\amtIndent]
\OpenAction{\JS{%
    app.alert("Hello World!");\r
    app.alert("Good Day to You!");
}}
\end{Verbatim}

\Example Multiple \cs{OpenAction} can be entered. Code is executed in the same order.
Here, we show an alert box with a message, then jump to the last page.
\begin{Verbatim}[xleftmargin=\amtIndent]
\OpenAction{\JS{app.alert("AcroTeX rocks the world!");}}
\OpenAction{\Named{LastPage}}
\end{Verbatim}

\newtopic For the other pages, beyond page~1, \cs{thisPageAction} can be used;
the command can also be used for page~1 as well (it must go in the
preamble).

\settowidth{\aebdimen}{\ttfamily\string\thisPageAction\darg{\meta{open\_script}}\darg{\meta{close\_script}}}
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
\thisPageAction{!meta(open_script)}{!meta(close_script)}
\end{dCmd}
\CmdLoc For page~1, this command must go in the preamble, otherwise, it
goes on the page for which it is intended.

\CmdDescription \meta{open\_script} is an action that is to be
executed when the current page is opened; \meta{close\_script} is an
action to be executed when the current page is closed.

\Example Below is a simple example of how to use \cs{thisPageAction}.
\begin{Verbatim}[xleftmargin=\amtIndent]
...
\thisPageAction{\JS{console.println("Open: page 1");}}
    {\JS{console.println("Close: page 1");}}
\begin{document}
page 1
\newpage
page 2
\thisPageAction{\JS{console.println("Open: page 2");}}
    {\JS{console.println("Close: page 2");}}
...
\end{document}
\end{Verbatim}
When \cs{thisPageAction} is executed in the preamble,
the \texttt{<open\_action>} argument gets passed to
the \cs{OpenAction} command.

\section{The \textsf{execJS} Environment}

This is an environment useful to PDF developers who want to tap into
the power of JavaScript. To use this environment, the developer
needs \app{Acrobat}~5.0 or higher. \textsf{pdftex} or \textsf{dvipdfm} can
be used to produce the PDF document, but the developer needs
the \app{Acrobat} product for this environment to do anything.

The \texttt{execJS} is used primarily for post-distillation
processing (post-creation processing, in the case of \textsf{pdftex}
and \textsf{dvipdfm}). The \texttt{execJS} environment can be used,
for example, to automatically import named icons into the document,
which can, in turn, be used for an animation.

The \textsf{execJS} is an environment in which you can write
verbatim JavaScript code. This environment is a variation on
\textsf{insdljs}, it writes a couple of auxiliary files to disk; in
particular, the environment creates an \texttt{.fdf} file. When the
newly produced PDF is loaded for the first time into the viewer
(\app{Acrobat}, not Reader), the \texttt{.fdf} file generated
by the \textsf{execJS} environment is imported, and the JavaScript
executed. This JavaScript is \emph{not} saved with the document.
The syntax of this environment is\dots

\settowidth{\aebdimen}{\ttfamily\string\begin\darg{execJS}\darg{\meta{name}}}
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
\begin{execJS}{!meta(name)}
....
!anglemeta(JavaScript code)
....
\end{execJS}
\end{dCmd}

\PD The environment takes one required argument, the base name of the
auxiliary files to be generated.

Many of the more useful JavaScript methods have security restrictions,
the developer must create folder JavaScript that can be used to \emph{raise
the privilege} of the methods.

\Example Here is an extensive example taken from the AeB Pro distribution.
The following code is user folder JavaScript code, see the AeB Pro documentation
on how to locate the user JavaScript folder. We define a function \texttt{aebTrustedFunctions}
that is the interface to accessing the restricted methods.
\begin{Verbatim}[xleftmargin=\amtIndent]
/*
    AEB Pro Document Assembly Methods
    Copyright (C) 2006 AcroTeX.Net
    D. P. Story
    http://www.acrotex.net
    Version 1.0
*/
if ( typeof aebTrustedFunctions == "undefined") {
    aebTrustedFunctions = app.trustedFunction(
        function ( doc, oFunction, oArgs ) {
        app.beginPriv();
            var retn = oFunction( oArgs, doc )
        app.endPriv();
        return retn;
    });
}
// Add a watermark background to a document
aebAddWatermarkFromFile = app.trustPropagatorFunction (
    function ( oArgs, doc ) {
    app.beginPriv();
        return retn = doc.addWatermarkFromFile(oArgs);
    app.endPriv();
});
\end{Verbatim}

Once this code is installed in the user JavaScript folder, and \app{Acrobat} is re-started, the code
is ready to be used. The way the code is used is with the \texttt{execJS} environment.

\begin{Verbatim}[xleftmargin=\amtIndent]
\def\bgPath{"/C/acrotex/ManualBGs/Manual_AeB.pdf"}
\begin{execJS}{execjs}
    aebTrustedFunctions( this, aebAddWatermarkFromFile,
        {bOnTop: false, cDIPath: \bgPath} )
\end{execJS}
\end{Verbatim}

\newtopic This is the code used to prepare this manual. It places a
background graphic on each page of the document.  When the newly
distilled document is first opened in \app{Acrobat}, (version 7.0 or
higher, is when the privilege bit started to appear), the trusted
function \texttt{aebTrustedFunctions} is executed with its
arguments. Looking at the definition of
\texttt{aebTrustedFunctions}, what is executed is
\begin{Verbatim}[xleftmargin=\amtIndent]
app.beginPriv();
    return retn = this.addWatermarkFromFile({bOnTop: false,
        cDIPath: "/C/acrotex/ManualBGs/Manual_AeB.pdf"});
app.endPriv();
\end{Verbatim}
\newtopic AeB Pro, the {Acro\!\TeX} Presentation Bundle and @EASE use these execJS techniques.

\section{The \textsf{defineJS} Environment}\label{defineJS}

When you create a form element (button, text field, etc.), you
sometimes want to attach JavaScript.  The \texttt{defineJS}
environment aids you in writing your field level JavaScript. It too
is a verbatim environment, however, this environment does not write to an auxiliary
file, but saves the contents in a token register. The contents of
the register are used in defining a macro that expands to the
verbatim listing.

\settowidth{\aebdimen}{\ttfamily\string\begin\darg{defineJS}[\ameta{chngCats}]\darg{\cs{\ameta{cmd}}}}
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
\begin{defineJS}[!ameta(chngCats)]{\!ameta(cmd)}
!qquad!ameta(script)
\end{defineJS}
\end{dCmd}

\PD The \texttt{defineJS} environment takes two parameters, the first
optional. the required parameter is the command name to be defined. Use the
optional first parameter (\ameta{chngCats}) to modify the verbatim
environment, as illustrated in the example below. The \ameta{script} is saved
under the command name \cs{\ameta{cmd}}. The \texttt{defineJS} is a complete
verbatim environment: no escape, and no comment characters are defined. You
can use the optional parameter to create an escape character;  you can pretty
much use any character you wish, \emph{except} the usual one `\verb+\+',
backslash.

\Example The following example illustrates the usage of the \texttt{defineJS} environment.
\begin{dCmd*}{.67\linewidth}
% Make @ the escape so we can
% demonstrate the optional parameter.
\def\HelloWorld{Hello World!}
\begin{defineJS}[\catcode`\@=0\relax]{\JSA}
var sum = 0;
for (var i = 0; i < 10; i++)
{
    sum += i;
    console.println("@HelloWorld i = " + i );
}
console.println("sum = "+sum);
\end{defineJS}
\begin{defineJS}{\JSAAE}
console.println("Enter the button area");
\end{defineJS}
\begin{defineJS}{\JSAAX}
console.println("Exiting the button area");
\end{defineJS}
\pushButton[\A{\JS{\JSA}}
    \AA{\AAMouseEnter{\JS{\JSAAE}}
        \AAMouseExit{\JS{\JSAAX}}}
]{myButton}{30bp}{15bp}
\end{dCmd*}
\newtopic The code lines of \cs{JSAAE} and \cs{JSAAX} are so simple, \env{defineJS} environment
was really not needed.

\newtopic See \Nameref{lengthyJS} for an additional example of the use of the \texttt{defineJS} environment.

The \pkg{insdljs} package defines two ``silent'' versions of \env{defineJS}, these are
\env{@defineJS} and \env{defineJS*}.
\settowidth{\aebdimen}{\ttfamily\string\begin\darg{@defineJS}[\ameta{chngCats}]\darg{\cs{\ameta{cmd}}}}
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
\begin{@defineJS}[!ameta(chngCats)]{\!ameta(cmd)}
!qquad!ameta(script)
\end{@defineJS}
!STRUT!vrbnormal !texttt(defineJS*) is a public version !texttt(@defineJS)
!STRUT\begin{defineJS*}[!ameta(chngCats)]{\!ameta(cmd)}
!qquad!ameta(script)
\end{defineJS*}
\end{dCmd}
\medskip\noindent
Use \env{defineJS*} in the body of the document; the command argument \cs{\ameta{cmd}} can be silently
used and redefined in a later \env{defineJS*} environment.
The \env{@defineJS} environment is for package authors.

\paragraph*{The \tops{{\protect\env{defineJS}}}{defineJS}-type environments with arguments.}\label{para:defineJSwArgs}
%\index{defineJS with arguments@\env{defineJS} with arguments}
The \env{defineJS}-type environments do not have parameters/arguments as
normal environments (or commands) do. To enable the ability to  modify the
JavaScript code within the environment of \env{defineJS}, the command pair
\cs{bParams}/\allowbreak\cs{eParams} is defined.
\settowidth{\aebdimen}{\ttfamily\string\bParams\darg{\ameta{token\SUB1}}\darg{\ameta{token\SUB2}}...\darg{\ameta{token\SUB{n}}}\string\eParams}
\begin{dCmd}[commandchars=!()]{\aebdimen+2\fboxsep+2\fboxrule}
\bParams{!ameta(token!SUB1)}{!ameta(token!SUB2)}...{!ameta(token!SUB(n))}\eParams
\end{dCmd}
\medskip\noindent When you use one of the \env{defineJS} environments to define field level
JavaScript, you can include symbolic parameters/arguments \cs{p(1)}, \cs{p(2)}, and so
on, within the body of the environment. At the time of expansion of the
command \cs{\ameta{cmd}}, a substitution is made: \cs{p(1)} expands to
\ameta{token\SUB1}, \cs{p(2)} expands to \ameta{token\SUB1}, and so on. Note
that the argument of \cs{p}, which is only locally defined, is enclosed with
\emph{parentheses}. Before continuing with the discussion, consider the following
example.
\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars={@^\%}]
\begin{defineJS*}[\catcode`\!=0\relax]{\myCode}
var p1=@textbf^!p(1)%, p2=@textbf^!p(2)%;
app.alert("p1 + p2 = " + Number(p1+p2) );
\end{defineJS*}
\end{Verbatim}
Within the body of a \env{defineJS} environment, there is no escape character
unless you change catcode of another character within the optional argument
of the \env{defineJS} environment. In the above example, the exclamation mark
is declared as the escape.
\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars={!()}]
\pushButton[\cmd{!textbf(\bParams{1}{16}\eParams)}
  \A{\JS{\myCode}}]{pbfld1}{.5in}{11bp}
\end{Verbatim}
When this button is pressed, an alert message appears `\uif{p1 + p2 = 17}'.
We can reuse this code later with other parameters:
\begin{Verbatim}[xleftmargin=\amtIndent,fontsize=\small,commandchars={!()}]
\pushButton[\cmd{!textbf(\bParams{77}{11}\eParams)}
  \A{\JS{\myCode}}]{pbfld2}{.5in}{11bp}
\end{Verbatim}
Now the message is `\uif{p1 + p2 = 88}'.

In both examples, the special key \cs{cmd} is used to pass the
\cs{bParams}/\allowbreak\cs{eParams} command pair into \pkg{eforms}' parsing
stream; this keeps the declaration local. The \hyperlink{cmd}{\cs{cmd}} key is described in
\hyperref[supportedKVs]{Appendix~\ref*{supportedKVs}}, titled `\nameref{supportedKVs}', beginning on \pageref*{supportedKVs}; specifically,
\cs{cmd} is listed in under the heading \textcolor{blue}{Specialized, non-PDF Spec commands}.

%http://www.acrotex.net/blog/?p=1442

\exAeBBlogPDF{p=1442} A comprehensive discussion of the features to the \env{defineJS}
environment is found in the article titled \href{\urlAcroTeXBlog/?p=1442}{\relax{\protect\pkg{insdljs}}: Exploring the {\protect\env{defineJS}} environment} from the {\AcroBlog}
website.\footnote{\url{http://www.acrotex.net/blog/?p=1442}}

\newpage
%\appendix
\markright{Appendix}
\part{Appendices}\label{appendix}
%\section*{Appendix}\label{appendix}
% \addcontentsline{toc}{section}{\protect\numberline{}Appendix}

\appendixsubsection{The Annotation Flag \textsf{F}}
%\addcontentsline{toc}{appendixsubsection}{\protect\numberline{}The Annotation Flag \textsf{F}}

The annotation flag \textsf{F} is a bit field that is common to all
annotations.

\begin{center}
\begin{tabular}{>{\small\ttfamily\bslash}l>{\small}l}
\multicolumn{2}{>{\bfseries}l}{Annotation Flag \textsf{F}}\\\hline
\multicolumn{1}{>{\bfseries\small}l}{\hypertarget{tableF}{Flag}} &\multicolumn{1}{>{\bfseries\small}l}{Description}\\
FHidden    & hidden field \\
FPrint     & print\\
FNoView    & no view\\
FLock      & locked field (PDF 1.4)\\
\end{tabular}
\end{center}

\medskip\noindent
In the user interface for \app{Acrobat}, there are four visibility
attributes for a form field. The table below is a list of these,
and an indication of how each visibility attribute can be attained
through the \textsf{F}.

\begin{center}
\begin{tabular}{>{\small}l>{\small}l}
\bfseries \hypertarget{visibility}{UI Description}&\bfseries Use\\\hline
 Visible (and printable)     &  \\
 Hidden but printable        & \verb+\F{\FNoView}+\\
 Visible but doesn't print   & \verb+\F{\FNoPrint}+\\
 Hidden (and does not print) & \verb+\F{\FHidden}+  \\
\end{tabular}
\end{center}
\redpoint All fields created by the \textsf{eForm} commands are
printable by default.


\newpage

% Field Flags /Ff
% Choice : Pushbuttons, Checkboxes, Radio Buttons
% Text Fields
% Choice Fields: list box, combo box
% Signature fields
\appendixsubsection{Annotation Field flags \textsf{Ff}}
%\addcontentsline{toc}{appendixsubsection}{\protect\numberline{}Annotation Field flags \textsf{Ff}}

The table below lists some convenience macros for setting the \textsf{Ff} bit field.

\begin{longtable}{>{\small\ttfamily\targ}l>{\small}l>{\small}l}
\multicolumn3{>{\bfseries}c}{\hypertarget{tableFf}{Annotation Field flags} \textsf{Ff}}\\\hline
\multicolumn1{>{\bfseries\small}l}{Flag}& \multicolumn1{>{\bfseries\small}l}{Description}&\multicolumn1{>{\bfseries\small}l}{Fields}\\
\endfirsthead
\multicolumn1{>{\bfseries\small}l}{Flag}& \multicolumn1{>{\bfseries\small}l}{Description}&\multicolumn1{>{\bfseries\small}l}{Fields}\\
\endhead
FfReadOnly?           &  Read only field               & all \\
FfRequired?           &  Required field (Submit)       & all \\
FfNoExport?           &  Used with Submit Action       & all \\
FfMultiline?          &  For Multiline text field      & text\\
FfPassword?           &  Password field                & text \\
FfNoToggleToOff?      &  Used with Radio Buttons       & Radio only\\
FfRadio?              &  Radio Button Flag             & Radio if set\\
FfPushButton?         &  Push Button Flag              & Push button\\
FfCombo?              &  Combo Flag                    & choice\\
FfEdit?               &  Edit/NoEdit                   & combo\\
FfSort?               &  Sort List                     & choice\\
FfFileSelect?         &  File Select  (PDF 1.4)        & text\\
FfMultiSelect?        &  multiple select (PDF 1.4)     & choice\\
FfDoNotSpellCheck?    &  Do not spell check (PDF 1.4)  & text, combo\\
FfDoNotScroll?        &  do not scroll (PDF 1.4)       & text\\
FfComb?               &  comb field  (PDF 1.5)         & text\\
FfRadiosInUnison?     &  radios in unison  (PDF 1.5)   & radio\\
FfCommitOnSelChange?  &  commit on change (PDF 1.5)    & choice\\
FfRichText?           &  rich text (PDF 1.5)           & text\\
\end{longtable}

\newpage

\appendixsubsection{Supported Key Variables}\label{supportedKVs}
%\addcontentsline{toc}{appendixsubsection}{\protect\numberline{}Supported Key Variables}

Below is a list of the keys supported for modifying the appearance
or for creating an action of a field. If the default value of a
key is empty, e.g., \verb+\Ff{}+, then that key does not appear in
the widget.  The \app{Acrobat} viewer may have a default when any
particular key does not appear, e.g. \verb+\W{}+ will be
interpreted as \verb+\W{1}+ by the viewer.

\newtopic In the past, the value of the \Cs{textColor} key must include the color model specification:
\begin{itemize}
\item \texttt{g} (for gray scale): a single number between 0 and 1; example, \verb!\textColor{.5 g}!
\item \texttt{rg}: Red Green Blue: a list of three numbers between 0 and 1 giving the components of color; for example \verb!\textColor{.1 .2 .3 rg}!
\item \texttt{k} Cyan Magenta Yellow [K]Black: a list of four numbers between 0 and 1 giving the components of the color according to the subtractive model used in most printers; for example \verb!\textColor{.1 .2 .3 .4 k}!
\end{itemize}
In this current version of \textsf{eforms}, the color model can be optionally included. The \textsf{eforms} package will supply the correct specification as a function of the number of arguments provided. Thus, the examples above can now be written as \verb!\textColor{.5}!, \verb!\textColor{.1 .2 .3}!, and \verb!\textColor{.1 .2 .3 .4}!.

\newtopic\textbf{\textcolor{red}{Note:}} Regarding the keys \Cs{textColor}, \Cs{BG}, \Cs{BC}, and \cs{Color}\footnote{Information regarding the \cs{Color}
key may be found in \hyperref[linkAnnots]{Section~\ref*{linkAnnots}},
page~\pageref*{linkAnnots}. The \cs{Color} key is more fully documented in
the rather comprehensive article
\textsl{\href{http://www.math.uakron.edu/~dpstory/aebblog/aeb_links.pdf}{Support
for Links in AeB/eForms}} posted on the
\href{\urlAcroTeXBlog}{AeB Blog}.},
beginning with \textsf{eforms} dated 2010/07/23 or later, \textsf{eforms}
now uses the \textsf{hycolor} package to process all color keys (listed
above); consequently, if the \textsf{xcolor} package is also loaded on
your system, you can use \emph{named colors} to specify color for the
\textsf{eforms} keys. For example, if the definition was made
\begin{Verbatim}[xleftmargin=\amtIndent]
\definecolor{myBlue}{rgb}{0.24,0.38,0.68}
\end{Verbatim}
then each of the following is valid: \verb!\textColor{myBlue}! (for specifying text color for text fields), \verb!\BG{myBlue}! (for specifying the background color of a field), \verb!\BC{myBlue}! (for specifying the border color of a field), and \verb!\Color{myBlue}! (for specifying the border color of a link).


\paragraph*{Setting some defaults.} Before getting to the specification of
the key-values, there are two convenience commands for setting the default
text font and text size. These are
\cs{textFontDefault\darg{\ameta{font-spec}}}
(\cs{textFontDefault\darg{Helv}}) for setting the default text font and
\cs{textSizeDefault\darg{\ameta{size}}} (\cs{textSizeDefault\darg{9}}) for
setting the default text size.

\newpage
\begingroup
\setlength{\extrarowheight}{3mm}\setlength{\tabcolsep}{3pt}

\begin{longtable}{>{\small\ttfamily\targ}r>{\small\PBS\raggedright}p{2.25in}>{\small}p{1.25in}}
\multicolumn{3}{>{\bfseries}c}{Supported Key \hypertarget{kv}{Variables}}\\
\multicolumn1{>{\bfseries\small}l}{Key}& \multicolumn1{>{\bfseries\small}l}{Description}&\multicolumn1{>{\bfseries\small}l}{Default}\\\hline
\endfirsthead
\multicolumn1{>{\bfseries\small}l}{Key}& \multicolumn1{>{\bfseries\small}l}{Description}&\multicolumn1{>{\bfseries\small}l}{Default}\\\hline
\endhead
%----------------------------------------------------------------
\multicolumn{3}{l}{\color{blue}Entries common to all annotations:}\\
F?       & See the \hyperlink{tableF}{annotation \textsf{F} flag Table}  &\verb+\F{}+\\
\multicolumn{3}{>{\small\bfseries}l}{Border Style Dictionary (BS)}\\
W?   & Width in points around the boundary of the field,
      for example, \verb+\W{1}+.                          &\verb+\W{}+\newline (same as \verb+\W{1})+\\
S?   & Line style, values are \texttt{S} (solid), \texttt{D} (dashed),
      \texttt{B} (beveled), \texttt{I} (inset), \texttt{U} (underlined); \verb+\S{B}+ &\verb+\S{}+\\
AA?     & Additional actions, a dictionary. These actions are triggers by mouse up, mouse down,
         mouse enter, mouse exit, on focus, on blur events; for text and editable combo boxes there is also
         the format, keystroke, validate and calculate events. The various triggers are discussed in
         \nameref{triggers}.
       & \verb+\AA{}+ \newline(no actions)\\
A?      & Action dictionary, use this to define JavaScript actions, as well as other actions,
          for mouse up events. See \nameref{triggers} for a discussion of the mouse up event.
       & \verb+\A{}+\newline(no action)\\
Border? & Used with link annotations, an array of three numbers and an optional dash array.
         If all three numbers are 0, no border is drawn &\verb+\Border{0 0 0}+\newline (no border)\\
D?      & (link annotations) An array of two numbers that set the dash pattern of a link annotation.
          The default is 3, which means 3 points of line, 3 points gap.
          A value of \cs{D\darg{3 2}} means three points of line, followed
          by two points of space.\\
AP?     & Appearance dictionary, used mostly in {\AcroT} with check boxes
         to define the `On' value. &\verb+\AP{}+\\
AS?     & Appearance state, normally used with check boxes and radio buttons when there are
         more than one appearance. Advanced techniques only. &\verb+\AS{}+\\\hline
%--------------------------------------------------------------
\multicolumn{3}{l}{\color{blue}Entries common to all fields:}\\
TU? & Tool tip (PDF 1.3), for example, \verb+\TU{Address}+. Obeys \texttt{unicode} option.&\verb+\TU{}+\\
Ff? & See the \hyperlink{tableFf}{Field flag \textsf{Ff} table}; e.g. \verb+\Ff{\FfReadOnly}+
     makes the field read only. & \verb+\Ff{}+\\
DV?  & Default value of a field. This is the value that appears when the field is reset;
      e.g., \verb+\DV{Name:}+. Obeys \texttt{unicode} option.&\verb+\DV{}+\\
V?   & Current value of the field; for example, \verb+\V{D. P. Story}+. Obeys \texttt{unicode} option.&\verb+\V{}+\\\hline
%--------------------------------------------------------------
\multicolumn{3}{l}{\color{blue}Entries specific to a widget annotation:}\\
H? & Highlight, used in button fields and link annotations. Possible values
 are \texttt{N} (None), \texttt{P} (Push), \texttt{O} (Outline), \texttt{I} (Invert); e.g.,
 \verb+\H{P}+.&\verb+\H{}+\newline(same as \verb+\H{I}+)\\
%\pagebreak
\multicolumn{3}{>{\small\bfseries}l}{Appearance Characteristics Dictionary (MK)}\\
MK?& A dictionary that contains the keys listed below. For all fields
     the \texttt{MK} has a template that is filled in using the keys below; this key
     is available only for check boxes and radio buttons. & various\\
R? & Number of degrees the field is to be rotated counterclockwise.
    Must be a multiple of 90 degrees; \verb+\R{90}+.&\verb+\R{}+\\
BC?& The boundary color, a list of 0 (transparent), 1 (gray), 3 (RGB) or 4 (CMYK)
    numbers between 0 and 1. For example, \verb+\BC{1 0 0}+ is a red border.
    &\verb+\BC{}+\newline(transparent)\\
BG?& Background color. Color specification same as \cs{BC}&\verb+\BG{}+\newline(transparent)\\
CA?& Button fields (push, check, radio) The widget's normal caption; e.g. \verb+\CA{Push}+,
    in the case of a push button. For check boxes and radio, the value of
    \cs{CA} is a code that indicates whether a check, circle, square, star, etc.
    is used.  These codes are introduced through \cs{symbolchoice}. Obeys \texttt{unicode} option.&\verb+\CA{}+\\
RC?& Push button fields only. The roll over text caption. Obeys \texttt{unicode} option.&\verb+\RC{}+\\
AC?& Push button fields only. The down button caption. Obeys \texttt{unicode} option.&\verb+\AC{}+\\
mkIns?& A variable for introducing into the \texttt{MK} dictionary any other key-value pairs not listed above.
        Principle examples are \texttt{I}, \texttt{RI}, \texttt{IX}, \texttt{IF}, \texttt{TP},
        which are used for displaying icons on a button field. See an
        example in the demo file \textsf{eforms.tex} &\verb+\mkIns{}+\\
I?   & (push buttons only) an indirect reference to a form XObject defining the buttons's
      \emph{normal icon}&\verb+\I{nIcon}+\newline(example)\\
RI?   & (push buttons only) an indirect reference to a form XObject
        defining the buttons's \emph{rollover icon}&\verb+\RI{rIcon}+\newline(example)\\
IX?   & (push buttons only) an indirect reference to a form XObject
        defining the buttons's \emph{down icon}&\verb+\I{dIcon}+\newline(example)\\
importIcons? & (push buttons only) a special key to signal that this button is the target
of JavaScript that will supply the icons faces. Syntax: \cs{importIcons\darg{y|n}}&\verb|\importIcons{n}|\\
TP?   &\hskip-2\tabcolsep \texttt{\darg{\ameta{\upshape{0|1|2|3|4|5|6}}}} (push buttons only; optional)
        A code indicating the \texttt{layout} of the text and icon; these codes are
        0~(label only); 1~(icon only); 2~(label below icon); 3~(label above icon); 4~(label to the right of icon);
        5~(label to the left of icon); 6~(label overlaid on the icon). The default is 0.&\verb+\TP{0}+\\
SW?   & \hskip-2\tabcolsep\texttt{\darg{\ameta{\upshape{A|B|S|N}}}} (push buttons only; optional) The \emph{scale when key}. Permissible values are \texttt{A} (always scale),
        \texttt{B} (scale when icon is too big), \texttt{S} (scale when icon is too small), \texttt{N}
        (never scale). The default is \texttt{A}. &\verb+\SW{A}+\\
ST?     &\hskip-2\tabcolsep \texttt{\darg{\ameta{\upshape{A|P}}}} (push buttons only; optional) The \emph{scaling type.} Permissible values are \texttt{A}
            (anamorphic scaling); \texttt{P} (proportional scaling). The default is \texttt{P}.
            &\verb+\ST{P}+\\
PA?     &\hskip-2\tabcolsep \texttt{\darg{\ameta{num\SUB1\space num\SUB2}}} (push buttons only; optional) The \textit{position array.} An array of two numbers, each
            between 0 and 1 indicating the fraction of left-over space to allocate at the left and bottom
            of the annotation rectangle. The two numbers should be separated by a space. The default value, \verb!\PA{.5 .5}!,
            centers the icon in the rectangle. & \verb!\PA{.5 .5}!\\
FB?  &  \hskip-2\tabcolsep\texttt{\darg{true|false}} (push buttons only; optional) The \emph{fit bounds} Boolean. If \texttt{true}, the button appearance
        is scaled to fit fully within the bounds of the annotation without taking into consideration
        the line width of the border. &\verb+\FB{false}+\\\hline
%--------------------------------------------------------------
%\pagebreak
\multicolumn{3}{l}{\color{blue}Entries common to fields containing variable text:}\\
Q?      & \hskip-2\tabcolsep\texttt{\darg{0|1|2|empty}} Quadding for text fields. Values are \texttt{0} (left-justified),
         \texttt{1} (centered), \texttt{2} (right-justified); e.g., \verb+\Q{1}+.
       &\verb+Q{}+\newline(left justified)\\
\pagebreak
\multicolumn{3}{>{\small\bfseries}l}{Default Appearance (DA)}\\
DA?       & Default appearance string of the text in the widget. Normally, you just
           specify text font, size and color. Can be redefined, advance techniques needed.&\\
textFont? &\hskip-2\tabcolsep \texttt{\darg{\ameta{font-spec}}} Font to be used to display the text &\verb+\textFont{Helv}+\\
textSize? &\hskip-2\tabcolsep \texttt{\darg{\ameta{num}}} The size in points of the text &\verb+\textSize{9}+\\
textColor?&\hskip-2\tabcolsep \texttt{\darg{\ameta{color-spec}}} The color of the text.
  There are several color spaces, including
  grayscale and RGB; for example, \verb+\textColor{1 0 0 rg}+,
  gives a red font. Recent advances in parsing this command have eliminated the
  need to include the color space specification. Thus, \verb+\textColor{1 0 0}+
  also gives a red font.
  &\verb+\textColor{0 g}+\\\hline
%------------------------------------------------------------------
%\pagebreak
\multicolumn{3}{l}{\color{blue}Entries specific to text fields:}\\
MaxLen?   &\hskip-2\tabcolsep \texttt{\darg{\ameta{num{\upshape|empty}}}} The maximum length of the text string input into a text field.
           Used also with comb fields to set the number of combs.
           Example, \verb+\MaxLen{15}+.&\verb+\MaxLen{}+\\\hline
%------------------------------------------------------------------
\multicolumn{3}{l}{\color{blue}Entries specific to signature fields:}\\
Lock?   & This key is used to lock fields after the signature field is
           signed. Example, \verb+\Lock{/Actions/All}+. See
           \autoref{sigfields}, page~\pageref*{sigfields} for more examples.
            &\verb+\Lock{}+\\\hline
%-------------------------------------------------------------------
%\pagebreak
\multicolumn{3}{l}{\color{blue}Entries that change the width and height of a field:}\\
rectW? & \hskip-2\tabcolsep \texttt{\darg{\ameta{length}}} Set the width of a field to \ameta{length},
         the height is not changed&\cs{rectW\darg{}}\\
rectH? & \hskip-2\tabcolsep\texttt{\darg{\ameta{length}}} Set the height of a field to \ameta{length},
         the width is not changed&\cs{rectH\darg{}}\\
width? & \hskip-2\tabcolsep\texttt{\darg{\ameta{length}}} Set the width to \ameta{length} and re-scale  the height to keep the same
          aspect ratio & \cs{width\darg{}}\\
height? \hskip-2\tabcolsep& \texttt{\darg{\ameta{length}}} Set the height to \ameta{length} and re-scale  the width to keep the same
          aspect ratio & \cs{height\darg{}}\\
scalefactor? & \hskip-2\tabcolsep\texttt{\darg{pos-num}} Re-scales both the width and height by a scale factor of
          \ameta{pos-num} & \cs{scalefactor\darg{}}\\

%-------------------------------------------------------------------
%\pagebreak
\multicolumn{3}{l}{\color{blue}Specialized, non-PDF Spec commands:}\\
rawPDF?  &\hskip-2\tabcolsep \texttt{\darg{\ameta{PDF-KVPs}}} If all else fails, you can always introduce key-value pairs
          through this variable. &\verb+\rawPDF{}+\\
autoCenter? &\hskip-2\tabcolsep\texttt{\darg{y|n}} There is a centering code that attempts to give a pleasant
             placement of the field. \verb+\autoCenter{n}+
             turn auto centering off.&\\
inline?  &\hskip-2\tabcolsep \texttt{\darg{y|n}} If \mlcs{inline\darg{y}}, an alternate method is used
           get a better vertical positioning. Designed for inline form fields.
           The default is \mlcs{inline\darg{n}}.\\
presets? & \hskip-2\tabcolsep\texttt{\darg{\ameta{\cs{cmd}}}} This commands takes a macro as its argument, the text of the macro
          are key-value pairs. This is useful for setting up a series of
          presets for fields. Example, \verb|\presets{\myFavFive}|\\
symbolchoice? & \hskip-2\tabcolsep\texttt{\darg{\ameta{symbol-choice}}} Use this variable to specify what symbol is to be used
               with a check box or radio button. Possible values are
               \texttt{check}, \texttt{circle}, \texttt{cross},
               \texttt{diamond}, \texttt{square} and \texttt{star}. Can
               be used to globally change the symbol choice as well; for
               example, \verb+\symbolchoice{check}+, which is the
               default value.\\
cmd? &\hskip-2\tabcolsep\texttt{\darg{\ameta{cmd-args}}} Passes its argument into the key-value parsing stream, refer
to page~\pageref{para:defineJSwArgs} for an example.\\
linktxtcolor? & \hskip-2\tabcolsep\texttt{\darg{\ameta{named-color{\upshape|empty}}}} The value of this variable is a named color and is the
               color of the link text. Only recognized
               in link annotations. A value of
               \verb!\linktxtcolor{}! paints the text the \cs{normalcolor}.&\cs{linktxtcolor}\newline\verb+   {\@linkcolor}+\\\hline
\multicolumn{3}{l}{\color{blue}Special link key-values used by \pkg{aeb\_mlink} and \pkg{annot\_pro}}\\
mlstrut? & \hskip-2\tabcolsep\texttt{\darg{\ameta{strut}}} Adjusts the height of a multi-line link, e.g., \verb!\mlstrut{\large\strut}!
         &\verb~\mlstrut{\strut}~\\
mlcrackat?& \hskip-2\tabcolsep\texttt{\darg{\ameta{num{\upshape|empty}}}} Used to break a multi-line link across a page boundary;
     specifying \verb~\mlcrackat{3}~ breaks the link after the 3rd syllable. The \pkg{aeb\_mlink}
     package then creates two links consisting of the text up to and including the crack-at value and
     the second link consisting of the rest of the hypertext link (or url) string.
     &\verb~\mlcrackat{}~\\
mlhyph? & \hskip-2\tabcolsep\texttt{\darg{y|n}} A key that takes `y' or `n' as its value. If `y' is passed, then a hyphen is inserted after
    the break in a multi-line link that crosses a page boundary.
    & \cs{mlhyph\darg{n}}\\
mlignore? & \hskip-2\tabcolsep\texttt{\darg{\upshape0|1}} An internal switch used in building multi-line links and text markup annotations
that cross page boundaries. \emph{Do not use}.
  &\cs{mlignore\darg{0}}\\
mlcrackinsat? &\hskip-2\tabcolsep\texttt{\darg{\ameta{latex-content}}} This key inserts
its argument after the hyphen (if there is one) at the point declared by the \cs{crackat} value.
& \cs{mlcrackinsat\darg{}}
\end{longtable}
\endgroup

%The JavaScript used by \app{Acrobat} consists of the core JavaScript plus \app{Acrobat}'s JavaScript extensions.
%Core JavaScript can be found at \href{http://developer.mozilla.org/en/docs/JavaScript}{Mozilla Developer Center}.\footnote
%{\url{http://developer.mozilla.org/en/docs/JavaScript}}
%and documentation of the \app{Acrobat} extensions can be found in the guides \texttt{JavaScript for \app{Acrobat} API Reference}
%and \emph{Developing \app{Acrobat} Applications using JavaScript}, both of which I've had a hand in writing. These
%can be found at the \href{http://www.adobe.com/devnet/acrobat/}{\app{Acrobat} Developer Center},\footnote
%{\url{http://www.adobe.com/devnet/acrobat/}}. Click on \textbf{JavaScript for \app{Acrobat}} in the right-hand navigation panel.


\newpage
\markright{References}

\begin{thebibliography}{[1]}\label{references}
\addcontentsline{toc}{section}{\protect\numberline{}References}

\bibitem{tech:NetscapeJSGuide}
    \textit{Core JavaScript Guide}, available from \href{http://developer.mozilla.org/en/docs/JavaScript}{Mozilla Developer Center}.

\bibitem{tech:NetscapeJSReference}
    \textit{Core JavaScript Reference} available from \href{http://developer.mozilla.org/en/docs/JavaScript}{Mozilla Developer Center}.

\bibitem{tech:AcroJSGuide}
   \textit{Developing \app{Acrobat} Applications using JavaScript}, available from
   \mlhref{http://www.adobe.com/devnet/acrobat/}{\mbox{\app{Acrobat}} Developer Center}.

\bibitem{tech:AcroJSRef}\hypertarget{references}{}%
   \textit{JavaScript for \app{Acrobat} API Reference},available from
   \href{http://www.adobe.com/devnet/acrobat/}{\app{Acrobat} Developer Center}.


\bibitem{tech:PDFRef}
    \textit{PDF Reference, sixth edition, PDF 1.7}, available from
   \href{http://www.adobe.com/devnet/acrobat/}{\app{Acrobat} Developer Center}.

\end{thebibliography}

\end{document}


\def\@eqautoCenter#1{\let\autoCenter=#1}
\let\autoCenter=y
\def\@eqsymbolchoice#1{\expandafter\ifx\csname eq@#1\endcsname\relax
   \typeout{exerquiz: `#1' is not an acceptable option
   for \string\symbolechoice, inserting default, `check'.}
   \edef\symbol@choice{\eq@check}\else
   \edef\symbol@choice{\csname eq@#1\endcsname}\fi
}
\def\eq@protect#1{\let#1=\@empty}


% \begin{localJS}
% \begin{defineJS}{\validateJS}
% if (event.value > 1000 || event.value < -1000) {
%     app.alert("Invalid value, rejecting your value!");
%     event.rc = false;
% }
% \end{defineJS}
% \textField[\AA{
%     \AAKeystroke{AFNumber_Keystroke(2, 0, 1, 0, "\\u0024", true);}
%     \AAFormat{AFNumber_Format(2, 0, 1, 0, "\\u0024", true);}
%     \AAValidate{\validateJS}}]{myTexta}{1.5in}{12bp}
% \end{localJS}

% \textField[\AA{
%     \AAKeystroke{AFNumber_Keystroke(2, 0, 1, 0, "\\u0024", true);}
%     \AAFormat{AFNumber_Format(2, 0, 1, 0, "\\u0024", true);}
%     \AAValidate{%
%         if (event.value > 1000 || event.value < -1000) {\r\t
%             app.alert("Invalid value, rejecting your value!");\r\t
%             event.rc = false;\r
%         }
%     }
%     }]{myTexta}{1.5in}{12bp}

9.0:Close|GeneralInfo|Quit|FirstPage|PrevPage|NextPage|LastPage|ActualSize|FitPage|FitWidth|FitHeight|SinglePage|OneColumn|TwoPages|TwoColumns|ZoomViewIn|ZoomViewOut|ShowHideBookmarks|ShowHideThumbnails|Print|GoToPage|ZoomTo|GeneralPrefs|SaveAs|FullScreen|OpenOrganizer|Scan|Web2PDF:OpnURL|AcroSendMail:SendMail|Spelling:CheckSpelling|PageSetup|Find|FindSearch|GoBack|GoForward|FitVisible|                       ShowHideToolbarCommenting|ShowHideToolbarEdit|ShowHideToolbarFile|ShowHideToolbarFind|ShowHideToolbarForms|ShowHideToolbarMeasuring|ShowHideToolbarData|ShowHideToolbarPageDisplay|ShowHideToolbarNavigation|ShowHideToolbarPrintProduction|ShowHideToolbarRedaction|ShowHideToolbarBasicTools|ShowHideToolbarTasks|ShowHideToolbarTypewriter|PropertyToolbar|ShowHideArticles|ShowHideFileAttachment|ShowHideAnnotManager|ShowHideFields|ShowHideOptCont|ShowHideModelTree|ShowHideSignatures|InsertPages|ExtractPages|ReplacePages|DeletePages|CropPages|RotatePages|AddFileAttachment|FindCurrentBookmark|BookmarkShowLocation|GoBackDoc|GoForward   |DocHelpUserGuide|HelpReader|rolReadPage|HandMenuItem|ZoomDragMenuItem|ShowHideToolbarEditing|Annots:Tool:InkMenuItem
9.2:Close|GeneralInfo|Quit|FirstPage|PrevPage|NextPage|LastPage|ActualSize|FitPage|FitWidth|FitHeight|SinglePage|OneColumn|TwoPages|TwoColumns|ZoomViewIn|ZoomViewOut|ShowHideBookmarks|ShowHideThumbnails|Print|GoToPage|ZoomTo|GeneralPrefs|SaveAs|FullScreen|OpenOrganizer|Scan|Web2PDF:OpnURL|AcroSendMail:SendMail|Spelling:CheckSpelling|PageSetup|Find|FindSearch|GoBack|GoForward|FitVisible|ShowHideToolbarEditing|ShowHideToolbarCommenting|ShowHideToolbarEdit|ShowHideToolbarFile|ShowHideToolbarFind|ShowHideToolbarForms|ShowHideToolbarMeasuring|ShowHideToolbarData|ShowHideToolbarPageDisplay|ShowHideToolbarNavigation|ShowHideToolbarPrintProduction|ShowHideToolbarRedaction|ShowHideToolbarBasicTools|ShowHideToolbarTasks|ShowHideToolbarTypewriter|PropertyToolbar|ShowHideArticles|ShowHideFileAttachment|ShowHideAnnotManager|ShowHideFields|ShowHideOptCont|ShowHideModelTree|ShowHideSignatures|InsertPages|ExtractPages|ReplacePages|DeletePages|CropPages|RotatePages|AddFileAttachment|FindCurrentBookmark|BookmarkShowLocation|GoBackDoc|GoForwardDoc|DocHelpUserGuide|HelpReader|rolReadPage|HandMenuItem|ZoomDragMenuItem|                       Annots:Tool:InkMenuItem|CollectionHome|CollectionDetails|CollectionPreview|CollectionShowRoot