resize the GUI to the size of the PDF