Improvements to pdf