plainlab / plainmerge

PDF mail merge (PDF data merge / PDF generator using Excel files)
https://pdfmailmerger.github.io
GNU Affero General Public License v3.0
20 stars 4 forks source link

Fill out FDF form fields in a PDF #2

Open fancyham opened 3 years ago

fancyham commented 3 years ago

I love how the fields are imported from the excel spreadsheet, but in my case, I'm trying to fill out a PDF form that has specific form fields that will later be ingested by the receiver, so floating text annotations won't work for my use case.

If you can pull the FDF (forms data format) areas from the PDF and make them drop targets for the merge data, that'd be really cool. (perhaps in addition to the text annotation version you have now, since folks might want to do both annotate and fill out forms)

Then, as a stretch goal, the ability to save the settings for a future use, perhaps using the PDF name as a prefix to avoid confusion.

manhtai commented 3 years ago

Thanks for the suggestions, let me see what I can do about that 🤔

manhtai commented 3 years ago

@fancyham could you elaborate more about how the form would work? The Excel fields are not text annotations, it will render with the real data from Excel file. Say you have 1000 rows in Excel file, it will generate 1000 different PDF pages. So I suppose that you can just move a field to the PDF form field you want and all is good?

fancyham commented 3 years ago

Imagine the pdf highlighted form fields on the page, and you could drag the excel fields to them to connect inputs to the form fields they’d populate when exported. Then each row of the excel spreadsheet becomes its own PDF (perhaps with a filename pulled from the spreadsheet) but with form fields filled out with the connected columns from the spreadsheet. Check out PDFzero.com/merge for an example of what I’m talking about. Yours would be like a GUI version.

manhtai commented 3 years ago

I see, so drag and drop the field into position seems like a workaround for now. Thanks for your clarification!

fancyham commented 3 years ago

Something like this - drag and drop as the primary way to connect input columns to existing form fields. IMG_1699

manhtai commented 3 years ago

Got the gist now. Thanks. 👍

manhtai commented 3 years ago

I've implemented a rough form edit mode to support PDF forms here: https://github.com/plainlab/plainmerge/releases/tag/v0.0.9.

The drag-and-drop part is doable I think, but not a quick win though.

fancyham commented 3 years ago

Nice. One tricky thing for my test PDF was that the field names are not always the same as the label on the PDF itself.

Not easy to solve though. Fortunately, I was able to see field names using Acrobat Pro to tell which fields to match with the inputs.

It was pretty hard to find the right field just because there were so many on my PDF ("SBA form 641") — If it's possible to have a search/filter for the field names, that'd be helpful for finding the right one.

(Also, it might just be this build but I wasn't able to preview or output anything)

manhtai commented 3 years ago

It will take a while for big documents, I should make a loading indicator for it though. Could you try the latest release? I have no problem with the SBA form so far, except a delay time.

fancyham commented 3 years ago

Just tried the 0.0.12. Nice — it was fast for me on this M1 Mac so I didn't see a loading indicator.