Reputation: 3730
Have several pdf webforms that I would like to auto-populate with information from my model.
Here's a sample pdf http://www.flhsmv.gov/dmv/forms/BTR/Milpak/82040.pdf
Is there a gem or plugin that could help?
Upvotes: 3
Views: 919
Reputation: 9168
I don't know Ruby lib that would allow to write extra element on existing PDF.
Some Web service are able to, like Applidok PDF merge, which allow to write user data (e.g. from a Web form) on existing PDF, used as template.
You can read online doc for Ruby integration at http://doc.applidok.com/merge-ruby.html .
Upvotes: 0
Reputation: 3207
There are a couple of plugins for creating PDF documents in Rails. Please see here.
Upvotes: 0
Reputation: 984
If you have a sizable amount of form models or have to process many form submissions, you should use the FDF (Form Data Format) format. It is part of the PDF Standard.
Adobe offers the free FDF Toolkit that will help you generate the FDF files. It does not contain Ruby bindings but there are several ways to do it (by order of convenience, depending on your needs):
NOTE: The Ruby C API has changed significantly since version 1.9.x
Upvotes: 2