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  {{streamlen}}
36>>
37stream
38function TestOneFormat(fmt, src) {
39  var title = "('" + fmt + "', '" + src + "')";
40  try {
41    app.alert(title +  " => '" + util.printx(fmt, src) + "'");
42  }
43  catch (e) {
44    app.alert(title + ": Caught error: " + e);
45  }
46}
47
48// Error cases
49try {
50  util.printx();
51} catch (e) {
52  app.alert('PASS: ' + e);
53}
54try {
55  util.printx("99");
56} catch (e) {
57  app.alert('PASS: ' + e);
58}
59
60TestOneFormat("", "");
61TestOneFormat("", "123");
62TestOneFormat("??", "");
63TestOneFormat("??", "f2");
64TestOneFormat("??", "f27");
65TestOneFormat("XXX", "");
66TestOneFormat("XXX", "1afp3.");
67TestOneFormat("XXX", "-1Afp3.d33F$");
68TestOneFormat("AAA", "");
69TestOneFormat("AAA", "-1Afp3.");
70TestOneFormat("AAA", "-1Afp3.d33F$");
71TestOneFormat("999", "");
72TestOneFormat("999", "-1Afp3.");
73TestOneFormat("999", "-1Afp3.d33F$");
74TestOneFormat("9*9", "");
75TestOneFormat("9*9", "-1Afp3.");
76TestOneFormat("[*]X", "-1Afp3.");
77TestOneFormat("<*", "-1Afp3.d33F$");
78TestOneFormat(">*", "-1Afp3.d33F$");
79TestOneFormat("<[AAAAAAAAAAA]", "-1Afp3.d33F$");
80TestOneFormat(">[AAAAAAAAAAA]", "-1Afp3.d33F$");
81TestOneFormat("<[XXXXXXXXXXX]", "-1Afp3.d33F$");
82TestOneFormat(">[XXXXXXXXXXX]", "-1Afp3.d33F$");
83TestOneFormat("<[XXXXXXXXXXX]", "-1Afp3.d33F$");
84TestOneFormat(">[???????????]", "-1Afp3.d33F$");
85TestOneFormat("<[???????????]", "-1Afp3.d33F$");
86TestOneFormat("\\>[\\**]", "-1Afp3.d33F$");
87TestOneFormat("\\>[\\\\**]", "-1Afp3.d33F$");
88TestOneFormat("=*", "-1Afp3.d33F$");
89TestOneFormat("<??????=*", "-1Afp3.d33F$");
90TestOneFormat(">??????=*", "-1Afp3.d33F$");
91TestOneFormat(">??????<*", "-1Afp3.d33F$");
92TestOneFormat("clams", "-1Afp3.d33F$");
93TestOneFormat("cl9ms", "-1Afp3.d33F$");
94TestOneFormat("cl\\9ms", "-1Afp3.d33F$");
95endstream
96endobj
97{{xref}}
98{{trailer}}
99{{startxref}}
100%%EOF
101