blob: 23dc42357b1ec4f29fd29bc7a0497e588a42215a [file] [log] [blame]
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -07001{{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>>
kumarashishg826308d2023-06-23 13:21:22 +000026endobj
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070027% OpenAction action
28{{object 10 0}} <<
29 /Type /Action
30 /S /JavaScript
31 /JS 11 0 R
32>>
33endobj
kumarashishg826308d2023-06-23 13:21:22 +000034% JS program to execute
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070035{{object 11 0}} <<
Haibo Huang49cc9302020-04-27 16:14:24 -070036 {{streamlen}}
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070037>>
38stream
39function TestOneInput(x) {
40 try {
41 var s = util.byteToChar(x);
42 if (s.length) {
43 s = s.charCodeAt(0);
44 }
45 app.alert(x + " => " + s);
46 }
47 catch (e) {
48 app.alert(x + ": Caught error: " + e);
49 }
50}
51TestOneInput(0);
52TestOneInput(65);
53TestOneInput(127);
54TestOneInput(128);
55TestOneInput(255);
56TestOneInput(256);
57TestOneInput(40000000);
58TestOneInput(-1);
59try {
60 util.byteToChar();
61}
62catch (e) {
63 app.alert("Caught expected error: " + e);
64}
65try {
66 util.byteToChar({x:39});
67}
68catch (e) {
69 app.alert("Caught expected error: " + e);
70}
71endstream
72endobj
73{{xref}}
Haibo Huang49cc9302020-04-27 16:14:24 -070074{{trailer}}
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070075{{startxref}}
76%%EOF