Save up to 50% off during Black Friday!

Customizing the PDF Export Template

With Entry Automation, we provide a couple ways to use custom template files for your PDF exports.

Autoloading via Theme Files

As of Entry Automation 3.2.3 it is easier than ever to override the default PDF template files, see our documentation on autoloading and overriding Default PDF template files for more details.

Template Path Filters

There are three filters available for modifying the PDF template programmatically:

  1. fg_entryautomation_pdf_template_header
    This filter modifies the path to the PDF template header. Within this template file, you should place your opening <html> tag, stylesheet references, etc.
  2. fg_entryautomation_pdf_template_entry
    This filter modifies the path to the PDF template entry. Within this template file, you add the contents of each entry using a `foreach` loop.
  3. fg_entryautomation_pdf_template_footer
    This filter modifies the path to the PDF template footer. Within this template file, you should place your closing </body> and </html> tags.

You can find the original template files in the includes/templates folder within the Entry Automation plugin files.

Available Variables

Within each template file, you have access to several global variables:

  • $entries array
    The array of all the entries being exported.
  • $task Task
    The current Entry Automation Task object.
  • $form array
    The current Automation task’s form.