Community Documentation

Fill PDF: Populate PDF templates from form data

Last updated February 7, 2012. Created by lefnire on February 6, 2009.
Edited by Liam Morland, wizonesolutions, arianek, frankfarm. Log in to edit this page.

This module populates existing PDF forms with token-specified content. Think of TurboTax or FAFSA, where the user is guided through webforms (or CCK/field-driven content entry forms used to collect user input), and their data populates a PDF template to print or email. In these situations (common in government, law, commercial real estate, the mortgage industry), a PDF template is provided by an agency and its format is strict. Therefore, unlike Printer, e-mail, and PDF versions's PDF generation module, which uses one of several PDF generation tools to print a page as it looks in its printer-friendly view, this module requires an existing PDF template whose form fields will be populated with the form data.

Comments

URL of PDF if no Clean URLs

If your site does not use Clean URLs, the URL of your filled PDF will be like this: http://www.example.com/?q=fillpdf&fid=10&nid=10

Tomcat - Deployment

I can confirm that this works on Tomcat 5.5 and not 6.

Removing PDF Security

A good tool to remove all security from the PDF, so that this will work with FIll PDF and your form is http://www.debenu.com/quick-pdf-tools/index.php . Hope that helps some people here.

removed. posted in the correct place.

Moved post to the correct forum. Please excuse my newbieness.

can someone explain more on

can someone explain more on the last part. so, i'll create a link to a given node then i just past this

<?php
echo l("PDF", fillpdf_pdf_link($form_id = 1, $node_id = 2));
?>

on the content of the node. or i'll create a block with this code inside. sorry for being a newbie.
I got all the other stuff working. also is it possible after the user sees the form in pdf, can they send it to an email.
Thank you!

FillPDF with Forms API?

Has anyone used this with Forms API?
Would that be possible?

Using this with webform,

Using this with webform,

I've entered the replacement patterns in the fillpdf value fields and when I go to my url for the filled in webform(fillpdf?fid=3&nid=221) and look at the pdf they are not interpreted, they appear just as I entered them from the list of replacement patterns. e.g.: [field_local_element_name-raw]

I don't see anyone else having this issue so I must be doing something wrong.

Thanks for any help on this!
-Eric

Webform url

Oh I see, I was using the wrong url for webform results, should be this: /fillpdf&fid=x&webform[nid]=x&webform[sid]=x

Page status

Needs updating

Log in to edit this page

About this page

Drupal version
Drupal 6.x, Drupal 7.x
Audience
Developers and coders, Site administrators
Keywords
javabridge, PDF, pdftk, php, tomcat, xfdf

Site Building Guide

Drupal’s online documentation is © 2000-2012 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.