Fixed the out of memory error in PdfUtilities, now it is caught and outputted.