Null instead of empty object for pdf
Assume pages have the same height 

- This not true sometimes, but often enough to be reasonable.
Properly calculate document offset