=================
Plone2Pdf Product
=================

This product is a simple Plone product that creates a little pdf
action icon to transform Plone Documents and ZWiki's pages into pdf
format. It is very simple and mostly composed of pieces of scripts
found on the net ... gathered together in a Plone product. It uses
pisa a python library for html to pdf conversion.

Dependencies
============
* PortalTransforms Product 1.0.4+
  
* pisa 3.0.18+ (download at http://www.htmltopdf.org)

   * Reportlab Toolkit 2.1+ (http://www.reportlab.org/)

   * html5lib (http://code.google.com/p/html5lib/)

     * chardet (http://chardet.feedparser.org/)

   * pyPDF (optional; http://pybrary.net/pyPdf/)

* BeautifulSoup 3.0.1+


Product page / download
=======================

http://plone.org/products/plone2pdf

Plone2Pdf config
================

Two configuration options are available for Plone2Pdf.
You can access/change them in portal_properties/plone2pdf_properties

* http_proxy: default '' (i.e. not enabled)
  Use proxy to retrieve external images or css
  example value: 'http://www.example.com:3128/'
* use_pdf_layout_form: default False
  After the pdf button is clicked, present a form showing different PDF
  layouting options. Another benefit of this is that the request to the pdf
  transformation is made using a POST (hence no web crawler should index it) 
  example value: True

Pisa config
===========

Pisa is configurable by means of a style sheet (see. documentation of
pisa). For this create a dump of the default style sheet of pisa by
following command

    bash> pisa --css-dump > pisa.css
 
or 

    c:\>  pisa --css-dump > pisa.css

Upload "pisa.css" as a file object to the custom folder of
portal_skins and make your changes.  

Add "pisa.css" to the CSS Registry (portal_css) via "Add a new
stylesheet" and set the attributes to following values:

ID: pisa.css
Merging allowed: yes
Caching allowed: yes
CSS Media: pdf
rel: stylesheet
Render type: import
Compression type: safe

IMPORTANT: CSS Media of all kupu styles in the CSS Registry is not set
and unfortunately breaks pisa. A workaround is to change CSS Media of
all kupu style sheets to "screen" (e.g. kupustyles.css, kupuplone.css,
kupudrawerstyles.css).

In config.py, you can choose between DEBUG=1 or DEBUG=0. The first one
will give more explicit logs if you have any problems using
Plone2Pdf. By default, it is set to 0.


Author
======

Sopinspace dev team
contact :  huron at sopinspace dot com
copyright by Sopinspace

Licence
=======

This product is licensed under the GNU General Public Licence Version 3 or later.
http://www.gnu.org/licenses/gpl.txt

Credits
=======

* Maik Jablonski for his toPdf howto on zope.org

* to the creators of pisa (http://www.htmltopdf.org)

* Alexandre Sauvé for his testing & patches

* Jean Rodrigo Ferri for the Brazilian Portuguese translation

* Dominik Ruf for his patch

* Pedro Arreitunandia for the spanish and basque translations

* Andreas Gabriel for the initial pisa port (away from htmldoc)

* HTML manipulation code (manipulation.py) taken from SmartPrintNG
  (ZOPYX Ltd. & Co. KG, Andreas Jung)
