Add embedder test for looping/leakage disclosed by bug 306123.

Adds a hand-minimized PDF that triggers the issue, and runs
it as an embedder test so we can easily conditionally disable
it from ASAN until the leak is fixed.

Bug: chromium:306123
Change-Id: I82670366d5560bba6658f597aa2b15bda24b91a6
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/54090
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/BUILD.gn b/BUILD.gn
index f0a6fee..97dfbd6 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -353,6 +353,7 @@
     deps += [
       "fpdfsdk/fpdfxfa:embeddertests",
       "xfa/fwl:embeddertests",
+      "xfa/fxfa/layout:embeddertests",
       "xfa/fxfa/parser:embeddertests",
     ]
   }
diff --git a/testing/resources/bug_306123.in b/testing/resources/bug_306123.in
new file mode 100644
index 0000000..e946897
--- /dev/null
+++ b/testing/resources/bug_306123.in
@@ -0,0 +1,1059 @@
+{{header}}
+{{include xfa_catalog_1_0.fragment}}
+{{include xfa_object_2_0.fragment}}
+{{include xfa_preamble_3_0.fragment}}
+{{include xfa_config_4_0.fragment}}
+{{object 5 0}} <<
+  {{streamlen}}
+>>
+stream
+<template xmlns="http://www.xfa.org/schema/xfa-template/2.8/">
+  <subform layout="tb" locale="en_GB_EURO">
+    <pageSet>
+      <pageArea>
+        <contentArea x="3mm" w="204mm" h="277mm" y="5mm"/>
+        <medium stock="a4" short="210mm" long="297mm"/>
+        <draw w="210mm" h="297mm"/>
+        <field y="0mm" x="0mm" w="62mm" h="9mm">
+          <ui>
+            <textEdit>
+            </textEdit>
+          </ui>
+          <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+        </field>
+        <field y="0mm" x="0mm" w="62mm" h="9mm">
+          <ui>
+            <textEdit>
+            </textEdit>
+          </ui>
+          <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+        </field>
+        <field y="0mm" x="0mm" w="62mm" h="9mm">
+          <ui>
+            <textEdit>
+            </textEdit>
+          </ui>
+          <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+        </field>
+        <field y="0mm" x="0mm" w="62mm" h="9mm">
+          <ui>
+            <textEdit>
+            </textEdit>
+          </ui>
+          <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+        </field>
+        <draw y="284mm" x="5mm" w="68mm" h="12mm">
+          <ui>
+            <textEdit/>
+          </ui>
+          <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+        </draw>
+        <field y="283mm" x="47mm" w="62mm" h="9mm" presence="invisible">
+          <ui>
+            <textEdit>
+            </textEdit>
+          </ui>
+          <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+        </field>
+        <draw y="284mm" x="73mm" w="69mm" h="12mm">
+          <ui>
+            <textEdit/>
+          </ui>
+          <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+        </draw>
+        <field w="62mm" h="9mm" access="readOnly">
+          <ui>
+            <textEdit>
+            </textEdit>
+          </ui>
+          <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+        </field>
+        <field w="62mm" h="9mm" access="readOnly">
+          <ui>
+            <textEdit>
+            </textEdit>
+          </ui>
+          <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+        </field>
+        <draw y="284mm" x="142mm" w="65mm" h="8mm">
+          <ui>
+            <textEdit/>
+          </ui>
+          <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+        </draw>
+        <field w="62mm" h="9mm" access="readOnly">
+          <ui>
+            <textEdit>
+            </textEdit>
+          </ui>
+          <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+        </field>
+        <draw y="292mm" x="176mm" w="31mm" h="4.528mm">
+          <ui>
+            <textEdit/>
+          </ui>
+          <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+        </draw>
+      </pageArea>
+    </pageSet>
+    <subform w="203mm" layout="tb">
+      <field w="0.5mm" h="0.5mm" relevant="-print">
+        <ui>
+          <button highlight="inverted"/>
+        </ui>
+      </field>
+      <subform w="203mm" layout="tb">
+        <overflow leader="Bloog"/>
+      </subform>
+      <subform w="203mm" layout="tb" presence="hidden">
+        <breakBefore targetType="pageArea" startNew="1"/>
+      </subform>
+      <subform w="203mm" minH="6.421mm" layout="tb">
+        <subform y="6.421mm" w="203mm" minH="52.27mm" layout="tb">
+          <margin leftInset="1mm"/>
+          <subform w="203mm" layout="lr-tb">
+            <draw w="127mm" h="0.375472in">
+              <ui>
+                <textEdit/>
+              </ui>
+              <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+            </draw>
+            <exclGroup name="RadioButtonList" layout="lr-tb">
+              <field w="30mm" h="6mm" name="yes">
+                <ui>
+                  <checkButton shape="round">
+                  </checkButton>
+                </ui>
+                <margin leftInset="3mm" rightInset="1mm"/>
+                <items>
+                  <text>Agree</text>
+                </items>
+              </field>
+              <field w="30mm" h="6mm" name="no">
+                <ui>
+                  <checkButton shape="round">
+                  </checkButton>
+                </ui>
+                <margin leftInset="3mm" rightInset="1mm"/>
+                <items>
+                  <text>Disagree</text>
+                </items>
+              </field>
+              <validate nullTest="error"/>
+            </exclGroup>
+            <margin bottomInset="2mm"/>
+          </subform>
+          <subform w="203mm" layout="lr-tb">
+            <draw w="127mm" minH="9.537mm">
+              <ui>
+                <textEdit/>
+              </ui>
+              <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+            </draw>
+            <exclGroup name="RadioButtonList" layout="lr-tb">
+              <field w="30mm" h="6mm" name="yes">
+                <ui>
+                  <checkButton shape="round">
+                  </checkButton>
+                </ui>
+                <margin leftInset="3mm" rightInset="1mm"/>
+                <items>
+                  <text>Agree</text>
+                </items>
+              </field>
+              <field w="30mm" h="6mm" name="no">
+                <ui>
+                  <checkButton shape="round">
+                  </checkButton>
+                </ui>
+                <margin leftInset="3mm" rightInset="1mm"/>
+                <items>
+                  <text>Disagree</text>
+                </items>
+              </field>
+              <validate nullTest="error"/>
+            </exclGroup>
+            <margin bottomInset="2mm"/>
+          </subform>
+          <subform w="203mm" layout="lr-tb">
+            <draw w="127mm" minH="10.462mm">
+              <ui>
+                <textEdit/>
+              </ui>
+              <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+            </draw>
+            <exclGroup name="RadioButtonList" layout="lr-tb">
+              <field w="30mm" h="6mm" name="yes">
+                <ui>
+                  <checkButton shape="round">
+                  </checkButton>
+                </ui>
+                <margin leftInset="3mm" rightInset="1mm"/>
+                <items>
+                  <text>Agree</text>
+                </items>
+              </field>
+              <field w="30mm" h="6mm" name="no">
+                <ui>
+                  <checkButton shape="round">
+                  </checkButton>
+                </ui>
+                <margin leftInset="3mm" rightInset="1mm"/>
+                <items>
+                  <text>Disagree</text>
+                </items>
+              </field>
+              <validate nullTest="error"/>
+            </exclGroup>
+            <margin bottomInset="2mm"/>
+          </subform>
+          <subform w="202mm" minH="34.081mm" layout="lr-tb">
+            <draw w="7.95275in" h="9.537mm">
+              <ui>
+                <textEdit/>
+              </ui>
+              <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+            </draw>
+            <field w="202mm" minH="28mm">
+              <ui>
+                <textEdit multiLine="1">
+                </textEdit>
+              </ui>
+              <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+            </field>
+            <margin topInset="1mm" bottomInset="1mm"/>
+          </subform>
+          <subform w="202mm" minH="34.081mm" layout="lr-tb" y="3mm">
+            <draw w="7.95275in" h="9.537mm">
+              <ui>
+                <textEdit/>
+              </ui>
+              <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+            </draw>
+            <field w="202mm" minH="28mm">
+              <ui>
+                <textEdit multiLine="1">
+                </textEdit>
+              </ui>
+              <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+            </field>
+            <margin topInset="1mm" bottomInset="1mm"/>
+          </subform>
+          <subform w="202mm" minH="34.081mm" layout="lr-tb" y="37.081mm">
+            <draw w="7.95275in" h="9.537mm">
+              <ui>
+                <textEdit/>
+              </ui>
+              <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+            </draw>
+            <field w="202mm" minH="28mm">
+              <ui>
+                <textEdit multiLine="1">
+                </textEdit>
+              </ui>
+              <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+            </field>
+            <margin topInset="1mm" bottomInset="1mm"/>
+          </subform>
+          <subform w="203mm" minH="228.176mm" layout="tb">
+            <subform minH="8mm" layout="lr-tb" w="194mm">
+              <field w="53mm" h="8mm">
+                <ui>
+                  <button highlight="outline"/>
+                </ui>
+                <margin bottomInset="0mm"/>
+              </field>
+              <margin topInset="2mm" bottomInset="1mm"/>
+            </subform>
+            <margin topInset="3mm"/>
+          </subform>
+        </subform>
+        <overflow leader="Bloog"/>
+      </subform>
+      <subform w="203mm" layout="tb" presence="hidden">
+        <breakBefore targetType="pageArea" startNew="1"/>
+      </subform>
+      <subform w="203mm" layout="tb">
+        <subform w="203.999mm">
+          <draw minW="203mm" x="0.001mm" y="0mm" h="6.421mm">
+            <ui>
+              <textEdit/>
+            </ui>
+            <margin topInset="1.27mm" bottomInset="1.27mm" leftInset="1.27mm" rightInset="1.27mm"/>
+          </draw>
+          <draw h="7.479mm" minW="203mm" y="6.421mm" x="0.001mm">
+            <ui>
+              <textEdit/>
+            </ui>
+            <margin topInset="1.27mm" bottomInset="1.27mm" leftInset="1.27mm" rightInset="1.27mm"/>
+          </draw>
+          <draw h="7.427mm" w="7.992125in" y="0mm">
+            <ui>
+              <textEdit/>
+            </ui>
+            <margin topInset="1.27mm" bottomInset="1.27mm" leftInset="2mm" rightInset="1.27mm"/>
+          </draw>
+          <margin leftInset="0mm"/>
+        </subform>
+        <subform w="203mm" minH="52.27mm" layout="lr-tb">
+          <subform w="201mm" h="48.807mm">
+            <draw y="0mm" x="0.001mm" w="7.913347in" h="1.826917in">
+              <ui>
+                <textEdit/>
+              </ui>
+              <margin topInset="2mm" bottomInset="2mm" leftInset="1mm" rightInset="1.5mm"/>
+            </draw>
+            <margin topInset="2mm" bottomInset="2mm"/>
+          </subform>
+          <margin leftInset="1mm"/>
+          <subform w="202mm" minH="48mm" layout="lr-tb">
+            <margin topInset="0mm" bottomInset="1mm"/>
+            <draw h="6.773mm" w="199mm">
+              <ui>
+                <textEdit/>
+              </ui>
+              <margin topInset="1.27mm" bottomInset="1.27mm" leftInset="1mm" rightInset="1.27mm"/>
+            </draw>
+            <subform minH="8mm" layout="lr-tb" name="Show" w="46mm">
+              <field h="8mm" w="45mm">
+                <ui>
+                  <button highlight="outline"/>
+                </ui>
+                <margin bottomInset="0mm"/>
+              </field>
+              <margin topInset="3mm" bottomInset="2mm"/>
+              <keep intact="contentArea"/>
+            </subform>
+            <subform minH="8mm" layout="lr-tb" name="Hide" w="25mm">
+              <margin topInset="3mm" bottomInset="2mm"/>
+              <keep intact="contentArea"/>
+              <field w="22mm" h="8mm">
+                <ui>
+                  <button highlight="outline"/>
+                </ui>
+                <margin bottomInset="0mm"/>
+              </field>
+            </subform>
+            <subform w="201mm" minH="55.309mm" layout="lr-tb" name="table">
+              <field w="62mm" h="9mm">
+                <ui>
+                  <textEdit>
+                  </textEdit>
+                </ui>
+                <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+              </field>
+              <draw w="201mm" minH="6.421mm">
+                <ui>
+                  <textEdit/>
+                </ui>
+                <margin topInset="1mm" bottomInset="3mm" leftInset="1mm" rightInset="1mm"/>
+              </draw>
+              <subform layout="table" columnWidths="30mm 171mm">
+                <subform layout="row"  x="0.074mm" y="0.006mm">
+                  <draw h="8mm">
+                    <ui>
+                      <textEdit>
+                      </textEdit>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                  </draw>
+                  <draw h="8mm" x="0.001mm" y="0mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                  </draw>
+                  <occur max="-1"/>
+                </subform>
+                <subform layout="row" x="0.074mm" y="0mm">
+                  <field w="67mm" minH="7.234mm" access="protected" x="0.005mm" y="0mm">
+                    <ui>
+                      <textEdit>
+                      </textEdit>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                  </field>
+                  <field w="67mm" x="0.004mm" y="0mm" locale="en_GB" access="protected" minH="8mm">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                  </field>
+                  <occur min="0" max="-1"/>
+                </subform>
+                <subform layout="row" x="0.034mm" y="0mm">
+                  <draw minH="7.234mm" w="67mm">
+                    <ui>
+                      <textEdit>
+                      </textEdit>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                  </draw>
+                  <draw minH="7.234mm" w="67mm" presence="invisible" x="0.001mm">
+                    <ui>
+                      <textEdit>
+                      </textEdit>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                  </draw>
+                </subform>
+                <overflow leader="HeaderRow"/>
+              </subform>
+            </subform>
+            <event activity="initialize">
+              <script contentType="application/x-javascript">
+                Show.presence = "visible";
+                Hide.presence = "hidden";
+                table.presence = "hidden";
+              </script>
+            </event>
+          </subform>
+          <subform w="202mm" minH="48mm" layout="lr-tb" y="3mm">
+            <margin topInset="0mm" bottomInset="1mm"/>
+            <draw h="6.773mm" w="108mm">
+              <ui>
+                <textEdit/>
+              </ui>
+              <margin topInset="1.27mm" bottomInset="1.27mm" leftInset="1mm" rightInset="1.27mm"/>
+            </draw>
+            <subform w="201mm" minH="19.001mm" layout="lr-tb">
+              <subform minH="8mm" layout="lr-tb" name="show">
+                <field w="41mm" h="8mm">
+                  <ui>
+                    <button highlight="outline"/>
+                  </ui>
+                  <margin bottomInset="0mm"/>
+                </field>
+                <margin topInset="3mm" bottomInset="2mm"/>
+                <keep intact="contentArea"/>
+              </subform>
+              <subform w="22mm" minH="8mm" layout="lr-tb" name="hide">
+                <field w="22mm" h="8mm">
+                  <ui>
+                    <button highlight="outline"/>
+                  </ui>
+                  <margin bottomInset="0mm"/>
+                </field>
+                <margin topInset="3mm" bottomInset="2mm"/>
+                <keep intact="contentArea"/>
+              </subform>
+              <field w="62mm" h="9mm" access="protected" presence="hidden">
+                <ui>
+                  <textEdit>
+                  </textEdit>
+                </ui>
+                <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+              </field>
+              <subform w="201mm" minH="55.309mm" layout="lr-tb" name="table">
+                <field w="62mm" h="9mm">
+                  <ui>
+                    <textEdit>
+                    </textEdit>
+                  </ui>
+                  <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                </field>
+                <field y="0mm" x="0mm" w="62mm" h="9mm">
+                  <ui>
+                    <textEdit>
+                    </textEdit>
+                  </ui>
+                  <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                </field>
+                <draw h="0.252778in" w="201mm">
+                  <ui>
+                    <textEdit/>
+                  </ui>
+                  <margin topInset="1.27mm" bottomInset="1.27mm" leftInset="1mm" rightInset="1.27mm"/>
+                </draw>
+                <subform layout="table" columnWidths="52.5mm 2.066931in 25mm 71mm">
+                  <subform layout="row" x="0.056mm">
+                    <draw h="15mm">
+                      <ui>
+                        <textEdit/>
+                      </ui>
+                      <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                    </draw>
+                    <draw h="15mm">
+                      <ui>
+                        <textEdit/>
+                      </ui>
+                      <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                    </draw>
+                    <draw h="15mm">
+                      <ui>
+                        <textEdit>
+                        </textEdit>
+                      </ui>
+                      <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                    </draw>
+                    <draw h="15mm">
+                      <ui>
+                        <textEdit/>
+                      </ui>
+                      <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                    </draw>
+                    <occur max="-1"/>
+                  </subform>
+                  <subform layout="row" x="0.056mm">
+                    <field w="67mm" minH="7.234mm" x="0.004mm" y="0mm" locale="en_GB" access="protected">
+                      <ui>
+                        <textEdit multiLine="1">
+                        </textEdit>
+                      </ui>
+                      <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                    </field>
+                    <field w="67mm" minH="7.234mm" y="0mm" access="protected">
+                      <ui>
+                        <textEdit multiLine="1">
+                        </textEdit>
+                      </ui>
+                      <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                    </field>
+                    <field w="67mm" minH="7.234mm" access="protected">
+                      <ui>
+                        <dateTimeEdit>
+                        </dateTimeEdit>
+                      </ui>
+                      <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                      <format>
+                        <picture
+                            >date{DD/MM/YYYY}</picture>
+                      </format>
+                    </field>
+                    <field w="67mm" minH="7.234mm" y="0mm" access="protected">
+                      <ui>
+                        <textEdit multiLine="1">
+                        </textEdit>
+                      </ui>
+                      <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                    </field>
+                    <occur min="0" max="-1"/>
+                  </subform>
+                  <subform layout="row" x="0.016mm">
+                    <draw minH="7.234mm" w="67mm" presence="invisible" x="0.001mm">
+                      <ui>
+                        <textEdit>
+                        </textEdit>
+                      </ui>
+                      <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                    </draw>
+                    <draw minH="7.234mm" w="67mm" presence="invisible">
+                      <ui>
+                        <textEdit>
+                        </textEdit>
+                      </ui>
+                      <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                    </draw>
+                    <draw minH="7.234mm" w="67mm">
+                      <ui>
+                        <textEdit>
+                        </textEdit>
+                      </ui>
+                      <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                    </draw>
+                    <draw minH="7.234mm" w="67mm" presence="invisible">
+                      <ui>
+                        <textEdit>
+                        </textEdit>
+                      </ui>
+                      <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                    </draw>
+                  </subform>
+                  <overflow leader="HeaderRow"/>
+                </subform>
+              </subform>
+              <occur min="0" max="-1"/>
+            </subform>
+          </subform>
+          <subform w="202mm" minH="147.001mm" layout="lr-tb">
+            <draw h="6.773mm" w="108mm">
+              <ui>
+                <textEdit/>
+              </ui>
+              <margin topInset="1.27mm" bottomInset="1.27mm" leftInset="1mm" rightInset="1.27mm"/>
+            </draw>
+            <subform minH="237.19mm" layout="lr-tb" w="202mm">
+              <subform minH="8mm" layout="lr-tb" name="show">
+                <field w="89mm" h="8mm">
+                  <ui>
+                    <button highlight="outline"/>
+                  </ui>
+                  <margin bottomInset="0mm"/>
+                </field>
+                <margin topInset="3mm" bottomInset="2mm"/>
+                <keep intact="contentArea"/>
+              </subform>
+              <subform minH="8mm" layout="lr-tb" name="hide">
+                <field w="22mm" h="8mm">
+                  <ui>
+                    <button highlight="outline"/>
+                  </ui>
+                  <margin bottomInset="0mm"/>
+                </field>
+                <margin topInset="3mm" bottomInset="2mm"/>
+                <keep intact="contentArea"/>
+              </subform>
+              <field w="62mm" h="9mm" access="protected" presence="hidden">
+                <ui>
+                  <textEdit>
+                  </textEdit>
+                </ui>
+                <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+              </field>
+              <subform w="202mm" minH="224.19mm" layout="lr-tb">
+                <subform w="202mm" minH="34.081mm" layout="lr-tb">
+                  <draw w="7.95275in" h="6mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="202mm" minH="28mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                  </field>
+                  <margin topInset="1mm" bottomInset="1mm"/>
+                </subform>
+                <subform w="202mm" minH="34.081mm" layout="lr-tb">
+                  <draw w="7.95275in" h="6.875mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="202mm" minH="28mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                  </field>
+                  <margin topInset="1mm" bottomInset="1mm"/>
+                </subform>
+                <subform w="202mm" minH="34.081mm" layout="lr-tb" y="3mm">
+                  <draw w="7.95275in" h="6.875mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="202mm" minH="28mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                  </field>
+                  <margin topInset="1mm" bottomInset="1mm"/>
+                </subform>
+                <subform w="202mm" minH="34.081mm" layout="lr-tb" y="3mm">
+                  <draw w="7.95275in" h="6.875mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="202mm" minH="28mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                  </field>
+                  <margin topInset="1mm" bottomInset="1mm"/>
+                </subform>
+                <subform w="202mm" minH="34.081mm" layout="lr-tb">
+                  <draw w="7.95275in" h="6.036mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="202mm" minH="28mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                  </field>
+                  <margin topInset="1mm" bottomInset="1mm"/>
+                </subform>
+              </subform>
+              <occur min="0" max="-1"/>
+            </subform>
+          </subform>
+          <subform w="202mm" minH="147.001mm" layout="lr-tb">
+            <draw h="6.773mm" w="108mm">
+              <ui>
+                <textEdit/>
+              </ui>
+              <margin topInset="1.27mm" bottomInset="1.27mm" leftInset="1mm" rightInset="1.27mm"/>
+            </draw>
+            <subform minH="237.19mm" layout="lr-tb" w="202mm">
+              <subform minH="8mm" layout="lr-tb" name="show">
+                <field w="60mm" h="8mm">
+                  <ui>
+                    <button highlight="outline"/>
+                  </ui>
+                  <margin bottomInset="0mm"/>
+                </field>
+                <margin topInset="3mm" bottomInset="2mm"/>
+                <keep intact="contentArea"/>
+              </subform>
+              <subform minH="8mm" layout="lr-tb" name="hide">
+                <field w="22mm" h="8mm">
+                  <ui>
+                    <button highlight="outline"/>
+                  </ui>
+                  <margin bottomInset="0mm"/>
+                </field>
+                <margin topInset="3mm" bottomInset="2mm"/>
+                <keep intact="contentArea"/>
+              </subform>
+              <field w="62mm" h="9mm" access="protected" presence="hidden">
+                <ui>
+                  <textEdit>
+                  </textEdit>
+                </ui>
+                <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+              </field>
+              <subform w="202mm" minH="224.19mm" layout="lr-tb">
+                <subform w="127mm" minH="15.694mm" layout="lr-tb">
+                  <draw w="51mm" minH="9mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="2mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="26mm" minH="9mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="1mm" bottomInset="1mm" leftInset="0mm" rightInset="1mm"/>
+                  </field>
+                  <keep intact="contentArea"/>
+                </subform>
+                <subform w="127mm" minH="15.694mm" layout="lr-tb">
+                  <draw w="51mm" minH="9mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="2mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="76mm" minH="9mm" access="protected">
+                    <ui>
+                      <dateTimeEdit>
+                      </dateTimeEdit>
+                    </ui>
+                    <margin topInset="1mm" bottomInset="1mm" leftInset="0mm" rightInset="1mm"/>
+                    <format>
+                      <picture
+                          >date{DD/MM/YYYY}</picture>
+                    </format>
+                  </field>
+                  <keep intact="contentArea"/>
+                </subform>
+                <subform w="127mm" minH="15.694mm" layout="lr-tb">
+                  <draw w="51mm" minH="9mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="2mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="76mm" minH="9mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="1mm" bottomInset="1mm" leftInset="0mm" rightInset="1mm"/>
+                  </field>
+                  <keep intact="contentArea"/>
+                </subform>
+                <subform w="202mm" minH="15.694mm" layout="lr-tb">
+                  <draw w="127mm" h="17.439mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="2mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="25mm" minH="17.578mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="10mm" bottomInset="1mm" leftInset="3mm" rightInset="1mm"/>
+                  </field>
+                  <keep intact="contentArea"/>
+                </subform>
+                <subform w="202mm" minH="15.694mm" layout="lr-tb">
+                  <draw w="127mm" minH="20.35mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="2mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="25mm" minH="17.578mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="15mm" bottomInset="1mm" leftInset="3mm" rightInset="1mm"/>
+                  </field>
+                  <keep intact="contentArea"/>
+                </subform>
+                <subform w="202mm" minH="15.694mm" layout="lr-tb">
+                  <draw w="127mm" minH="11.651mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="2mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="25mm" minH="11.651mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="7mm" bottomInset="1mm" leftInset="3mm" rightInset="1mm"/>
+                  </field>
+                  <keep intact="contentArea"/>
+                </subform>
+                <subform w="202mm" minH="15.694mm" layout="lr-tb">
+                  <draw w="127mm" minH="17.578mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="2mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="25mm" minH="17.578mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="10mm" bottomInset="1mm" leftInset="3mm" rightInset="1mm"/>
+                  </field>
+                  <keep intact="contentArea"/>
+                </subform>
+                <subform w="202mm" minH="15.694mm" layout="lr-tb">
+                  <draw w="127mm" minH="11.192mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="2mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="25mm" minH="11mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="6mm" bottomInset="1mm" leftInset="3mm" rightInset="1mm"/>
+                  </field>
+                  <keep intact="contentArea"/>
+                  <margin bottomInset="2mm"/>
+                </subform>
+                <subform w="202mm" minH="34.081mm" layout="lr-tb">
+                  <draw w="7.95275in" h="9.537mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="202mm" minH="28mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                  </field>
+                  <margin topInset="1mm" bottomInset="1mm"/>
+                </subform>
+                <subform w="202mm" minH="34.081mm" layout="lr-tb">
+                  <draw w="7.95275in" h="9.537mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="202mm" minH="28mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                  </field>
+                  <margin topInset="1mm" bottomInset="1mm"/>
+                </subform>
+                <subform w="202mm" minH="34.081mm" layout="lr-tb">
+                  <draw w="7.95275in" h="6.875mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="202mm" minH="28mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                  </field>
+                  <margin topInset="1mm" bottomInset="1mm"/>
+                </subform>
+              </subform>
+              <occur min="0" max="-1"/>
+            </subform>
+          </subform>
+          <subform w="22mm" minH="8mm" layout="lr-tb" name="save" y="3mm">
+            <field w="22mm" h="8mm">
+              <ui>
+                <button highlight="outline"/>
+              </ui>
+              <margin bottomInset="0mm"/>
+            </field>
+            <margin topInset="3mm" bottomInset="2mm"/>
+          </subform>
+        </subform>
+        <overflow leader="Bloog"/>
+      </subform>
+      <subform layout="tb" w="203mm">
+        <margin bottomInset="0mm" leftInset="0mm" topInset="0mm"/>
+        <variables>
+        </variables>
+        <subform layout="lr-tb" minH="8.802mm" w="203mm">
+          <keep intact="contentArea"/>
+          <margin leftInset="0mm"/>
+          <draw h="0.238889in" name="tbd" w="203mm">
+            <margin bottomInset="1mm" leftInset="2mm" rightInset="1mm" topInset="1mm"/>
+            <ui>
+              <textEdit/>
+            </ui>
+          </draw>
+          <draw h="8mm" w="203mm">
+            <margin bottomInset="0.5mm" leftInset="2mm" rightInset="0.5mm" topInset="2mm"/>
+            <ui>
+              <textEdit/>
+            </ui>
+          </draw>
+          <subform layout="lr-tb" name="fieldCaption" w="50mm" presence="hidden">
+            <keep intact="contentArea"/>
+            <margin leftInset="2mm"/>
+            <draw h="8.802mm" name="Normal" w="48mm">
+              <margin bottomInset="0.5mm" leftInset="0mm" rightInset="0.5mm" topInset="0.5mm"/>
+              <ui>
+                <textEdit/>
+              </ui>
+            </draw>
+            <draw h="8.802mm" name="Star" w="48mm">
+              <margin bottomInset="0.5mm" leftInset="0mm" rightInset="0.5mm" topInset="0.5mm"/>
+              <ui>
+                <textEdit/>
+              </ui>
+            </draw>
+          </subform>
+          <field access="readOnly" h="9mm" w="62mm">
+            <margin bottomInset="1mm" leftInset="1mm" rightInset="1mm" topInset="1mm"/>
+            <ui>
+              <textEdit>
+              </textEdit>
+            </ui>
+          </field>
+          <field h="6mm" name="Button1" w="28.575mm">
+            <ui>
+              <button highlight="inverted"/>
+            </ui>
+          </field>
+          <field h="6mm" name="Button2" w="28.575mm">
+            <ui>
+              <button highlight="inverted"/>
+            </ui>
+          </field>
+          <field h="6mm" name="verifySig" w="28.575mm">
+            <ui>
+              <button highlight="inverted"/>
+            </ui>
+          </field>
+          <field h="0.1mm" name="concat" w="0.1mm">
+            <calculate>
+              <script contentType="application/x-javascript">
+	        fieldCaption.Star.presence = "hidden";
+	        fieldCaption.Normal.presence = "visible";
+	        this.rawValue = "Sig Not Required";
+              </script>
+            </calculate>
+            <margin bottomInset="0mm" leftInset="0mm" rightInset="0mm" topInset="0mm"/>
+            <validate>
+              <message>
+                <text name="scriptTest"/>
+              </message>
+            </validate>
+          </field>
+        </subform>
+        <subform layout="lr-tb" w="203mm" presence="hidden">
+          <keep intact="contentArea"/>
+          <margin bottomInset="1mm"/>
+          <draw h="6.269mm" w="7.992125in">
+            <margin bottomInset="0mm" leftInset="2mm" rightInset="0.5mm" topInset="2mm"/>
+            <ui>
+              <textEdit/>
+            </ui>
+          </draw>
+          <draw h="5mm" name="Text1" w="139.483mm">
+            <margin bottomInset="0mm" leftInset="2mm" rightInset="0mm" topInset="0.5mm"/>
+            <ui>
+              <textEdit/>
+            </ui>
+          </draw>
+          <field access="readOnly" h="0.217639in" name="TextField1" w="0.604861in">
+            <margin bottomInset="0mm" leftInset="0mm" rightInset="0mm" topInset="0mm"/>
+            <ui>
+              <textEdit>
+              </textEdit>
+            </ui>
+            <validate>
+              <message>
+                <text name="scriptTest"/>
+              </message>
+            </validate>
+          </field>
+          <draw h="5mm" name="Text1" w="0.786167in">
+            <margin bottomInset="0mm" leftInset="0mm" rightInset="0.5mm" topInset="0.5mm"/>
+            <ui>
+              <textEdit/>
+            </ui>
+          </draw>
+          <field h="9mm" name="url" w="62mm">
+            <margin bottomInset="1mm" leftInset="1mm" rightInset="1mm" topInset="1mm"/>
+            <ui>
+              <textEdit>
+              </textEdit>
+            </ui>
+          </field>
+        </subform>
+      </subform>
+    </subform>
+    <proto>
+      <subform w="202.001mm" name="Bloog" x="0.003mm" y="0.008mm">
+        <occur max="-1"/>
+        <draw w="202mm" h="6mm" x="0.001mm" y="0.001mm">
+          <ui>
+            <textEdit/>
+          </ui>
+          <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+        </draw>
+      </subform>
+    </proto>
+  </subform>
+</template>
+endstream
+endobj
+{{include xfa_locale_6_0.fragment}}
+{{include xfa_postamble_7_0.fragment}}
+{{include xfa_pages_8_0.fragment}}
+{{xref}}
+{{trailer}}
+{{startxref}}
+%%EOF
diff --git a/testing/resources/bug_306123.pdf b/testing/resources/bug_306123.pdf
new file mode 100644
index 0000000..5bd1900
--- /dev/null
+++ b/testing/resources/bug_306123.pdf
@@ -0,0 +1,1268 @@
+%PDF-1.7
+% ò¤ô
+1 0 obj <<
+  /AcroForm 2 0 R
+  /Extensions <<
+    /ADBE <<
+      /BaseVersion /1.7
+      /ExtensionLevel 8
+    >>
+  >>
+  /NeedsRendering true
+  /Pages 8 0 R
+  /Type /Catalog
+>>
+endobj
+2 0 obj <<
+  /XFA [
+    (preamble)
+    3 0 R
+    (config)
+    4 0 R
+    (template)
+    5 0 R
+    (localeSet)
+    6 0 R
+    (postamble)
+    7 0 R
+  ]
+>>
+endobj
+3 0 obj <<
+  /Length 124
+>>
+stream
+<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/" timeStamp="2018-02-23T21:37:11Z" uuid="21482798-7bf0-40a4-bc5d-3cefdccf32b5">
+endstream
+endobj
+4 0 obj <<
+  /Length 642
+>>
+stream
+<config xmlns="http://www.xfa.org/schema/xci/3.0/">
+<agent name="designer">
+  <destination>pdf</destination>
+  <pdf>
+    <fontInfo/>
+  </pdf>
+</agent>
+<present>
+  <pdf>
+    <version>1.7</version>
+    <adobeExtensionLevel>8</adobeExtensionLevel>
+    <renderPolicy>client</renderPolicy>
+    <scriptModel>XFA</scriptModel>
+    <interactive>1</interactive>
+  </pdf>
+  <xdp>
+    <packets>*</packets>
+  </xdp>
+  <destination>pdf</destination>
+  <script>
+    <runScripts>server</runScripts>
+  </script>
+</present>
+<acrobat>
+  <acrobat7>
+    <dynamicRender>required</dynamicRender>
+  </acrobat7>
+  <validate>preSubmit</validate>
+</acrobat>
+</config>
+endstream
+endobj
+5 0 obj <<
+  /Length 42305
+>>
+stream
+<template xmlns="http://www.xfa.org/schema/xfa-template/2.8/">
+  <subform layout="tb" locale="en_GB_EURO">
+    <pageSet>
+      <pageArea>
+        <contentArea x="3mm" w="204mm" h="277mm" y="5mm"/>
+        <medium stock="a4" short="210mm" long="297mm"/>
+        <draw w="210mm" h="297mm"/>
+        <field y="0mm" x="0mm" w="62mm" h="9mm">
+          <ui>
+            <textEdit>
+            </textEdit>
+          </ui>
+          <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+        </field>
+        <field y="0mm" x="0mm" w="62mm" h="9mm">
+          <ui>
+            <textEdit>
+            </textEdit>
+          </ui>
+          <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+        </field>
+        <field y="0mm" x="0mm" w="62mm" h="9mm">
+          <ui>
+            <textEdit>
+            </textEdit>
+          </ui>
+          <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+        </field>
+        <field y="0mm" x="0mm" w="62mm" h="9mm">
+          <ui>
+            <textEdit>
+            </textEdit>
+          </ui>
+          <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+        </field>
+        <draw y="284mm" x="5mm" w="68mm" h="12mm">
+          <ui>
+            <textEdit/>
+          </ui>
+          <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+        </draw>
+        <field y="283mm" x="47mm" w="62mm" h="9mm" presence="invisible">
+          <ui>
+            <textEdit>
+            </textEdit>
+          </ui>
+          <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+        </field>
+        <draw y="284mm" x="73mm" w="69mm" h="12mm">
+          <ui>
+            <textEdit/>
+          </ui>
+          <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+        </draw>
+        <field w="62mm" h="9mm" access="readOnly">
+          <ui>
+            <textEdit>
+            </textEdit>
+          </ui>
+          <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+        </field>
+        <field w="62mm" h="9mm" access="readOnly">
+          <ui>
+            <textEdit>
+            </textEdit>
+          </ui>
+          <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+        </field>
+        <draw y="284mm" x="142mm" w="65mm" h="8mm">
+          <ui>
+            <textEdit/>
+          </ui>
+          <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+        </draw>
+        <field w="62mm" h="9mm" access="readOnly">
+          <ui>
+            <textEdit>
+            </textEdit>
+          </ui>
+          <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+        </field>
+        <draw y="292mm" x="176mm" w="31mm" h="4.528mm">
+          <ui>
+            <textEdit/>
+          </ui>
+          <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+        </draw>
+      </pageArea>
+    </pageSet>
+    <subform w="203mm" layout="tb">
+      <field w="0.5mm" h="0.5mm" relevant="-print">
+        <ui>
+          <button highlight="inverted"/>
+        </ui>
+      </field>
+      <subform w="203mm" layout="tb">
+        <overflow leader="Bloog"/>
+      </subform>
+      <subform w="203mm" layout="tb" presence="hidden">
+        <breakBefore targetType="pageArea" startNew="1"/>
+      </subform>
+      <subform w="203mm" minH="6.421mm" layout="tb">
+        <subform y="6.421mm" w="203mm" minH="52.27mm" layout="tb">
+          <margin leftInset="1mm"/>
+          <subform w="203mm" layout="lr-tb">
+            <draw w="127mm" h="0.375472in">
+              <ui>
+                <textEdit/>
+              </ui>
+              <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+            </draw>
+            <exclGroup name="RadioButtonList" layout="lr-tb">
+              <field w="30mm" h="6mm" name="yes">
+                <ui>
+                  <checkButton shape="round">
+                  </checkButton>
+                </ui>
+                <margin leftInset="3mm" rightInset="1mm"/>
+                <items>
+                  <text>Agree</text>
+                </items>
+              </field>
+              <field w="30mm" h="6mm" name="no">
+                <ui>
+                  <checkButton shape="round">
+                  </checkButton>
+                </ui>
+                <margin leftInset="3mm" rightInset="1mm"/>
+                <items>
+                  <text>Disagree</text>
+                </items>
+              </field>
+              <validate nullTest="error"/>
+            </exclGroup>
+            <margin bottomInset="2mm"/>
+          </subform>
+          <subform w="203mm" layout="lr-tb">
+            <draw w="127mm" minH="9.537mm">
+              <ui>
+                <textEdit/>
+              </ui>
+              <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+            </draw>
+            <exclGroup name="RadioButtonList" layout="lr-tb">
+              <field w="30mm" h="6mm" name="yes">
+                <ui>
+                  <checkButton shape="round">
+                  </checkButton>
+                </ui>
+                <margin leftInset="3mm" rightInset="1mm"/>
+                <items>
+                  <text>Agree</text>
+                </items>
+              </field>
+              <field w="30mm" h="6mm" name="no">
+                <ui>
+                  <checkButton shape="round">
+                  </checkButton>
+                </ui>
+                <margin leftInset="3mm" rightInset="1mm"/>
+                <items>
+                  <text>Disagree</text>
+                </items>
+              </field>
+              <validate nullTest="error"/>
+            </exclGroup>
+            <margin bottomInset="2mm"/>
+          </subform>
+          <subform w="203mm" layout="lr-tb">
+            <draw w="127mm" minH="10.462mm">
+              <ui>
+                <textEdit/>
+              </ui>
+              <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+            </draw>
+            <exclGroup name="RadioButtonList" layout="lr-tb">
+              <field w="30mm" h="6mm" name="yes">
+                <ui>
+                  <checkButton shape="round">
+                  </checkButton>
+                </ui>
+                <margin leftInset="3mm" rightInset="1mm"/>
+                <items>
+                  <text>Agree</text>
+                </items>
+              </field>
+              <field w="30mm" h="6mm" name="no">
+                <ui>
+                  <checkButton shape="round">
+                  </checkButton>
+                </ui>
+                <margin leftInset="3mm" rightInset="1mm"/>
+                <items>
+                  <text>Disagree</text>
+                </items>
+              </field>
+              <validate nullTest="error"/>
+            </exclGroup>
+            <margin bottomInset="2mm"/>
+          </subform>
+          <subform w="202mm" minH="34.081mm" layout="lr-tb">
+            <draw w="7.95275in" h="9.537mm">
+              <ui>
+                <textEdit/>
+              </ui>
+              <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+            </draw>
+            <field w="202mm" minH="28mm">
+              <ui>
+                <textEdit multiLine="1">
+                </textEdit>
+              </ui>
+              <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+            </field>
+            <margin topInset="1mm" bottomInset="1mm"/>
+          </subform>
+          <subform w="202mm" minH="34.081mm" layout="lr-tb" y="3mm">
+            <draw w="7.95275in" h="9.537mm">
+              <ui>
+                <textEdit/>
+              </ui>
+              <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+            </draw>
+            <field w="202mm" minH="28mm">
+              <ui>
+                <textEdit multiLine="1">
+                </textEdit>
+              </ui>
+              <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+            </field>
+            <margin topInset="1mm" bottomInset="1mm"/>
+          </subform>
+          <subform w="202mm" minH="34.081mm" layout="lr-tb" y="37.081mm">
+            <draw w="7.95275in" h="9.537mm">
+              <ui>
+                <textEdit/>
+              </ui>
+              <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+            </draw>
+            <field w="202mm" minH="28mm">
+              <ui>
+                <textEdit multiLine="1">
+                </textEdit>
+              </ui>
+              <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+            </field>
+            <margin topInset="1mm" bottomInset="1mm"/>
+          </subform>
+          <subform w="203mm" minH="228.176mm" layout="tb">
+            <subform minH="8mm" layout="lr-tb" w="194mm">
+              <field w="53mm" h="8mm">
+                <ui>
+                  <button highlight="outline"/>
+                </ui>
+                <margin bottomInset="0mm"/>
+              </field>
+              <margin topInset="2mm" bottomInset="1mm"/>
+            </subform>
+            <margin topInset="3mm"/>
+          </subform>
+        </subform>
+        <overflow leader="Bloog"/>
+      </subform>
+      <subform w="203mm" layout="tb" presence="hidden">
+        <breakBefore targetType="pageArea" startNew="1"/>
+      </subform>
+      <subform w="203mm" layout="tb">
+        <subform w="203.999mm">
+          <draw minW="203mm" x="0.001mm" y="0mm" h="6.421mm">
+            <ui>
+              <textEdit/>
+            </ui>
+            <margin topInset="1.27mm" bottomInset="1.27mm" leftInset="1.27mm" rightInset="1.27mm"/>
+          </draw>
+          <draw h="7.479mm" minW="203mm" y="6.421mm" x="0.001mm">
+            <ui>
+              <textEdit/>
+            </ui>
+            <margin topInset="1.27mm" bottomInset="1.27mm" leftInset="1.27mm" rightInset="1.27mm"/>
+          </draw>
+          <draw h="7.427mm" w="7.992125in" y="0mm">
+            <ui>
+              <textEdit/>
+            </ui>
+            <margin topInset="1.27mm" bottomInset="1.27mm" leftInset="2mm" rightInset="1.27mm"/>
+          </draw>
+          <margin leftInset="0mm"/>
+        </subform>
+        <subform w="203mm" minH="52.27mm" layout="lr-tb">
+          <subform w="201mm" h="48.807mm">
+            <draw y="0mm" x="0.001mm" w="7.913347in" h="1.826917in">
+              <ui>
+                <textEdit/>
+              </ui>
+              <margin topInset="2mm" bottomInset="2mm" leftInset="1mm" rightInset="1.5mm"/>
+            </draw>
+            <margin topInset="2mm" bottomInset="2mm"/>
+          </subform>
+          <margin leftInset="1mm"/>
+          <subform w="202mm" minH="48mm" layout="lr-tb">
+            <margin topInset="0mm" bottomInset="1mm"/>
+            <draw h="6.773mm" w="199mm">
+              <ui>
+                <textEdit/>
+              </ui>
+              <margin topInset="1.27mm" bottomInset="1.27mm" leftInset="1mm" rightInset="1.27mm"/>
+            </draw>
+            <subform minH="8mm" layout="lr-tb" name="Show" w="46mm">
+              <field h="8mm" w="45mm">
+                <ui>
+                  <button highlight="outline"/>
+                </ui>
+                <margin bottomInset="0mm"/>
+              </field>
+              <margin topInset="3mm" bottomInset="2mm"/>
+              <keep intact="contentArea"/>
+            </subform>
+            <subform minH="8mm" layout="lr-tb" name="Hide" w="25mm">
+              <margin topInset="3mm" bottomInset="2mm"/>
+              <keep intact="contentArea"/>
+              <field w="22mm" h="8mm">
+                <ui>
+                  <button highlight="outline"/>
+                </ui>
+                <margin bottomInset="0mm"/>
+              </field>
+            </subform>
+            <subform w="201mm" minH="55.309mm" layout="lr-tb" name="table">
+              <field w="62mm" h="9mm">
+                <ui>
+                  <textEdit>
+                  </textEdit>
+                </ui>
+                <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+              </field>
+              <draw w="201mm" minH="6.421mm">
+                <ui>
+                  <textEdit/>
+                </ui>
+                <margin topInset="1mm" bottomInset="3mm" leftInset="1mm" rightInset="1mm"/>
+              </draw>
+              <subform layout="table" columnWidths="30mm 171mm">
+                <subform layout="row"  x="0.074mm" y="0.006mm">
+                  <draw h="8mm">
+                    <ui>
+                      <textEdit>
+                      </textEdit>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                  </draw>
+                  <draw h="8mm" x="0.001mm" y="0mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                  </draw>
+                  <occur max="-1"/>
+                </subform>
+                <subform layout="row" x="0.074mm" y="0mm">
+                  <field w="67mm" minH="7.234mm" access="protected" x="0.005mm" y="0mm">
+                    <ui>
+                      <textEdit>
+                      </textEdit>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                  </field>
+                  <field w="67mm" x="0.004mm" y="0mm" locale="en_GB" access="protected" minH="8mm">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                  </field>
+                  <occur min="0" max="-1"/>
+                </subform>
+                <subform layout="row" x="0.034mm" y="0mm">
+                  <draw minH="7.234mm" w="67mm">
+                    <ui>
+                      <textEdit>
+                      </textEdit>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                  </draw>
+                  <draw minH="7.234mm" w="67mm" presence="invisible" x="0.001mm">
+                    <ui>
+                      <textEdit>
+                      </textEdit>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                  </draw>
+                </subform>
+                <overflow leader="HeaderRow"/>
+              </subform>
+            </subform>
+            <event activity="initialize">
+              <script contentType="application/x-javascript">
+                Show.presence = "visible";
+                Hide.presence = "hidden";
+                table.presence = "hidden";
+              </script>
+            </event>
+          </subform>
+          <subform w="202mm" minH="48mm" layout="lr-tb" y="3mm">
+            <margin topInset="0mm" bottomInset="1mm"/>
+            <draw h="6.773mm" w="108mm">
+              <ui>
+                <textEdit/>
+              </ui>
+              <margin topInset="1.27mm" bottomInset="1.27mm" leftInset="1mm" rightInset="1.27mm"/>
+            </draw>
+            <subform w="201mm" minH="19.001mm" layout="lr-tb">
+              <subform minH="8mm" layout="lr-tb" name="show">
+                <field w="41mm" h="8mm">
+                  <ui>
+                    <button highlight="outline"/>
+                  </ui>
+                  <margin bottomInset="0mm"/>
+                </field>
+                <margin topInset="3mm" bottomInset="2mm"/>
+                <keep intact="contentArea"/>
+              </subform>
+              <subform w="22mm" minH="8mm" layout="lr-tb" name="hide">
+                <field w="22mm" h="8mm">
+                  <ui>
+                    <button highlight="outline"/>
+                  </ui>
+                  <margin bottomInset="0mm"/>
+                </field>
+                <margin topInset="3mm" bottomInset="2mm"/>
+                <keep intact="contentArea"/>
+              </subform>
+              <field w="62mm" h="9mm" access="protected" presence="hidden">
+                <ui>
+                  <textEdit>
+                  </textEdit>
+                </ui>
+                <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+              </field>
+              <subform w="201mm" minH="55.309mm" layout="lr-tb" name="table">
+                <field w="62mm" h="9mm">
+                  <ui>
+                    <textEdit>
+                    </textEdit>
+                  </ui>
+                  <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                </field>
+                <field y="0mm" x="0mm" w="62mm" h="9mm">
+                  <ui>
+                    <textEdit>
+                    </textEdit>
+                  </ui>
+                  <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                </field>
+                <draw h="0.252778in" w="201mm">
+                  <ui>
+                    <textEdit/>
+                  </ui>
+                  <margin topInset="1.27mm" bottomInset="1.27mm" leftInset="1mm" rightInset="1.27mm"/>
+                </draw>
+                <subform layout="table" columnWidths="52.5mm 2.066931in 25mm 71mm">
+                  <subform layout="row" x="0.056mm">
+                    <draw h="15mm">
+                      <ui>
+                        <textEdit/>
+                      </ui>
+                      <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                    </draw>
+                    <draw h="15mm">
+                      <ui>
+                        <textEdit/>
+                      </ui>
+                      <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                    </draw>
+                    <draw h="15mm">
+                      <ui>
+                        <textEdit>
+                        </textEdit>
+                      </ui>
+                      <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                    </draw>
+                    <draw h="15mm">
+                      <ui>
+                        <textEdit/>
+                      </ui>
+                      <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                    </draw>
+                    <occur max="-1"/>
+                  </subform>
+                  <subform layout="row" x="0.056mm">
+                    <field w="67mm" minH="7.234mm" x="0.004mm" y="0mm" locale="en_GB" access="protected">
+                      <ui>
+                        <textEdit multiLine="1">
+                        </textEdit>
+                      </ui>
+                      <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                    </field>
+                    <field w="67mm" minH="7.234mm" y="0mm" access="protected">
+                      <ui>
+                        <textEdit multiLine="1">
+                        </textEdit>
+                      </ui>
+                      <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                    </field>
+                    <field w="67mm" minH="7.234mm" access="protected">
+                      <ui>
+                        <dateTimeEdit>
+                        </dateTimeEdit>
+                      </ui>
+                      <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                      <format>
+                        <picture
+                            >date{DD/MM/YYYY}</picture>
+                      </format>
+                    </field>
+                    <field w="67mm" minH="7.234mm" y="0mm" access="protected">
+                      <ui>
+                        <textEdit multiLine="1">
+                        </textEdit>
+                      </ui>
+                      <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                    </field>
+                    <occur min="0" max="-1"/>
+                  </subform>
+                  <subform layout="row" x="0.016mm">
+                    <draw minH="7.234mm" w="67mm" presence="invisible" x="0.001mm">
+                      <ui>
+                        <textEdit>
+                        </textEdit>
+                      </ui>
+                      <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                    </draw>
+                    <draw minH="7.234mm" w="67mm" presence="invisible">
+                      <ui>
+                        <textEdit>
+                        </textEdit>
+                      </ui>
+                      <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                    </draw>
+                    <draw minH="7.234mm" w="67mm">
+                      <ui>
+                        <textEdit>
+                        </textEdit>
+                      </ui>
+                      <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                    </draw>
+                    <draw minH="7.234mm" w="67mm" presence="invisible">
+                      <ui>
+                        <textEdit>
+                        </textEdit>
+                      </ui>
+                      <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+                    </draw>
+                  </subform>
+                  <overflow leader="HeaderRow"/>
+                </subform>
+              </subform>
+              <occur min="0" max="-1"/>
+            </subform>
+          </subform>
+          <subform w="202mm" minH="147.001mm" layout="lr-tb">
+            <draw h="6.773mm" w="108mm">
+              <ui>
+                <textEdit/>
+              </ui>
+              <margin topInset="1.27mm" bottomInset="1.27mm" leftInset="1mm" rightInset="1.27mm"/>
+            </draw>
+            <subform minH="237.19mm" layout="lr-tb" w="202mm">
+              <subform minH="8mm" layout="lr-tb" name="show">
+                <field w="89mm" h="8mm">
+                  <ui>
+                    <button highlight="outline"/>
+                  </ui>
+                  <margin bottomInset="0mm"/>
+                </field>
+                <margin topInset="3mm" bottomInset="2mm"/>
+                <keep intact="contentArea"/>
+              </subform>
+              <subform minH="8mm" layout="lr-tb" name="hide">
+                <field w="22mm" h="8mm">
+                  <ui>
+                    <button highlight="outline"/>
+                  </ui>
+                  <margin bottomInset="0mm"/>
+                </field>
+                <margin topInset="3mm" bottomInset="2mm"/>
+                <keep intact="contentArea"/>
+              </subform>
+              <field w="62mm" h="9mm" access="protected" presence="hidden">
+                <ui>
+                  <textEdit>
+                  </textEdit>
+                </ui>
+                <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+              </field>
+              <subform w="202mm" minH="224.19mm" layout="lr-tb">
+                <subform w="202mm" minH="34.081mm" layout="lr-tb">
+                  <draw w="7.95275in" h="6mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="202mm" minH="28mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                  </field>
+                  <margin topInset="1mm" bottomInset="1mm"/>
+                </subform>
+                <subform w="202mm" minH="34.081mm" layout="lr-tb">
+                  <draw w="7.95275in" h="6.875mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="202mm" minH="28mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                  </field>
+                  <margin topInset="1mm" bottomInset="1mm"/>
+                </subform>
+                <subform w="202mm" minH="34.081mm" layout="lr-tb" y="3mm">
+                  <draw w="7.95275in" h="6.875mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="202mm" minH="28mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                  </field>
+                  <margin topInset="1mm" bottomInset="1mm"/>
+                </subform>
+                <subform w="202mm" minH="34.081mm" layout="lr-tb" y="3mm">
+                  <draw w="7.95275in" h="6.875mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="202mm" minH="28mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                  </field>
+                  <margin topInset="1mm" bottomInset="1mm"/>
+                </subform>
+                <subform w="202mm" minH="34.081mm" layout="lr-tb">
+                  <draw w="7.95275in" h="6.036mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="202mm" minH="28mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                  </field>
+                  <margin topInset="1mm" bottomInset="1mm"/>
+                </subform>
+              </subform>
+              <occur min="0" max="-1"/>
+            </subform>
+          </subform>
+          <subform w="202mm" minH="147.001mm" layout="lr-tb">
+            <draw h="6.773mm" w="108mm">
+              <ui>
+                <textEdit/>
+              </ui>
+              <margin topInset="1.27mm" bottomInset="1.27mm" leftInset="1mm" rightInset="1.27mm"/>
+            </draw>
+            <subform minH="237.19mm" layout="lr-tb" w="202mm">
+              <subform minH="8mm" layout="lr-tb" name="show">
+                <field w="60mm" h="8mm">
+                  <ui>
+                    <button highlight="outline"/>
+                  </ui>
+                  <margin bottomInset="0mm"/>
+                </field>
+                <margin topInset="3mm" bottomInset="2mm"/>
+                <keep intact="contentArea"/>
+              </subform>
+              <subform minH="8mm" layout="lr-tb" name="hide">
+                <field w="22mm" h="8mm">
+                  <ui>
+                    <button highlight="outline"/>
+                  </ui>
+                  <margin bottomInset="0mm"/>
+                </field>
+                <margin topInset="3mm" bottomInset="2mm"/>
+                <keep intact="contentArea"/>
+              </subform>
+              <field w="62mm" h="9mm" access="protected" presence="hidden">
+                <ui>
+                  <textEdit>
+                  </textEdit>
+                </ui>
+                <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+              </field>
+              <subform w="202mm" minH="224.19mm" layout="lr-tb">
+                <subform w="127mm" minH="15.694mm" layout="lr-tb">
+                  <draw w="51mm" minH="9mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="2mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="26mm" minH="9mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="1mm" bottomInset="1mm" leftInset="0mm" rightInset="1mm"/>
+                  </field>
+                  <keep intact="contentArea"/>
+                </subform>
+                <subform w="127mm" minH="15.694mm" layout="lr-tb">
+                  <draw w="51mm" minH="9mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="2mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="76mm" minH="9mm" access="protected">
+                    <ui>
+                      <dateTimeEdit>
+                      </dateTimeEdit>
+                    </ui>
+                    <margin topInset="1mm" bottomInset="1mm" leftInset="0mm" rightInset="1mm"/>
+                    <format>
+                      <picture
+                          >date{DD/MM/YYYY}</picture>
+                    </format>
+                  </field>
+                  <keep intact="contentArea"/>
+                </subform>
+                <subform w="127mm" minH="15.694mm" layout="lr-tb">
+                  <draw w="51mm" minH="9mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="2mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="76mm" minH="9mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="1mm" bottomInset="1mm" leftInset="0mm" rightInset="1mm"/>
+                  </field>
+                  <keep intact="contentArea"/>
+                </subform>
+                <subform w="202mm" minH="15.694mm" layout="lr-tb">
+                  <draw w="127mm" h="17.439mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="2mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="25mm" minH="17.578mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="10mm" bottomInset="1mm" leftInset="3mm" rightInset="1mm"/>
+                  </field>
+                  <keep intact="contentArea"/>
+                </subform>
+                <subform w="202mm" minH="15.694mm" layout="lr-tb">
+                  <draw w="127mm" minH="20.35mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="2mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="25mm" minH="17.578mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="15mm" bottomInset="1mm" leftInset="3mm" rightInset="1mm"/>
+                  </field>
+                  <keep intact="contentArea"/>
+                </subform>
+                <subform w="202mm" minH="15.694mm" layout="lr-tb">
+                  <draw w="127mm" minH="11.651mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="2mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="25mm" minH="11.651mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="7mm" bottomInset="1mm" leftInset="3mm" rightInset="1mm"/>
+                  </field>
+                  <keep intact="contentArea"/>
+                </subform>
+                <subform w="202mm" minH="15.694mm" layout="lr-tb">
+                  <draw w="127mm" minH="17.578mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="2mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="25mm" minH="17.578mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="10mm" bottomInset="1mm" leftInset="3mm" rightInset="1mm"/>
+                  </field>
+                  <keep intact="contentArea"/>
+                </subform>
+                <subform w="202mm" minH="15.694mm" layout="lr-tb">
+                  <draw w="127mm" minH="11.192mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="2mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="25mm" minH="11mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="6mm" bottomInset="1mm" leftInset="3mm" rightInset="1mm"/>
+                  </field>
+                  <keep intact="contentArea"/>
+                  <margin bottomInset="2mm"/>
+                </subform>
+                <subform w="202mm" minH="34.081mm" layout="lr-tb">
+                  <draw w="7.95275in" h="9.537mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="202mm" minH="28mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                  </field>
+                  <margin topInset="1mm" bottomInset="1mm"/>
+                </subform>
+                <subform w="202mm" minH="34.081mm" layout="lr-tb">
+                  <draw w="7.95275in" h="9.537mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="202mm" minH="28mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                  </field>
+                  <margin topInset="1mm" bottomInset="1mm"/>
+                </subform>
+                <subform w="202mm" minH="34.081mm" layout="lr-tb">
+                  <draw w="7.95275in" h="6.875mm">
+                    <ui>
+                      <textEdit/>
+                    </ui>
+                    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="1mm" rightInset="0.5mm"/>
+                  </draw>
+                  <field w="202mm" minH="28mm" access="protected">
+                    <ui>
+                      <textEdit multiLine="1">
+                      </textEdit>
+                    </ui>
+                    <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
+                  </field>
+                  <margin topInset="1mm" bottomInset="1mm"/>
+                </subform>
+              </subform>
+              <occur min="0" max="-1"/>
+            </subform>
+          </subform>
+          <subform w="22mm" minH="8mm" layout="lr-tb" name="save" y="3mm">
+            <field w="22mm" h="8mm">
+              <ui>
+                <button highlight="outline"/>
+              </ui>
+              <margin bottomInset="0mm"/>
+            </field>
+            <margin topInset="3mm" bottomInset="2mm"/>
+          </subform>
+        </subform>
+        <overflow leader="Bloog"/>
+      </subform>
+      <subform layout="tb" w="203mm">
+        <margin bottomInset="0mm" leftInset="0mm" topInset="0mm"/>
+        <variables>
+        </variables>
+        <subform layout="lr-tb" minH="8.802mm" w="203mm">
+          <keep intact="contentArea"/>
+          <margin leftInset="0mm"/>
+          <draw h="0.238889in" name="tbd" w="203mm">
+            <margin bottomInset="1mm" leftInset="2mm" rightInset="1mm" topInset="1mm"/>
+            <ui>
+              <textEdit/>
+            </ui>
+          </draw>
+          <draw h="8mm" w="203mm">
+            <margin bottomInset="0.5mm" leftInset="2mm" rightInset="0.5mm" topInset="2mm"/>
+            <ui>
+              <textEdit/>
+            </ui>
+          </draw>
+          <subform layout="lr-tb" name="fieldCaption" w="50mm" presence="hidden">
+            <keep intact="contentArea"/>
+            <margin leftInset="2mm"/>
+            <draw h="8.802mm" name="Normal" w="48mm">
+              <margin bottomInset="0.5mm" leftInset="0mm" rightInset="0.5mm" topInset="0.5mm"/>
+              <ui>
+                <textEdit/>
+              </ui>
+            </draw>
+            <draw h="8.802mm" name="Star" w="48mm">
+              <margin bottomInset="0.5mm" leftInset="0mm" rightInset="0.5mm" topInset="0.5mm"/>
+              <ui>
+                <textEdit/>
+              </ui>
+            </draw>
+          </subform>
+          <field access="readOnly" h="9mm" w="62mm">
+            <margin bottomInset="1mm" leftInset="1mm" rightInset="1mm" topInset="1mm"/>
+            <ui>
+              <textEdit>
+              </textEdit>
+            </ui>
+          </field>
+          <field h="6mm" name="Button1" w="28.575mm">
+            <ui>
+              <button highlight="inverted"/>
+            </ui>
+          </field>
+          <field h="6mm" name="Button2" w="28.575mm">
+            <ui>
+              <button highlight="inverted"/>
+            </ui>
+          </field>
+          <field h="6mm" name="verifySig" w="28.575mm">
+            <ui>
+              <button highlight="inverted"/>
+            </ui>
+          </field>
+          <field h="0.1mm" name="concat" w="0.1mm">
+            <calculate>
+              <script contentType="application/x-javascript">
+	        fieldCaption.Star.presence = "hidden";
+	        fieldCaption.Normal.presence = "visible";
+	        this.rawValue = "Sig Not Required";
+              </script>
+            </calculate>
+            <margin bottomInset="0mm" leftInset="0mm" rightInset="0mm" topInset="0mm"/>
+            <validate>
+              <message>
+                <text name="scriptTest"/>
+              </message>
+            </validate>
+          </field>
+        </subform>
+        <subform layout="lr-tb" w="203mm" presence="hidden">
+          <keep intact="contentArea"/>
+          <margin bottomInset="1mm"/>
+          <draw h="6.269mm" w="7.992125in">
+            <margin bottomInset="0mm" leftInset="2mm" rightInset="0.5mm" topInset="2mm"/>
+            <ui>
+              <textEdit/>
+            </ui>
+          </draw>
+          <draw h="5mm" name="Text1" w="139.483mm">
+            <margin bottomInset="0mm" leftInset="2mm" rightInset="0mm" topInset="0.5mm"/>
+            <ui>
+              <textEdit/>
+            </ui>
+          </draw>
+          <field access="readOnly" h="0.217639in" name="TextField1" w="0.604861in">
+            <margin bottomInset="0mm" leftInset="0mm" rightInset="0mm" topInset="0mm"/>
+            <ui>
+              <textEdit>
+              </textEdit>
+            </ui>
+            <validate>
+              <message>
+                <text name="scriptTest"/>
+              </message>
+            </validate>
+          </field>
+          <draw h="5mm" name="Text1" w="0.786167in">
+            <margin bottomInset="0mm" leftInset="0mm" rightInset="0.5mm" topInset="0.5mm"/>
+            <ui>
+              <textEdit/>
+            </ui>
+          </draw>
+          <field h="9mm" name="url" w="62mm">
+            <margin bottomInset="1mm" leftInset="1mm" rightInset="1mm" topInset="1mm"/>
+            <ui>
+              <textEdit>
+              </textEdit>
+            </ui>
+          </field>
+        </subform>
+      </subform>
+    </subform>
+    <proto>
+      <subform w="202.001mm" name="Bloog" x="0.003mm" y="0.008mm">
+        <occur max="-1"/>
+        <draw w="202mm" h="6mm" x="0.001mm" y="0.001mm">
+          <ui>
+            <textEdit/>
+          </ui>
+          <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
+        </draw>
+      </subform>
+    </proto>
+  </subform>
+</template>
+endstream
+endobj
+6 0 obj <<
+  /Length 3455
+>>
+stream
+<localeSet xmlns="http://www.xfa.org/schema/xfa-locale-set/2.7/">
+  <locale name="en_US" desc="English (United States)">
+    <calendarSymbols name="gregorian">
+      <monthNames>
+        <month>January</month>
+        <month>February</month>
+        <month>March</month>
+        <month>April</month>
+        <month>May</month>
+        <month>June</month>
+        <month>July</month>
+        <month>August</month>
+        <month>September</month>
+        <month>October</month>
+        <month>November</month>
+        <month>December</month>
+      </monthNames>
+      <monthNames abbr="1">
+        <month>Jan</month>
+        <month>Feb</month>
+        <month>Mar</month>
+        <month>Apr</month>
+        <month>May</month>
+        <month>Jun</month>
+        <month>Jul</month>
+        <month>Aug</month>
+        <month>Sep</month>
+        <month>Oct</month>
+        <month>Nov</month>
+        <month>Dec</month>
+      </monthNames>
+      <dayNames>
+        <day>Sunday</day>
+        <day>Monday</day>
+        <day>Tuesday</day>
+        <day>Wednesday</day>
+        <day>Thursday</day>
+        <day>Friday</day>
+        <day>Saturday</day>
+      </dayNames>
+      <dayNames abbr="1">
+        <day>Sun</day>
+        <day>Mon</day>
+        <day>Tue</day>
+        <day>Wed</day>
+        <day>Thu</day>
+        <day>Fri</day>
+        <day>Sat</day>
+      </dayNames>
+      <meridiemNames>
+        <meridiem>AM</meridiem>
+        <meridiem>PM</meridiem>
+      </meridiemNames>
+      <eraNames>
+        <era>BC</era>
+        <era>AD</era>
+      </eraNames>
+    </calendarSymbols>
+    <datePatterns>
+      <datePattern name="full">EEEE, MMMM D, YYYY</datePattern>
+      <datePattern name="long">MMMM D, YYYY</datePattern>
+      <datePattern name="med">MMM D, YYYY</datePattern>
+      <datePattern name="short">M/D/YY</datePattern>
+    </datePatterns>
+    <timePatterns>
+      <timePattern name="full">h:MM:SS A Z</timePattern>
+      <timePattern name="long">h:MM:SS A Z</timePattern>
+      <timePattern name="med">h:MM:SS A</timePattern>
+      <timePattern name="short">h:MM A</timePattern>
+    </timePatterns>
+    <dateTimeSymbols>GyMdkHmsSEDFwWahKzZ</dateTimeSymbols>
+    <numberPatterns>
+      <numberPattern name="numeric">z,zz9.zzz</numberPattern>
+      <numberPattern name="currency">$z,zz9.99|($z,zz9.99)</numberPattern>
+      <numberPattern name="percent">z,zz9%</numberPattern>
+    </numberPatterns>
+    <numberSymbols>
+      <numberSymbol name="decimal">.</numberSymbol>
+      <numberSymbol name="grouping">,</numberSymbol>
+      <numberSymbol name="percent">%</numberSymbol>
+      <numberSymbol name="minus">-</numberSymbol>
+      <numberSymbol name="zero">0</numberSymbol>
+    </numberSymbols>
+    <currencySymbols>
+      <currencySymbol name="symbol">$</currencySymbol>
+      <currencySymbol name="isoname">USD</currencySymbol>
+      <currencySymbol name="decimal">.</currencySymbol>
+    </currencySymbols>
+    <typefaces>
+      <typeface name="Myriad Pro"/>
+      <typeface name="Minion Pro"/>
+      <typeface name="Courier Std"/>
+      <typeface name="Adobe Pi Std"/>
+      <typeface name="Adobe Hebrew"/>
+      <typeface name="Adobe Arabic"/>
+      <typeface name="Adobe Thai"/>
+      <typeface name="Kozuka Gothic Pro-VI M"/>
+      <typeface name="Kozuka Mincho Pro-VI R"/>
+      <typeface name="Adobe Ming Std L"/>
+      <typeface name="Adobe Song Std L"/>
+      <typeface name="Adobe Myungjo Std M"/>
+    </typefaces>
+  </locale>
+</localeSet>
+endstream
+endobj
+7 0 obj <<
+  /Length 11
+>>
+stream
+</xdp:xdp>
+endstream
+endobj
+8 0 obj <<
+  /Type /Pages
+  /Count 1
+  /Kids [9 0 R]
+>>
+endobj
+9 0 obj <<
+  /Type /Page
+  /Parent 2 0 R
+  /MediaBox [0 0 612 792]
+>>
+endobj
+xref
+0 10
+0000000000 65535 f 
+0000000015 00000 n 
+0000000199 00000 n 
+0000000358 00000 n 
+0000000534 00000 n 
+0000001228 00000 n 
+0000043587 00000 n 
+0000047095 00000 n 
+0000047157 00000 n 
+0000047220 00000 n 
+trailer <<
+  /Root 1 0 R
+  /Size 10
+>>
+startxref
+47297
+%%EOF
diff --git a/xfa/fxfa/layout/BUILD.gn b/xfa/fxfa/layout/BUILD.gn
index 4ca00b9..f251306 100644
--- a/xfa/fxfa/layout/BUILD.gn
+++ b/xfa/fxfa/layout/BUILD.gn
@@ -41,3 +41,10 @@
   ]
   visibility = [ "../../../*" ]
 }
