Jump to content

Export form field data to CSV


PhilipM

Recommended Posts

Posted

Hello,

Is anyone aware of how to export form field data to a CSV or perhaps convert FDF or XFDF into CSV?

The reason for asking: we are exporting customer data to forms and pushing these PDFs out to be checked and amended by Customers before reimporting the data into an SQL database. CSV is the preferred medium of exchange.

Thank you for the assistance.

  • Power User
Steven Zakulec
Posted

After a bunch of searching, there's 3 possible ways here:

  • The simplest way is to open an XFDF file in Excel- you want this treated as an XML file.  Excel will warn you that the extension and the content don't match- continue anyway.  You'll want to start with a read-only workbook just so you can see how it looks.  After that, you can play around with the other options, and build a better importer that doesn't bring in lots of extra crap.

 

  • If your PDFs don't have Owner passwords/encrypted (or you have any passwords set on the PDFs), you could use PDFtk, which is open source: https://www.pdflabs.com/tools/pdftk-server/
  • Despite the name, it's just a commandline utility that lets you do things with PDFs.  The function you want is dump_data_fields or dump_data_fields_utf8.  This dumps all of the form data- the field name, value type, and value among other things.  It's not comma separated values, but if you bring it into Excel, you could easily change it into that.

 

  • The third way is to write or find a script that converts FDF or XFDF to CSV.

If none of these work, there's an old program called XFDF to Excel extractor, but this requires a good amount of effort on your part (especially if the form fields themselves change frequently), and has some other caveats which is why I haven't mentioned it otherwise.

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.