Generic code to re-OCR PDFs, with parallelism.