Fixed pdfMiner function