← All posts

Extract pages without losing the form fields

You pulled pages 3 to 5 out of a filled-in application form. The extract opens, the boxes are all where they should be, the answers are sitting in them — and clicking one does nothing. No cursor, no outline, no highlight. Tab goes nowhere.

Or you got the other version: the boxes came out empty, and the answers you spent an hour typing are not visible anywhere in the new file.

Search for this and the results are about extracting data from PDFs, which is a different job entirely, so you end up in an Adobe forum thread where somebody was told to buy Acrobat. Neither result is your problem. Your problem is that a form field is stored in two places at once, and page extraction only takes one of them.

The half that travels, and the half that does not

Three objects have to agree before you can type in a PDF form.

Extracting pages copies pages. Every tool that does it, ours included, opens an empty document and imports the page objects you asked for, which is the same rebuild that empties the bookmark panel. The widgets are on the pages, so they come across intact, name and value and all. The AcroForm hangs off the catalogue of the old file, and the new file has its own catalogue with nothing in it.

So the extract contains everything that draws a form and nothing that is one. There is no setting on Extract PDF pages that changes this, and it is worth assuming any browser tool that copies pages behaves the same way until you have checked — our split and delete tools certainly do.

Why some extracts show the answers and some come out blank

This is the part that makes the forum threads contradict each other, and it comes down to one flag on the form you started with.

Forms that store their appearances — most of them, including anything filled in and saved by Acrobat — have a baked appearance stream on each widget, showing the value as it was when it was saved. That stream is on the page. It comes across. Your reader draws the annotation, the answer appears, and nothing happens when you click it, because there is no form behind the picture.

Forms with /NeedAppearances set to true push the drawing back onto the reader: the file says "here is the value, render it yourself at opening time". Extract those pages and the reader has a value with no appearance to draw, no /DA telling it what size and colour to use, and no /DR holding the font — all three lived in the AcroForm. It draws nothing. Empty boxes, on a file that still has your answers inside it.

There is a third outcome, which is why one colleague swears the file is fine and another says it is dead: readers disagree about what to do with loose widgets. Some draw the appearance and stop. Some notice the orphaned annotations and rebuild a form around them, at which point the file behaves almost normally. Test the extract in the reader the recipient will use, not the one you have open.

What is gone regardless

Whichever of the three you get, the extract has lost the machinery:

The field names and the typed values are still in the file, sitting in the widget dictionaries. They are simply not addressable as a form any more. Worth knowing if you assumed extraction had cleaned anything up: it has not.

The order that keeps your answers

If what you need is a finished record of pages 3 to 5 — something to file, email or print — do this and the problem disappears.

  1. Flatten the whole document first. Flatten PDF draws each field's appearance into the page's own content stream and then deletes the field. The answers stop being form data and become ordinary page content: no field left to lose. Why that is the right operation, and why deleting the fields instead gives you back a blank form, is its own short read.
  2. Then extract the range. 3-5 for a run, 3,7,9 for scattered pages, 4- for page four to the end. Nothing to lose now, because the answers are ink.
  3. Check the result in our PDF inspector, which reads page count and form field count in your browser without uploading anything. A correctly flattened extract reports no form fields and shows your answers on the page.

Doing it the other way round is what people try first, and it cannot work: flatten the extract and there is no AcroForm for the flattener to find, so it presses nothing into anything.

When the extract has to stay fillable

Sometimes flattening is not an option — you are sending someone three pages of a pack to complete. No browser tool here will do that. Two things will.

qpdf, free and on every platform, has understood form fields since version 8.3:

qpdf in.pdf --pages . 3-5 -- out.pdf

The full stop means "this same document", so qpdf keeps your catalogue and its AcroForm rather than building an empty one. It carries /DR and /DA across, keeps the fields belonging to the pages you kept, drops the fields belonging to the pages you did not, and repoints each widget at its new page. In testing it produced a three-page fillable form and nothing else — none of the residue in the warning above. The same flag rearranges pages without emptying the outline, which is the other job it is unreasonably good at.

Our PDF editor works on the document you uploaded rather than building a new one, so deleting the pages you do not want leaves the AcroForm in place and the remaining fields working. The tidy-up it does not do: fields whose widgets were on the deleted pages stay listed in the form, holding their values, pointing at pages that are no longer in the tree. Readers ignore them. They are still in the file.

If you have Acrobat, its page-organising panel has an Extract command that keeps the fields. That is what the forum threads are trying to tell you, unhelpfully, when you do not have Acrobat.

If it was the answers you wanted, not the pages

Half the search results for this are about pulling data out of a PDF, and occasionally that is what someone actually needed: the values, not the sheets. No page tool will give you those. pdftk form.pdf dump_data_fields prints every field name and value as text, and the free pdftk-java port runs anywhere Java does. That is a two-second job that no amount of extracting will do for you.

The rest of what a rebuild costs

The form is the loudest thing extraction leaves behind, not the only one. The outline goes as well, so if the extract is long enough to need navigation, build a new one with Create PDF bookmarks from the headings or one entry per page. Page labels go, so a document numbered iv, v, vi now starts at 1. And if you also want the extracted pages in a different order, Organize PDF pages costs exactly the same things for exactly the same reason — it is one rule, not a list of separate bugs.

Do the page work first. Put everything you care about back on top afterwards.