PDFBOX-1094: add cast forgotten in previous commit; replace getBounds2D() that doesn't work for negative values.