Correcting formatting to work with pdf