process PDFs correctly