Allow PDF generation with invalid form, close #871