changes to pdf generation