+
+pdfium_embeddertest_source_set("embeddertests") {
+  sources = [
+    "cxfa_layoutitem_embeddertest.cpp",
+  ]
+  pdfium_root_dir = "../../../"
+}
diff --git a/xfa/fxfa/layout/cxfa_layoutitem_embeddertest.cpp b/xfa/fxfa/layout/cxfa_layoutitem_embeddertest.cpp
new file mode 100644
index 0000000..6dd7527
--- /dev/null
+++ b/xfa/fxfa/layout/cxfa_layoutitem_embeddertest.cpp
@@ -0,0 +1,27 @@
+// Copyright 2019 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "testing/embedder_test.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+class CXFALayoutItemEmbedderTest : public EmbedderTest {};
+
+#if defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
+// Leaks. See https:://crbug.com/306123
+#define MAYBE_Bug_306123 DISABLED_Bug_306123
+#else
+#define MAYBE_Bug_306123 Bug_306123
+#endif
+
+TEST_F(CXFALayoutItemEmbedderTest, MAYBE_Bug_306123) {
+  EXPECT_TRUE(OpenDocument("bug_306123.pdf"));
+  FPDF_PAGE page0 = LoadPage(0);
+  FPDF_PAGE page1 = LoadPage(1);
+  FPDF_PAGE page2 = LoadPage(2);
+  EXPECT_NE(nullptr, page0);
+  EXPECT_NE(nullptr, page1);
+  EXPECT_EQ(nullptr, page2);
+  UnloadPage(page0);
+  UnloadPage(page1);
+}