SVG, PNG, PDF converters using external tools as ImageMagick
Project description
Introduction
This package provides utilities to convert images and PDF files using ImageMagick. Also, toghether with collective.sendaspdf and pdftk users can download HTML pages as PDFs with custom cover support
Installation
Add eea.converter to your eggs section in your buildout and re-run buildout. You can download a sample buildout from https://github.com/collective/eea.converter/tree/master/buildouts/plone4
Getting started
Customize output PDF
Cover
Provide custom browser:page called @@pdf.cover:
<browser:page for="my.package.interfaces.ICustomContent" name="pdf.cover" class=".app.pdfview.Cover" template="zpt/pdf.cover.pt" permission="zope2.View" />
Body
Provide custom browser:page called @@pdf.body:
<browser:page for="my.package.interfaces.ICustomContent" name="pdf.body" class=".app.pdfview.Body" template="zpt/pdf.body.pt" permission="zope2.View" />
Options
For PDF cover you’ll have to provide a named adapter like:
<adapter name="pdf.cover" for=" my.package.interfaces.ICustomContent" provides="collective.sendaspdf.interfaces.ISendAsPDFOptionsMaker" factory=".adapters.CoverOptionsMaker" />
For PDF body you’ll have to provide an unamed adapter like:
<adapter for=" my.package.interfaces.ICustomContent" provides="collective.sendaspdf.interfaces.ISendAsPDFOptionsMaker" factory=".adapters.OptionsMaker" />
Also add custom print.css for your needs. See more at collective.sendaspdf
Dependencies
pdfinfo to parse pdf metadata (part of the xpdf package):
yum install xpdf (fedora) apt-get install xpdf (debian)
pdftk to generate a cover image from a pdf file:
yum install pdftk (fedora) apt-get install pdftk (debian)
ImageMagick (6.3.7+):
yum install ImageMagick apt-get install imagemagick
Source code
- Latest source code (Zope 2 compatible):
Documentation
See the doc directory in this package.
API Doc
Copyright and license
The Initial Owner of the Original Code is European Environment Agency (EEA). All Rights Reserved.
The EEA Exhibit (the Original Code) is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
More details under docs/License.txt
Funding
EEA - European Environment Agency (EU)
Changelog
6.3 - (2013-10-04)
Bug fix: Fixed PDF cover asking for credentials for non-published documents [voineali refs #14904]
Feature: Added custom PDF html-header and html-footer in order to easily customize them (just override @@pdf.header and @@pdf.footer for your contexts) [voineali refs #16802]
6.2 - (2013-09-23)
Feature: Export HTML to PDF with custom cover (requires collective.sendaspdf) [voineali refs #14904]
6.1 - (2013-02-25)
Feature: added information for contributors [ciobabog refs #13892]
Add Windows support for close_fds parameter of Popen [erral #1]
6.0 - (2012-10-08)
Fixed dependencies, cleanup and make the package run on a clean Zope [ghicaale #5426]
1.1 - (2012-06-12)
Added watermark utility [szabozo0]
1.0 - (2012-03-05)
Initial release [voineali]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.