PDF Forms Filler for Contact Form 7

Description

This plugin gives WordPress Admin Panel users the ability to add fillable PDF attachments to email messages and form submission responses of Contact Form 7.

If the PDF attachment has a PDF form, the plugin allows users to add fields to the CF7 form and/or link them to fields in the PDF. The plugin also allows the attached PDF files to be embedded with images supplied by the CF7 form fields. The filled PDF files can be saved on the web server.

When your website visitor submits the CF7 form, the form in the PDF file is filled with CF7 form information, images are embedded and the resulting PDF file is attached to the CF7 email message.

An external web API (https://pdf.ninja) is used for filling PDF forms (free usage has limitations). An Enterprise Extension, which enables performing all PDF operations locally on your web server (no external web API), is available.

Known problems,
* Some UTF-8 (non-latin) characters, checkboxes and radio buttons don’t render properly after being filled. Almost always the problem lies with the PDF viewers not rendering them correctly. There is a workaround in the works, however, currently it remains in development.
* Some third party plugins break the functionality of this plugin (see a list below). Try troubleshooting the problem by disabling likely plugins that may cause issues, such as plugins that modify WordPress or Contact Form 7 in radical ways.
* Some image optimization plugins optimize PDFs and strip PDF forms from PDF files. This may cause your existing forms to break at a random point in the future (when PDF file cache times out at the API).
* Multi-select checkbox fields are not currently supported. Support is planned in the future.

Known incompatible plugins,
* ShortPixel Image Optimizer (strips forms from PDF files)
* Contact Form 7 Live Preview
* Open external links in a new window
* Contact Form 7 Multi-step Pro (partial compatibility)
* WordPress Multilingual Plugin
* Contact Form 7 Skins

Special thanks to the following sponsors of this plugin,
* BrowserStack
* Momentum3
* G-FITTINGS GmbH

Screenshots

  • PDF Form button is available to access PDF attachments interface
  • Form-tag Generator interface that allows users to upload and attach PDF files and generate tags
  • Email message in Thunderbird with the attached PDF file

Installation

  1. Install the Contact Form 7 plugin.
  2. Upload this plugin’s folder to the /wp-content/plugins/ directory, or install the plugin through the WordPress plugins screen directly.
  3. Activate the plugin through the ‘Plugins’ screen in WordPress
  4. Start using the ‘PDF Form’ button in the CF7 form editor

FAQ

Does this plugin allow my website users to work with PDF files?

No. This plugin adds features to the Contact Form 7 interface in the WordPress Admin Panel only.

Does this plugin require special software installation on the web server?

No. The plugin uses core WordPress features only. No special software or PHP extensions are needed. Working with PDF files is done through Pdf.Ninja API. It is recommended to have a working SSL/TLS certificate verification with cURL.

How are the CF7 form fields mapped to the PDF form fields?

There are two ways to map fields with this plugin. The field mapper tool allows you to map fields individually and, when needed, generate new CF7 fields on the fly. The tag generator tool maps to the fields in the PDF form using the random looking code in the CF7 field name that it generates.  Here is the format: pdf-field-{attachment-id}-{human-readable-field-name}-{random-looking-code}. The ‘{attachment-id}’ can be ‘all’ to allow it to map to all PDFs attached to the CF7 form (in case you ever want to swap out the PDF file without needing to fix the generated tags).  If you remove the random looking code, the field will no longer be mapped to the field in the PDF.

My fields are not getting filled, what is wrong?

If you reuploaded the PDF file and your mapping was using the old file ID then your mapping will no longer work and you will need to recreate it.

If you are using the field mapper tool, make sure the mapping exists in the list of mappings and the field names match. If you are using the tag generator tool, make sure the attachment ID matches (or is ‘all’) and the base64-encoded part of the tag name is unchanged.

If you renamed the PDF field, you will need to remove the old mapping and recreate the mapping with the new name.

My checkboxes and/or radio buttons are not getting filled, what is wrong?

Make sure your PDF checkbox/radio field’s exported value matches the value of the CF7 form’s checkbox tag. Usually, it is “On” or “Yes”. If you need to display a different value in the CF7 form, use pipes.

Some PDF viewers don’t render checkboxes correctly in some PDF files due to incompatible PDF formatting. You may be able to solve this issue by recreating the PDF in a different PDF editor.

How do I remove the watermark in the filled PDF files?

Please see the Pdf.Ninja API website and the Enterprise Extension plugin.

How do I set up PDF form filling on my local web server?

Please see the Enterprise Extension plugin.

Reviews

10 June 2020
This plugin made the project I thought would take days instead take only minutes to complete. Wow. that you for this.
1 May 2020
This plugin is ideal for automatically filling pdfs based on data entered by users. It is a good complement for CF7. You can even add a handwritten signature to your pdf form thanks to its compatibility with the "Contact Form 7 Signature Addon" plugin. So yes you will probably need the PRO version to remove the watermark but it is a good investment. And then the FREE version allows you to test all the features of this plugin. I just have a suggestion for a better compatibility with the "CF7 Conditional Fields PRO" plugin by Jules Colle. For this I will open a support topic.
4 April 2020
If you need to use contact form 7 with PDF this is the best plugin out there. After numerous tries with all kinds of free and premium plugins, this is the far the best of them. The integration is perfect with API and contact form 7. Thanks for the plugin!
25 March 2020
After extensive comparison I ended up selecting this plugin (PRO version without watermark at 49 USD/year) in order to get a PDF file from a Contact Form 7 form. The good points of this plugin are: - you are allowed to make all the testing you want before deciding if buying the PRO version without watermark (the free version is for unlimited testing only) - the linking between Contact Form 7's fields and the fields in the PDF is easy - you can upload different PDF files and have them filled at once (one field's data can go to several places in the same PDF or, should be, in different PDFs) - I could create the PDF file and its fillable fields from the free LibreOffice Writer (it's similar to Microsoft Word) - You can decide if the created PDF is still fillable or not ("flattened") - I can add that you can have only certain fields still fillable if you make some of them "read only" while creating the PDF (in LibreOffice Writer) and set the whole PDF created by this plugin "not flattened") Some important missing features are: - It is not possible to "trigger" a specific PDF file based on a specific answer in the form (the only option is not to have a PDF at all if all the fields are empty) - that would be a very important feature in order to get only the PDFs you actually need based on your selection - While a Contact Form 7 field data can go to different places in a PDF, the opposite is not possible (it means that a PDF field can receive a data only from one specific Contact Form 7 field) - multiple selections do not work - you have to create several "multiple" selection (one on top of the other) where you really have only one selection for each one
8 December 2019
Nothings worse than finding a great plugin, having a small issue and not getting any support. The support for this plugin was great with a response the next day. I had a minor issue which they helped me resolve quickly, and followed up after I had a second question just as quickly. Plugin and support both are great and was hard to find a plugin that does something similar, glad I got this working. 🙂
Read all 11 reviews

Contributors & Developers

“PDF Forms Filler for Contact Form 7” is open source software. The following people have contributed to this plugin.

Contributors

Change log

1.3.2

  • Release date: September 4, 2020

  • Bug fix: Skip when empty feature no longer works

1.3.1

  • Release date: August 20, 2020

  • Fixed image embed MIME type checking issue that occurs when PHP fileinfo functions are not working

1.3.0

  • Release date: August 8, 2020

  • WARNING: this update introduces some changes in plugin operation, these changes should not break anything for existing users, however, testing after an update is encouraged

  • Added mail-tags feature
  • Improved general error handling during PDF filling
  • WARNING: should any errors occur with the PDF filling process, they will now be displayed to users when they submit forms on the front-end (instead of being attached along with user input in a .txt file)
  • Added file MIME type validation for image embeds
  • WARNING: image embedding is now limited to the following MIME types: image/jpeg, image/png, image/gif, image/tiff, image/bmp, image/x-ms-bmp, image/svg+xml
  • Switched to using mail-tags replacement function wpcf7_mail_replace_tags() for filling CF7 fields input (to improve third party plugin support)
  • Hidden tag generator tool by default
  • Other minor bug fixes and improvements

1.2.4

  • Release date: May 15, 2020

  • Bug fixes

  • Code optimizations and improvements
  • Added CF7 form duplication support

1.2.3

  • Release date: March 4, 2020

  • Fixed an issue that causes the removal of attachments from other posts when attaching them to CF7 forms

  • Fixed a bug that caused HTML code to show up in response messages for filled PDF download links in some cases
  • Fixed a bug with filled PDF saving/downloading when handling errors
  • Refactored file save/download handling code

1.2.2

  • Release date: January 8, 2020

  • Bug fixes

  • Readme updates

1.2.1

  • Release date: October 27, 2019

  • Fixed an issue with ajax form submission not always receiving HTML download response message

  • Fixed an issue which caused the plugin to deactivate when updating from pre-1.2 versions to 1.2.0 and later versions due to main plugin php file rename

1.2.0

  • Release date: September 27, 2019

  • Added a number of optimizations, bug fixes and improvements

  • Updated the lists of conflicting plugins and sponsors
  • Added an option for saving the filled PDF on the server
  • Added an option for allowing users to download the filled PDFs
  • Added integration with WP media library
  • Added code to add pipe to CF7 tags to prevent user confusion with singular options
  • Fixed CF7 tag generation code’s field value escape issue
  • Renamed text domain and plugin filename/slug to the published plugin slug (plugin needs to be reactivated after update due to a change in plugin filename)

1.0.2

  • Release date: February 12, 2019

  • Added filename option with mail-tags feature

  • Minor fixes and improvements

1.0.1

  • Release date: January 15, 2019

  • Bug fixes and improvements

1.0.0

  • Release date: April 6, 2018

  • Major plugin refactoring

  • Added image embedding tool
  • Added help boxes
  • A large number of bug fixes, optimizations and UX improvements
  • Added Enterprise Extension support checking

0.4.2

  • Release date: February 17, 2018

  • Crash fix

0.4.1

  • Release date: February 13, 2018

  • Added bulk tag insertion feature to field mapper tool, special thanks to Momentum3 (http://momentum3.biz/) for sponsoring this feature

  • Bug fixes and improvements

0.4.0

  • Release date: February 5, 2018

  • Added flatten option

  • Fixed a possible timeout issue with large PDF files
  • Other minor fixes

0.3.3

  • Release date: December 19, 2017

  • Added a feature that allows changing Pdf.Ninja web API URL

  • Added a feature that allows disabling Pdf.Ninja web API TLS certificate verification
  • Bug fixes

0.3.2

  • Release date: December 2, 2017

  • Bug fixes

0.3.1

  • Release date: November 26, 2017

  • Bug fix

0.3.0

  • Release date: November 24, 2017

  • Added field mapper tool

  • Added wildcard field mapping
  • Many bug fixes and improvements

0.2.4

  • Release date: November 15, 2017

  • Added attachments to secondary CF7 email message

  • Added options that allow user to control which email message filled PDFs get attached to
  • Updated minimum WP version requirement
  • Minor refactoring and other improvements

0.2.3

  • Release date: November 13, 2017

  • Added ‘skip when empty’ option

  • Added support for PHP 5.2 and 5.3
  • Added plugin action links
  • Other minor fixes

0.2.2

  • Release date: October 20, 2017

  • Fixed a small issue

0.2.1

  • Release date: October 9, 2017

  • Added a help message to tag generator window

0.2.0

  • Release date: September 12, 2017

  • Added support for PDF field flags

  • Improved tag generation

0.1.7

  • Release date: August 17, 2017

  • Minor refactoring and fixes

0.1.6

  • Release date: August 7, 2017

  • Improved tag generation code

0.1.5

  • Release date: June 13, 2017

  • Bug fixes

0.1.4

  • Release date: June 12, 2017

  • Bug fixes

0.1.3

  • Release date: May 18, 2017

  • Bug fixes and other minor improvements

0.1.2

  • Release date: April 13, 2017

  • Added i18n support

  • Minor UX improvement

0.1.1

  • Release date: March 28, 2017

  • Removed unnecessary files to save disk space