php strict and pdf charset fixes