Implement save_pdf