Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a pdf document with many form fields on it. I need to see the names of the form fields. Can I do this with Adobe Reader? Perhaps a third party tool..?

share|improve this question

4 Answers 4

up vote 1 down vote accepted

It's likely you'll find a user-friendly application to do this for you, but this is how I achieve it with a little VBScript...

  1. Download and Install ABCpdf from webSupergoo, available here...

  2. Copy the following script into a text file and save it with a '.vbs' file extension.

  3. Place a copy of your PDF file into the same folder as the script, naming it 'myForm.pdf'.

  4. Double-click the script file to run.


Set theDoc = CreateObject("ABCpdf8.Doc")
theDoc.Read "myForm.pdf"
theDoc.AddFont "Helvetica-Bold"
theDoc.FontSize=16
theDoc.Rect.Pin=1

Dim theIDs, theList
theIDs = theDoc.GetInfo(theDoc.Root, "Field IDs")
theList = Split(theIDs, ",")

For Each id In theList
    theDoc.Page = theDoc.GetInfo(id, "Page")
    theDoc.Rect.String = theDoc.GetInfo(id, "Rect")
    theDoc.Color.String = "240 240 255"
    theDoc.FillRect()
    theDoc.Rect.Height = 16
    theDoc.Color.String = "220 0 0"
    theDoc.AddText(theDoc.GetInfo(id, "Name"))
    theDoc.Delete(id)
Next

theDoc.Save "output.pdf"
theDoc.Clear
MsgBox "Finished"

After the script finishes you should find another PDF document named 'output.pdf' appears in the same folder, with all the field names overlayed on top of the fields.

share|improve this answer

There is a technical article on Aspose.com which explains how to identify form field names for PDFs. According to this article, you can achieve this by using the Java code on the page.

//First a input pdf file should be assigne
Form form = new Form("FilledForm.pdf");
//get all field names
String[] allfields = form.getFieldsNames();
// Create an array which will hold the location coordinates of Form fields
Rectangle[] box = new Rectangle[allfields.Length];
for (int i = 0; i < allfields.Length; i++)
{
  // Get the appearance attributes of each field, consequtively
  FormFieldFacade facade = form.getFieldFacade(allfields[i]);
  //Box in FormFieldFacade class holds field's location.
  box[i] = facade.getBox();
}
form.save();

// Now we need to add a textfield just upon the original one
FormEditor editor = new FormEditor("FilledForm.pdf", ”form_updated.pdf");
for (int i = 0; i < allfields.Length; i++)
{
  // add text field beneath every existing form field
  editor.addField(FormEditor.FLDTYP_TXT, "TextField" + i, allfields[i], 1, box[i].getX, box[i].getY(), box[i].getX() + 50, box[i].getY() + 10);
}
//Close the document
editor.save();
share|improve this answer

I appreciate this question is a bit old but in case anyone else comes across it the PDF Toolkit will allow you to do this very simply with a command that looks like this (where the PDF you want the form fields from is called docsOfInterest.pdf:

pdftk docOfInterest.pdf dump_data_fields
share|improve this answer

As far as I know you can't do it with Acrobat Reader. You can use their PDF writer program (Currently Acrobat XI) to do it, but it's fairly pricey.

I had to do the same thing for just a few documents. I just downloaded the trial version of deskPDF Studio X. From the menu, going to Forms > Modify Form Layout lets you see the name of the fields.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.