Installation
Installing the module
Install the module by following the instructions on Installing modules (Drupal 8).
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 pdftksnap install pdftk). When using snap, in your webserver directory, create a symlink:
sudo ln -fs /snap/pdftk/current/usr/bin/pdftk /usr/bin/pdftkTest if your webserver can run pdftk (in this case as Apache user www-data):
sudo -H -u www-data bash -c 'pdftk --version'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(Drupal 7) - Set permissions as required:
(YOUR SITE)/admin/people/permissions
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