PDF export and initial PDF generation