• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{{header}}
2{{object 1 0}} <<
3  /Type /Catalog
4  /Pages 2 0 R
5  /OpenAction 20 0 R
6>>
7endobj
8{{object 2 0}} <<
9  /Type /Pages
10  /Count 1
11  /Kids [10 0 R]
12>>
13endobj
14{{object 10 0}} <<
15  /Type /Page
16  /Parent 2 0 R
17  /MediaBox [0 0 612 792]
18  /Annots [22 0 R]
19  /Tabs /R
20>>
21endobj
22{{object 20 0}} <<
23  /Type /Action
24  /S /JavaScript
25  /JS 21 0 R
26>>
27endobj
28{{object 21 0}} <<
29  {{streamlen}}
30>>
31stream
32app.alert("Test that non-existent annot fetch gives error");
33try {
34  var nonesuch = this.getAnnot(0, "nonesuch");
35  app.alert("nonesuch: " + typeof nonesuch);
36} catch (e) {
37  app.alert("SUCCESS: " + e);
38}
39app.alert("Test initial cases");
40try {
41  var annot = this.getAnnot(0, "Annot-1");
42  app.alert("annot: " + typeof annot);
43  app.alert("hidden: " + annot.hidden);
44  app.alert("name: " + annot.name);
45  app.alert("type: " + annot.type);
46
47  annot.hidden = true;
48  app.alert("hidden now: " + annot.hidden);
49  annot.hidden = false;
50  app.alert("hidden now: " + annot.hidden);
51
52  annot.name = "nonesuch";
53  app.alert("name now: " + annot.name);
54} catch (e) {
55  app.alert("ERROR: " + e);
56}
57app.alert("Test assigment to read-only property gives error");
58try {
59  annot.type = 42;
60} catch (e) {
61  app.alert("SUCCESS: " + e);
62}
63app.alert("Test lookup after name change gives error");
64try {
65  annot = this.getAnnot(0, "Annot-1");
66  app.alert("annot after name change: " + typeof annot);
67} catch (e) {
68  app.alert("SUCCESS: " + e);
69}
70app.alert("Test lookup under changed name");
71try {
72  nonesuch = this.getAnnot(0, "nonesuch");
73  app.alert("nonesuch after name change: " + typeof nonesuch);
74} catch (e) {
75  app.alert("ERROR: " + e);
76}
77endstream
78endobj
79{{object 22 0}} <<
80  /Type /Annot
81  /Subtype /Highlight
82  /Rect [475 681 512 690]
83  /NM (Annot-1)
84  /F 2
85  /QuadPoints [475 688 512 688 475 679 512 679]
86  /C [0.0001108646 0.001760244 0.9982184]
87  /Contents ()
88>>
89endobj
90{{xref}}
91{{trailer}}
92{{startxref}}
93%%EOF
94