Installation
This is documentation for Drupal 7, which is no longer supported. Learn more and find resources for Drupal 7 sites
Installing the module
Install the module by following the instructions on Installing modules (Drupal 7).
Configuring the module
File system
FillPDF can save the forms you upload in either public or private file storage. Ensure you have private storage configured if you choose this. Only administrators (people with the administer pdfs permission) will be able to examine/download the uploaded forms.
The default storage method of PDFs you fill in using private templates will also be private, and viewing/downloading them will require the same permissions as filling them in in the first place.
PDF-filling service
This module requires the installation of one of several external PDF manipulation tools. These are the options; click them to jump down to the instructions.
- FillPDF Service (shutting down on August 31, 2022) — Best for shared hosting and supports image stamping.
- Local PDFtk — Best for easy server installation if image stamping not required
- FillPDF LocalServer — Supports image stamping; is installed as a Docker container
FillPDF Service (shutting down on August 31, 2022)
- Sign up for FillPDF Service. You will be assigned an API key.
- Put your API key into the FillPDF configuration page:
(YOUR SITE)/admin/config/media/fillpdf
Local PDFtk
PDFtk is a command-line tool for PDF manipulation. It is installable on most servers via their package managers (e.g. yum install pdftk or apt-get install pdftk.). You may also be able to find tutorials on the Internet to enable you to install this on shared hosting; additional steps may be required in that case. Once you have installed PDFtk, make sure it is in the PATH of the user under which your web server runs PHP (usually nobody or www-data, but it may be different if you use suExec).
PDFtk before version 1.44 may not work.
We have currently tested FillPDF to work with PDFtk 1.44+. We recommend using the latest version, which at the time of writing was PDFtk 1.45.
If you have installed via your system's package manager and have an older version, it is strongly recommended to build the latest version of PDFtk from source code if going with this option. Don't worry; it's not too hard!
There is also a setting that allows you to specify the full path to pdftk.
FillPDF LocalServer
If you can run Docker, then you can install FillPDF LocalServer.
- Run the Docker image on your server. You can read how to install FillPDF LocalServer on its project page. We recommend setting the restart policy to
always. - Go to
(YOUR SITE)/admin/config/media/fillpdfand select the Use FillPDF LocalServer option. Fill out the URL of the Docker container where asked. If your site is not running in Docker, you followed the installation instructions, and Docker is on the same server as the site, this will behttp://127.0.0.1:8085. Otherwise, it will be the IP/hostname and exposed port that you set up. The hostname/IP should not matter; the servlet listens on0.0.0.0.
Post-installation
Once you have installed the PDF manipulation tool of your choice:
- Visit the FillPDF configuration page to tell FillPDF which PDF manipulation tool to use:
(YOUR SITE)/admin/config/media/fillpdf - Set permissions as required:
(YOUR SITE)/admin/people/permissions
Enable optional modules for additional functionality
- Entity API + Entity Tokens submodule (RECOMMENDED): Allows filling PDFs with data from entities supported by the Entity Tokens module. Some examples: EntityForms, users, taxonomy terms, Commerce 1.x entities.
- Webform: Allows filling PDFs with data from Webform submissions. If you are still using Webform 3, you will also need the correct version of Webform Tokens (see project page).
- Ubercart Order module: Allows using data from orders and ordered products, such as product attributes, to populate FillPDF forms.
- FillPDF Tokens: Provides additional Order Product tokens, particularly an easier way to deal with product attributes. Will probably be included into Ubercart eventually. Read the description on your Modules page to see if you need this module or not. Many Order Product tokens come out of the box.
- FillPDF Ubercart Starter module (requires Features): Adds a FillPDF Form ID field to Ubercart's Product content type, and provides a Rule that e-mails customers links to download filled versions of any Products where this field is configured. You can edit the Rule in Rules as usual or just use this as a baseline for your own implementation. Read more here.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion