updated for different size pdfs and rotating font