Getting the page width from the reference file

Uses it to scale images that are too large.
When there is no reference files, default to a US letter portrait size
to scale the images