It now handles pdf doc with different sized pages