preprocess output from pdftext