fixed PDF generation