Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Download content views as PDF

Project description

Description

aws.pdfbook is a product that adds a new style to a Plone 3.x portal. It creates a new skin selection to the ‘portal_skins’ tool (called PDFBook), and registers a custom stylesheet (called pdfbook.css) with the ‘portal_css’ tool.

Requirements

The following softwares should be installed:

  • Plone 3 or 4
  • recode (optional)
  • htmldoc (required)

Installation

In your buildout.cfg file:

[buildout]
...
eggs =
  ...
  aws.pdfbook
  • The site charset is utf-8
  • The server buffer for downloading has 40000 bytes.

Note

increasing the buffer size may speed up download but at the expense of a bigger memory footprint.

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

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

In Plone 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.

Other setups

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

Developers

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:

<browser:page
   name="printlayout"
   for="myproduct.interfaces.IMyContentType"
   layer="aws.pdfbook.interfaces.IAWSPDFBookLayer"
   permission="zope.Public"
   template="templates/mycontenttype.pt"
   />

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.

To do

This version is still alpha. Thus has some todos like:

  • unit tests to add
  • internationalize and translate the forms
  • cleanup old useless code from Products.PDFBook by John Doe.

Credits

http://www.materis.com/template/imgs_fr/logo.gif

Changelog

1.0.0

  • Initial release

Project details


Download files

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

Files for aws.pdfbook, version 1.0.0a1
Filename, size File type Python version Upload date Hashes
Filename, size aws.pdfbook-1.0.0a1.tar.gz (24.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page