This package allows your users to download Plone content as PDF files. As admin you can define specific PDF themes per content-type.


Requires wkhtmltopdf system-package installed on your server. See eea.converter documentation for more details.

Main features

  1. Adds download as PDF action at the bottom of the page
  2. Possibility to define custom PDF themes per content-type
  3. Asynchronously generate PDF files and notify users by email when PDF is ready
  4. Possibility to temporarily disable dynamic PDF creation by adding an item called ‘action-download-pdf’ within context


eggs =

zcml =

External PDF generator tools

Ensure that you have installed wkhtmltopdf on your machine. You can also install wkhtmltopdf from buildout:


parts +=

recipe =
url =

environment-vars +=
    WKHTMLTOPDF_PATH ${wkhtmltopdf:location}/wkhtmltopdf

Asynchronous setup

By default all PDFs are generated asynchronous, therefore some extra config is needed within your buildout in order for this to work properly.

First of all you’ll need a folder were to store generated PDF files. For this you can create it manually within buildout:directory/var/ or you can let buildout handle it:


parts +=

media-downloads-path = ${buildout:directory}/var/downloads/pdf
media-downloads-temp = ${buildout:directory}/var/downloads/tmp

recipe = ore.recipe.fs:mkdir
path = ${buildout:media-downloads-path}
mode = 0700
createpath = true

recipe = ore.recipe.fs:mkdir
path = ${buildout:media-downloads-temp}
mode = 0700
createpath = true

This will create a folder named downloads within buildout:directory/var/

Next, in order for this folder to be visible from your website and your users to be able to download generated PDFs you’ll need to tell to your zope instances about it:


media-downloads-name = downloads
media-downloads-path = ${buildout:directory}/var/downloads/pdf
media-downloads-temp = ${buildout:directory}/var/downloads/tmp


environment-vars +=
    EEADOWNLOADS_NAME ${buildout:media-downloads-name}
    EEADOWNLOADS_PATH ${buildout:media-downloads-path}
    EEACONVERTER_TEMP ${buildout:media-downloads-temp}

Also, don’t forget to setup


eggs +=
zcml +=

Getting started

  1. Go to Site Setup > PDF Settings
  2. Customize an existing PDF theme or add a new one
  3. Go to Home page and click on download as pdf icon at the bottom of the page or directly access http://localhost:8080/Plone/front-page/download.pdf

PDF Theme options

For more information about wkhtmltopdf options like Table of contents XSL file, header and footer parameters, etc. see wkhtmltopdf documentation.


A page template to be used for PDF Cover. Leave empty to disable it. Default: pdf.cover


A page template containing copyright and author information. This page will be placed between cover and PDF body. Leave empty to skip it. Default: pdf.disclaimer


A page template to be used for PDF body. An empty value will skip PDF body. Default: pdf.body

Back Cover

A page template to be used for back cover. Leave empty to disable back cover. Default: pdf.cover.back

Table of contents

An XSL page template to be used for PDF Table of contents. See wkhtmltopdf documentation for more information about XSL format. Leave empty to disable Table of contents. Default: pdf.toc


Enable or disable javascript. Default: True

JavaScript Delay

Wait some seconds for javascript to finish Default: 0


Abort PDF conversion after this number of seconds Default: 3600


Generate PDF asynchronously and send an email to the user when it’s done Default: True


Start counting pages within PDF Body from this number. Usefull when cover and/or disclaimer are enabled. Default: 0

Maximum depth

This option defines the maximum depth a folderish item can go while recursively includes it’s children within PDF. Default: 1 (include only direct children, non-folderish ones)

Maximum breadth

This options limit the number of direct children a folderish item can include within PDF. Default: 100

Maximum items

The total items to be included within PDF export for a folderish item, including depth and breadth. Default: 1000

Portal types

Apply this theme to selected portal types. Default:

Custom permissions

Custom permissions added by this package

Can download PDF (

Assign this permission to roles that you want to be able to download content as PDF Default: Owner, Manager, Editor

Can customize PDF (eea.pdf.customize)

Assign this permission to roles that you want to be able to contextually customize the output PDF look and feel Default: Manager, Site Administrator

Content rules

This package uses Plone Content-rules to notify users by email when an asynchronous PDF job is done. Thus 3 custom content-rules will be added within Plone > Site Setup > Content-rules


As these content-rules are triggered by an asynchronous job, while you customize the email template for these content-rules, please DO NOT USE OTHER string substitutions that the ones that start with $download_ as you’ll break the download chain. Also if you disable these content-rules the users will never know when the PDF is ready and what is the link where they can download the output PDF.

Export succeeded

Notify the person who requested a PDF export that the PDF successfully exported and provide a link to the downloadable PDF

Export failed

Notify the person who requested a PDF export that the PDF export failed.

Export failed (admin)

Notify admin that there were issues while exporting PDF

Content rules email string substitution

In order to be able to easily customize emails sent by this package the following custom email template string substitutions can be made


The absolute URL of the Plone object which is downloaded as PDF


Email address of the user that triggered the download as PDF action


Error traceback when download as PDF job fails


Site Admin email address customizable via Plone > Site Setup > Mail


Site Admin name customizable via Plone > Site Setup > Mail


Title of the Plone object which is downloaded as PDF


The absolute URL where the generated output PDF can be downloaded


Download type. Default to PDF for this package. It is package specific and it can be PDF, EPUB, etc.

Disable PDF export

You have the possibility to temporarily disable dynamic PDF export contextually by adding a static PDF file (or a Python Script, Page Template, etc) within context called action-download-pdf. This way /download.pdf will return this file instead of generating one based on context data.


This works only with folderish items.


PDFs are generated asynchronously using a parallel zc.async queue.quota. The number of workers that will generate PDFs in parallel is automatically calculated based on the number of zeo-clients registered with*_db_worker.

As every db_worker can handle simultaneously maximum 3 jobs (hard-coded in zc.async Agent), if you have 2 workers then the maximum number of PDFs that will be generated at the same time will be 6 (2 workers * 3). Same if you have 5, you’ll get 15 PDFs generated at the same time.

If for any reason you don’t want them to be generated simultaneously you can set environment variable EEAPDF_ASYNC_THREADS to 1 within buildout:





environment-vars +=

Also, if you experience issues by having too many simultaneously PDF jobs, you can limit them in the same way as above.

Source code


EEA - European Environment Agency (EU)