With latex and a non-standard paper format, the pageheight must be used to compute correct coordinates from lastypos values.