Last updated December 15, 2013. Created on February 6, 2009.
Edited by wizonesolutions, Liam Morland, arianek, frankfarm. Log in to edit this page.

What does this module do?

Most PDF modules generate PDFs from scratch; FillPDF is not one of those modules. Instead, it lets you fill in existing editable PDFs with data from your Drupal site. Editable PDFs are those forms that let you type into them.

Have you used online tax preparation software or similar form preparation tools before? (In the U.S., TurboTax and FAFSA on the Web are two well-known examples.)

These tools guide the user through web-based forms and collect their information. At the end, they provide them with a pre-filled copy of a PDF form containing the same information.

FillPDF lets you build this kind of workflow.

Through the magic of the Token and Webform Tokens modules, it is possible to indicate which fields on your website represent which FillPDF fields. When a user goes to a special link on your site, the module does its job, and the PDF is provided as a downloadable file.*

* You can also save the PDF to a file, save it and provide it as a download, or send the user directly to the saved PDF file.

Why not just generate a PDF?

If you have tried generating PDFs in PHP before, you may already know what I'm going to say. If not, read on.

In many situations, a PDF template is provided by an agency, and its format is strict. This is common in government, law, commercial real estate, the mortgage industry, finances, and other industries. FillPDF is an excellent option if you are in such a situation. This is because it is often difficult to get a generated PDF to look the same as is desired.

If you do want to generate a PDF from scratch, check out 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.

Looking for support? Visit the forums, or join #drupal-support in IRC.


Liam Morland’s picture

If your site does not use Clean URLs, the URL of your filled PDF will be like this:

Parkes Design’s picture

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

ryan.merritt’s picture

Looking into and reading a lot about deploying fillpdf on d7 and ran across this, pushing me towards installing tomcat5.5 when everything is fine if you are trying to get this to work on tomcat6.

epritchett’s picture

A good tool to remove all security from the PDF, so that this will work with FIll PDF and your form is . Hope that helps some people here.

valerama’s picture

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

newbie_trainee’s picture

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

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!

egrotke’s picture

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

egrotke’s picture

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!

egrotke’s picture

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

Alberto Lopez’s picture


tbrowninfinitymark’s picture

I'm trying to get this working with two sites and seem to be stuck on the URL piece.

I have a content type - Incident Report - with several fields. I've successfully created my PDF template file, uploaded and mapped it correctly, and I then created a block with <a href="/fillpdf?fid=15&nid=10">Create a PDF</a> and set the block to full HTML. When you create a new Incident Report you end up on the node for that report and see the Create a PDF link at the bottom of the node. But when you click on it the PDF is empty. I THINK my problem is in my link itself - I need a dynamic nid rather than setting it to 10 (which was simply copied and pasted from the PDF Form Information on the FillPDF settings page.

Can someone help me with either the PHP snippet I should replace this with or giving me the proper link that will read the nid from the URL of the current Incident Report?


tbrowninfinitymark’s picture

Since nobody answered before I was able to come up with my own solution I thought I'd report back what I ultimately did to handle the issue.

I created a view as a block with two fields - NID (set to not visible) and a Global custom text field with the following - <a href="/fillpdf?fid=15&nid=[nid]">Create a PDF</a>

I then added a contextual filter for NID set to Provide Default Value = Content ID from URL

I then placed the block on the pages where I wanted the PDF link to appear.

Easy Peasy Japaneezy. :)

mixael’s picture

Is it possible to use it for UTF-8 Cyrillic characters? I've tried to use Fill PDF service and have got trimmed Cyrillic characters. And no answer from their support.
It's so sad to have so horrible bug in 2013.

alibama’s picture

hey folks - working on some documentation here filldpdf + rules integration
it covers a bit of rules and the basics