4.9.  Comparing Format

Two documents have the same page format if width and height of all pages have the same values. The tolerance defined by ISO 216 is taken into account.

<testcase name="haveSameFormat">
  <assertThat testDocument="test/test.pdf"
              masterDocument="master/master.pdf"
  >
    <haveSameFormat />
  </assertThat>
</testcase>

The comparison can be restricted to selected pages:

<testcase name="haveSameFormat_OnPage2">
  <assertThat testDocument="test/test.pdf"
              masterDocument="master/master.pdf"
  >
    <haveSameFormat onPage="2"/>
  </assertThat>
</testcase>
<testcase name="haveSameFormat_OnEveryPageAfter">
  <assertThat testDocument="test/test.pdf"
              masterDocument="master/master.pdf"
  >
    <haveSameFormat onEveryPageAfter="2"/>
  </assertThat>
</testcase>

All possibilities to select pages are explained in chapter 13.2: “Page Selection”.