Error generating PDF submit form