Fixed permission issue for PDF export