Improve pdf formatting