1{{header}}
2{{object 1 0}} <<
3  /Type /Catalog
4  /Pages 2 0 R
5  /AcroForm 4 0 R
6  /OpenAction 10 0 R
7>>
8endobj
9{{object 2 0}} <<
10  /Type /Pages
11  /Count 1
12  /Kids [
13    3 0 R
14  ]
15>>
16endobj
17% Page number 0.
18{{object 3 0}} <<
19  /Type /Page
20  /Parent 2 0 R
21  /Resources <<
22    /Font <</F1 15 0 R>>
23  >>
24  /Contents [21 0 R]
25  /MediaBox [0 0 612 792]
26  /Annots [7 0 R 8 0 R 9 0 R]
27>>
28endobj
29% Forms
30{{object 4 0}} <<
31  /XFA [
32    (xdp:xdp) 23 0 R
33    (form) 29 0 R
34    (</xdp:xdp>) 30 0 R
35  ]
36  /Fields [
37    5 0 R
38  ]
39>>
40endobj
41% Fields
42{{object 5 0}} <<
43  /T (MyField)
44  /Kids [
45    6 0 R
46  ]
47  /Rect [100 100 400 400]
48>>
49endobj
50{{object 6 0}} <<
51  /Parent 5 0 R
52  /FT /Btn
53  /Kids [
54    7 0 R
55    8 0 R
56    9 0 R
57  ]
58  /Rect [200 200 220 220]
59>>
60endobj
61{{object 7 0}} <<
62  /Parent 6 0 R
63  /Type /Annot
64  /Subtype /Widget
65  /Rect [220 220 240 240]
66>>
67endobj
68{{object 8 0}} <<
69  /Parent 6 0 R
70  /Type /Annot
71  /Subtype /Widget
72  /Rect [240 240 260 260]
73>>
74endobj
75{{object 9 0}} <<
76  /Parent 6 0 R
77  /Type /Annot
78  /Subtype /Widget
79  /Rect [240 240 260 260]
80>>
81endobj
82% OpenAction action
83{{object 10 0}} <<
84  /Type /Action
85  /S /JavaScript
86  /JS 11 0 R
87>>
88endobj
89% JS program to exexute
90{{object 11 0}} <<
91  {{streamlen}}
92>>
93stream
94var theName = "MyField";
95function Mangles() {
96  app.alert('Starting ...');
97  try {
98    var annots = this.getAnnots();
99    annots[0].name = {
100      toString: () => {
101        app.alert('Firing ...');
102        this.removeField(theName);
103        gc();
104        return false;
105      }
106    };
107  } catch (e) {
108    app.alert("failed: " + e);
109  }
110}
111Mangles();
112endstream
113endobj
114{{object 23 0}} <<
115  {{streamlen}}
116>>
117stream
118<?xml version="1.0" encoding="UTF-8"?>
119<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/">
120endstream
121endobj
122{{object 29 0}} <<
123  {{streamlen}}
124>>
125stream
126<config></config>
127<template></template>
128endstream
129endobj
130{{object 30 0}} <<
131  {{streamlen}}
132>>
133stream
134</xdp:xdp>
135endstream
136endobj
137{{xref}}
138{{trailer}}
139{{startxref}}
140%%EOF
141