Updated port to reflect changes in pdfminer