The Produce & Publish 2.1 Documentation

Installation

«  Changelog   ::   Contents   ::   Resource directories  »

Installation

This documentation assumes that your installation of Plone/Zope is based on zc.buildout.

eggs = ...
    zopyx.smartprintng.plone
[buildout]
versions = versions
...

[versions]
BeautifulSoup = 3.2.0
...
export SMARTPRINTNG_SERVER=http://user:password@your.server:6543/

or

<environment>
    SMARTPRINTNG_SERVER=http://user:password@your.server:6543/
</environment>

Supported Plone content-types

  • Document
  • Folder (nested structure)
  • News item
  • PloneGlossary
  • Collection

Usage

The Plone connector provides a dedicated @@asPlainPDF view that can be added to the URL of any of the supported content-types of Plone (Document, Folder, Newsitem, PloneGlossary). So when your document is for example associated with the URL

http://your.server/plone/my-page

you can generate a PDF by using the URL

http://your.server/plone/my-page/@@asPlainPDF

Parameters

The @@asPlainPDF view accepts the following parameters controlling certain aspects of the PDF conversion:

  • language - can be set to ‘de’, ‘en’, ‘fr’ etc. in order to control language-specific aspects of the PDF conversion. Most important: this parameter controls the hyphenation. The Plone connector comes out-of-the-box with hypenation tables for several languages.  You can omit this URL parameter if the Language metadata parameter (of the top-level document) to be converted is set within Plone.
  • converter - if you are using the Produce & Publish server with a converter backend other than PrinceXML you can specify a different name (default is pdf-prince). See zopyx.convert2 documentation for details.
  • resource - can be set in order to specify a registered resource directory to be used for running the conversion. The `resource parameter must be identical with the name parameter of the related ZCML <smartprintng:resourceDirectory> directive.
  • template - can be used to specify the name of template to be used for running the conversion. The template parameter usually refers to a .pt filename inside the resource directory.

Miscellaneous

You may set the SMARTPRINTNG_LOCAL_CONVERSION environment variable (to some value) in order to run the conversion locally inside the Plone process without using an external Produce & Publish server.

«  Changelog   ::   Contents   ::   Resource directories  »