Even in the same pdf document, different pages will have different page width and height.
Grobid gives the page width and height info for all pages.
Eg:
<facsimile>
<surface n="1" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="2" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="3" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="4" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="5" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="6" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="7" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="8" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="9" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="10" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="11" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="12" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="13" ulx="0.0" uly="0.0" lrx="792.0" lry="612.0"/>
<surface n="14" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="15" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="16" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="17" ulx="0.0" uly="0.0" lrx="792.0" lry="612.0"/>
<surface n="18" ulx="0.0" uly="0.0" lrx="792.0" lry="612.0"/>
<surface n="19" ulx="0.0" uly="0.0" lrx="792.0" lry="612.0"/>
<surface n="20" ulx="0.0" uly="0.0" lrx="792.0" lry="612.0"/>
<surface n="21" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="22" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="23" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="24" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="25" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="26" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="27" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="28" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="29" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="30" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="31" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
<surface n="32" ulx="0.0" uly="0.0" lrx="612.0" lry="792.0"/>
</facsimile>
Currently the code only takes the first page width and height here. This is a bug as different pages can have different widths as in example above. Treating the entire pdf doc with the same width and height might make pdf annotations go wrong.
Change this to have page_dimensions for all pages.
Even in the same pdf document, different pages will have different page width and height.
Grobid gives the page width and height info for all pages.
Eg:
Currently the code only takes the first page width and height here. This is a bug as different pages can have different widths as in example above. Treating the entire pdf doc with the same width and height might make pdf annotations go wrong.
Change this to have
page_dimensionsfor all pages.