added check for pdfRectangle