Changes to pdf creation