• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{{header}}
2{{object 1 0}} <<
3  /Type /Catalog
4  /Pages 2 0 R
5  /OpenAction 10 0 R
6>>
7endobj
8{{object 2 0}} <<
9  /Type /Pages
10  /Count 1
11  /Kids [
12    3 0 R
13  ]
14>>
15endobj
16% Page number 0.
17{{object 3 0}} <<
18  /Type /Page
19  /Parent 2 0 R
20  /Resources <<
21    /Font <</F1 15 0 R>>
22  >>
23  /Contents [21 0 R]
24  /MediaBox [0 0 612 792]
25>>
26% OpenAction action
27{{object 10 0}} <<
28  /Type /Action
29  /S /JavaScript
30  /JS 11 0 R
31>>
32endobj
33% JS program to exexute
34{{object 11 0}} <<
35>>
36stream
37
38function doTest(name, props) {
39  try {
40    for (var i = 0; i < props.length; ++i) {
41      var expr = name + "." + props[i];
42      app.alert(expr + " is " + eval(expr));
43    }
44  } catch (e) {
45    app.alert("ERROR: " + e.toString());
46  }
47}
48
49function doGlobalTest(props) {
50  try {
51    for (var i = 0; i < props.length; ++i) {
52      app.alert(props[i] + " is " + eval(props[i]));
53    }
54  } catch (e) {
55    app.alert("ERROR: " + e.toString());
56  }
57}
58
59function doGlobalArrayTest(props) {
60  try {
61    for (var i = 0; i < props.length; ++i) {
62      app.alert(props[i] + " is\n  " + eval(props[i]).join(",\n  "));
63    }
64  } catch (e) {
65    app.alert("ERROR: " + e.toString());
66  }
67}
68
69function doEqualityTests() {
70  app.alert("String equality test (==): " +
71            (IDS_GREATER_THAN == IDS_GREATER_THAN));
72  app.alert("String equality test (===): " +
73            (IDS_GREATER_THAN === IDS_GREATER_THAN));
74  app.alert("Array equality test (==): " +
75            (RE_PHONE_COMMIT == RE_PHONE_COMMIT));
76  app.alert("Array equality test (===): " +
77            (RE_PHONE_COMMIT === RE_PHONE_COMMIT));
78}
79
80try {
81  doTest("border", ["s", "b", "d", "i", "u", "nonesuch"]);
82  doTest("display", ["visible", "hidden", "noPrint", "noView", "nonesuch"]);
83  doTest("font", ["Times", "TimesB", "TimesI", "TimesBI", "Helv", "HelvB",
84                  "HelvI", "HelvBI", "Cour", "CourB", "CourI", "CourBI",
85                  "Symbol", "ZapfD", "Nonesuch"]);
86
87  doTest("highlight", ["n", "i", "p", "o", "nonesuch"]);
88  doTest("position", ["textOnly", "iconOnly", "iconTextV", "textIconV",
89                      "iconTextH", "textIconH", "overlay", "nonesuch"]);
90
91  doTest("scaleHow", ["proportional", "anamorphic", "nonesuch"]);
92  doTest("scaleWhen", ["always", "never", "tooBig", "tooSmall", "nonesuch"]);
93  doTest("style", ["ch", "cr", "di", "ci", "st", "sq", "nonesuch"]);
94  doTest("zoomtype", ["none", "fitP", "fitW", "fitH", "fitV", "pref", "refW",
95                      "nonesuch"]);
96
97  doGlobalTest([
98    "IDS_GREATER_THAN",
99    "IDS_GT_AND_LT",
100    "IDS_LESS_THAN",
101    "IDS_INVALID_MONTH",
102    "IDS_INVALID_DATE",
103    "IDS_INVALID_VALUE",
104    "IDS_AM",
105    "IDS_PM",
106    "IDS_MONTH_INFO",
107    "IDS_STARTUP_CONSOLE_MSG"
108  ]);
109
110  doGlobalArrayTest([
111    "RE_NUMBER_ENTRY_DOT_SEP",
112    "RE_NUMBER_COMMIT_DOT_SEP",
113    "RE_NUMBER_ENTRY_COMMA_SEP",
114    "RE_NUMBER_COMMIT_COMMA_SEP",
115    "RE_ZIP_ENTRY",
116    "RE_ZIP_COMMIT",
117    "RE_ZIP4_ENTRY",
118    "RE_ZIP4_COMMIT",
119    "RE_PHONE_ENTRY",
120    "RE_PHONE_COMMIT",
121    "RE_SSN_ENTRY",
122    "RE_SSN_COMMIT"
123  ]);
124
125  doEqualityTests();
126} catch (e) {
127  app.alert("ERROR: " + e.toString());
128}
129endstream
130endobj
131{{xref}}
132trailer <<
133  /Root 1 0 R
134>>
135{{startxref}}
136%%EOF
137
138