Stop guessing DPI
Instead of guessing DPI, we could read off the page size from the pdf of the scan. We would then use it to normalize the coordinate calculation.
It would be good to also know whether the image that we extract is actually taking the full page, but I didn't yet learn how to do it with the libs we have available.