Skip to main content

Download Plone content views as PDF

Project description


aws.pdfbook is a component for Plone 3 or Plone 4 that enables to download content rendered to PDF. It provides support for default content types. Third party content type authors and integrators may add support to their personal content types through dedicated Zope 3 named views.

When downloading a Folder or a Topic/Collection, all subcontents is included in the PDF document but not recursively.


The following softwares should be installed:

  • Tested with Plone 3.x, Plone 4.0, Plone 4.1.

  • htmldoc (required)

  • recode (optional)


Instance wide

In your buildout.cfg file:

eggs =

We assume that:

  • The site charset is utf-8

  • The server buffer for downloading has 40000 bytes.

Otherwise you can change these default values in your zope.conf or in buildout.cfg like this:

recipe = plone.recipe.zope2instance
zope-conf-additional =
  <product-config aws.pdfbook>
  # Your site charset (default: utf-8)
  site-charset utf-8
  # The download buffer bytes size (default: 40000)
  download-buffer-size 40000

Plone site

In your Plone site go to the ‘Site Setup’ page and click on the ‘Add/Remove Products’ link.

Choose aws.pdfbok (check its checkbox) and click the ‘Install’ button.

The go as soon as possible to the PDF Book configuration panel and configure according to your system settings and your layout preferences.

More particularly, you may change default pdfbook options. See the pdfbook documentation for the various available options.

If you want to use logo in headers, you just have to setup the path to get the logo on Logo path field. Don’t set –logo option in htmldoc options, this is done by the system. But you may use –webpage option.

Other setups

It is strongly recommanded to use linking with UID in your visual editor preferences. Otherwise images may not display in topics prints.


Customizing default templates in ZMI

Open your Plone site in ZMI, then the portal_view_customization object.

Click on a link printlayout that suits the interface of the content items you want to customize.

Change the template as you prefer…

Add a template for your content types

Assuming you have a personal content type that implements the myproduct.interfaces.IMyContentType interface, You must add a view like this one:


Keep the following attributes as above:

  • name="printlayout"

  • layer="aws.pdfbook.interfaces.IAWSPDFBookLayer"

  • permission="zope.Public"

Examples for standard content types are provided in the browser/transformers.zcml configuration and associated files.

Otherwise aws.pdfbook provides a default template that may or may not fit with paper layout.

If the default layout for personal or third party content types is somehow awful, you may blacklist such content types in the configuration panel.


The github repository for this component is .

The development kit comes with a buildout.cfg for the latest Plone stable version.

Please don’t forget to file your changes in the docs/HISTORY.txt file.


Please use the tracker at



1.1 (2014-02-26)

  • Keep &, < and > characters in pdf. [vincentfretin]

  • Replace unicode mdash by simple ascii dash. The mdash character was replaced by ‘?’ in pdf before. [vincentfretin]

  • Added a ‘logo’ property to allow us to use htmldoc logo options in headers. [thomasdesvenain]

  • Brazilian translations. [lepri]

1.0.3 (2013-08-27)

  • Fixed release.

1.0.2 (2013-08-27)

  • Fixed getting image scales. [thomasdesvenain]

  • Plone 4.3 compatibility. [thomasdesvenain]

1.0.1 (2011-12-22)

  • Export FSImage in pdf. [vincentfretin]

  • Fixed recoding of windows apostroph and ‘…’ character. [vincentfretin]

  • Synced with latest template from Products.CMFPlone so the messages are translated properly. [vincentfretin]

  • Avoid site error at conversion when img tag has no src attribute… [thomasdesvenain]

1.0.0 (2011-09-22)

  • Image is not exported if user has not the right to View it. [thomasdesvenain]

  • Image export works with images referenced with a size. Image is printed with the good size. [thomasdesvenain]

  • Disable export link in portal factory. [thomasdesvenain]

  • Avoid failures on viewlet kss updates. [thomasdesvenain]

  • Image export works with image custom types and blob images. So image export now works under Plone 4. [thomasdesvenain]

  • Plone 4.1 compatibility. [thomasdesvenain]


  • i18nisation and added french translation [glenfant]

  • Unit tests [glenfant]

  • Cleaned up useless code from Products.PDFBook [glenfant]


  • Initial release [glenfant]

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution (49.2 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page