Jump to content
PhilipM

Export form field data to CSV

Recommended Posts

PhilipM

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.

Share this post


Link to post
Share on other sites
Steven Zakulec

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.

 

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

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