Skip to main content
Introduction
============

collective.sendaspdf is an open source product for Plone that
allows downloading the page seen by the user as a PDF file. It also
provide a form to send the page by e-mail (a screenshot of the current
page in a PDF format being joined to the e-mail).

It relies on two products to generate the PDF files:
- xhtml2pdf: http://www.xhtml2pdf.com/
- wkhtmltopdf: http://code.google.com/p/wkhtmltopdf/

The site manager can easily chose which solution he prefers for
the generation.

Installing
==========

To install the package, you can simply add 'collective.sendaspdf'
to the eggs list in your buildout.
Then install it using Zope's quick installer or Plone's add-on
products manager.

To install xhtml2pdf, add the following to your buildout eggs
directory:
pisa
pyPdf
html5lib
reportlab

collective.sendaspdf has been tested with development versions of
pisa and html5lib. With the last releases (when writing this README
- html5lib 0.9 and pisa 3.0.33) some pages could not be rendered.

To install wkhtmltopdf, go to the projects page and download an
executable version for your OS. Install it so the command
'wkhtmltopdf' is in the PATH.
You can also update your buildout to automatically download
wkhtmltopdf and have if use by your instance using the following
recipes:

[buildout]
parts =
...
wkhtmltopdf
wkhtmltopdf_executable

[instance]
...
environment-vars =
...
WKHTMLTOPDF_PATH ${wkhtmltopdf:location}/wkhtmltopdf

[wkhtmltopdf]
recipe = hexagonit.recipe.download
url = http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-amd64.tar.bz2

[wkhtmltopdf_executable]
recipe = collective.recipe.cmd
on_install = true
on_update = true
cmds =
cd ${buildout:directory}/parts/wkhtmltopdf
mv wkhtmltopdf-amd64 wkhtmltopdf
chmod +x wkhtmltopdf

You might have some changes to do depending on the architecture you
are using (this example is for the amd64 architecture)

Configuring
===========

Go to the Plone control panel. You will find a 'Send as PDF' link that
sends you to the products configuration page.

This page proposes a few settings:
- the tool used to render the PDF files.
- the directory where the PDF files are stored.
- the sentence used as salt when hashing the user's emails
(this hash is used to know which files a user can access)
- the name used in the mail for the PDF file.
- a default title/body for the mails.

For wkhtmltopdf user, two extra options are available:
- always use the print CSS to render the PDF.
- use the print CSS for a given set of objects.

xhtml2pdf always use the print CSS.

TODO
====

- a buildout recipe to install wkhtmltopdf
- an Ajax version of the send by mail form

Changelog
=========

1.0.1 (2010-08-02)
------------------

- translated the "download as PDF" action. [mark]

- registered the translations so they are applied. [mark]


1.0 (2010-07-21)
----------------

- added Dutch and French translations [vincent+mark]

- added view to send by mail and download the page. [vincent]

- added document actions to send the page by mail and download as
pdf. [vincent]

- Added sendaspdf tool to manage preferences. [vincent]

Release files for collective.sendaspdf 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for collective.sendaspdf 1.0.1
File Size Uploaded
collective.sendaspdf-1.0.1.zip 24.4 kB Details

Release files / collective.sendaspdf-1.0.1.zip

Download URL collective.sendaspdf-1.0.1.zip
Size 24.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f65196f94d24701cbadeeade70a624a02c26b4042c2dd8a581fec74d3b03a809
BLAKE2b-256 checksum
How to use checksums
29f6f38915bbc2dae18f2e697e244c7bd55efeb3b4fa3b156780859c7d8e5880
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

3.0

1 release file

2.10

1 release file

2.9

1 release file

2.8

1 release file

2.7.2

1 release file

2.7.1

1 release file

2.7

1 release file

2.6

1 release file

2.5

1 release file

2.4.2

1 release file

2.4.1

1 release file

2.4

1 release file

2.3.1

1 release file

2.3

1 release file

2.2

1 release file

2.1.1

1 release file

2.1

1 release file

2.0.1

1 release file

2.0

1 release file

1.1

1 release file

1.0.3

1 release file

1.0.2

1 release file

This release

1.0.1 This release

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page