How to export data to pdf?

How to put form data into a .pdf?

  • What's the best way to take form data from a website and drop it into a print-ready .pdf? I've been searching, but I can't find a solution that seems to fit my needs. The ideal solution would allow: 1. Users to submit a form online 2. The data from the form is inserted into a print-ready .pdf 3. The finished .pdf is shown for a preview (with some sort of 'Accept' button) 4. If accepted, the .pdf is emailed to a set address I can handle Item #1 (all on my own!), but that's where it ends. Any ideas on how to fill in the pieces?

  • Answer:

    I built a solution like this a few months ago for a client. http://www.programsthatmatter.com/promos/step1.php

jmevius at Ask.Metafilter.Com Visit the source

Was this solution helpful to you?

Other answers

Are you looking for a prepackaged solution? What level of programming or scripting are you comfortable with? What are the technical details? The only way I've personally done dynamic PDF generation has been with perl and http://www.onjava.com/pub/a/onjava/2002/10/16/fop.html. It was kind of a mess, and I wasn't even putting it together from scratch -- just updating an existing system.

coined

Adobe has document workflow management and lifecycle stuff that you might look into. It is not an HTML form, but it is pretty awesome insofar as the topic is concerned. see, for example, http://www.adobe.com/products/server/formmanager/

boo_radley

LaTeX is good for this kind of thing, I did something similar a while back. Just make a template latex source file, fill in the blanks with sed, and run pdflatex. If you need more flexibility in the form, process the source file with some templating system (I like perl tt).

fvw

To attempt to answer these questions: Ideally, I'd find some inexpensive/free scripts that handled this or could be pieced together to do so. I am no expert at php/js scripting -- typically at the take-an-existing-script-and-modify-it level. I'd love a PHP-based solution. I'll check into the Adobe idea -- straight to the source. From a quick glance, it looks a little too large (and probably costly) for my application. But, it might be a good jumping-off point. Any online examples of how to implement the LaTeX idea?

jmevius

If you have PHP available... FPDF works very well. http://www.fpdf.org/

bofe

FPDF requires the documents be recreated, correct? I guess I should explain my situation further. I have pre-existing (fixed in terms of look/feel, fonts, type sizing, style, etc.) documents that need to be customized before printing. There are a handful of text fields for each document that should be dynamically entered (think 'Address' on a flyer).

jmevius

I'd also heard a recommendation for XData + Quark. I don't currently have a copy of Quark, but it wouldn't be prohibitive to purchase one. XData (http://www.thepowerxchange.com/xdata_1536_prd1.html), this might be the link. Has anyone used something similar?

jmevius

FPDF is probably your best bet for an automated solution. You can import a template PDF using http://fpdi.setasign.de/index.php?p=home, and then use FPDF to place your form field data. I'm working on a project now for a large, very image conscious client that uses it. Works great.

nonmyopicdave

@Wild_Eep -- Wow, that seems almost dead-on to what I'm trying to do. Is there a chance you'd be interested in talking about some of the details? If so, my email address is in my profile. Thanks in advance...

jmevius

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.