PDF: fix integer overflows
follow-up to r9424