1. Home
  2. Foxit Quick PDF Library
  3. Programmatically delete all form fields in a PDF

Programmatically delete all form fields in a PDF

All form fields in a PDF can be deleted with the assistance of the DeleteFormField function in Foxit Quick PDF Library. Some JScript sample code that demonstrates how to do this is shown below:

DPL.LoadFromFile("pdf_form.pdf");
TotalFormFields = DPL.FormFieldCount()
 
While (TotalFormFields > 0)
{
  DPL.DeleteFormField(TotalFormFields);
  TotalFormfields = TotalFormFields - 1;
}
 
DPL.SaveToFile("no_form_fields.pdf");
Updated on April 10, 2017

Was this article helpful?

Related Articles

Ready to try Foxit PDF SDK?
Click the link below to download your trial
Free Trial

Leave a Comment