Frequently Asked Question:
ExtractPages and FormFieldCount
I have a multipage document with form fields. After I use ExtractPages function to extract one page, the new document correctly contains 1 page only, but its form field count is the same as of the original document. Moreover, all fields can be referenced by their index, even if they do not exist in the extracted document.
Is this a bug? Is there a way to clean resulting document and remove those non-existing fields?
In this situation the document should probably be cleaned up and the form fields removed after the ExtractPages function has removed the pages which hosted these form fields. We'll update this feature in one of the next releases of Quick PDF Library.
As a workaround in the short-term, you could iterate through the form field index and call the GetFormFieldPage function and then call the DeleteFormField function to delete any form fields which refer to deleted pages.