fix encoding issues on PI PDF