Fixed PDF generation