Added form control detection to PDF routine.