Import PDF or FDF to Base?

It seems crazy, but while Libre Base can export a form as PDF, there is no way to easily import the completed form data from the PDF into Libre Base.

One idea is to extract PDF form data to FDF (or unfriendly CSV) and then convert that to a friendly CSV at which point one can copy and paste CSV data into Libre Base.

  • Big question: How can I easily import PDF form data to a Base record?

  • Note: A friendly CSV would look like:

    • Row 1: “FieldName1, FieldName2, …”
    • Row 2: “Value1, Value2, …”

Useful files on Ge.tt until 2015,02,25:

  1. Super basic blank pdf with “Submit format” as FDF
  2. Filled PDF made from (1)
  3. Extracted CSV data from (2)
  4. Extracted FDF data from (2)

How to make files 1-4

  1. Libre Base > Forms > Edit > Open Database Object → File > Export as PDF
  2. Type data manually
  3. pdftk filled_form-submit_format_fdf.pdf dump_data_fields output filled_form.csv
  4. pdftk filled_form-submit_format_fdf.pdf generate_fdf output filled_form.fdf

*Note: You can also use Libre Base to export a blank form as XML or HTML, but I don’t know how to input data into those files nor import that data back into Base.

I think you’re attacking it from the wrong angle…

PDF forms are an Adobe tool, mainly. So I checked my copy of Adobe Acrobat. (Pro, not the free reader.) Sure enough, it has an option to “export data”, “merge data files into spreadsheet” and so forth.

So, if you use Adobe Acrobat Pro to collect the data from FDFs into a spreadsheet, you can then import the data into Base. (I know, I know—Acrobat Pro isn’t free. But unfortunately I see no way to handle FDF files from Base directly.)

Acrobat Pro then makes a friendly CSV with all the FDFs merged into it and, it seems, exact duplicate FDFs removed! (Extra bonus! :wink: It says the FDFs have to have been made with the same form, but I don’t know what it will do if they were from different forms but have the same field names, or some set of identical field names.