Improvements to PDF text scanning