Fixed bug with encoding in PDFs