Helper to convert things to pdf.