To PDF Add-On
This addons converts TWiki topics into PDF`s. Comparing to GenPDF or others, its main goal yet is to support CSS as far as possible and therefore the PDF should just loook like the original topic
This Add On is based on GenPDF and finally, it should have the same great functionality as GenPDF. The reason its seperated is, because it will take some time to finish ToPDF to be that "user friendly" for every TWiki user, as GenPDF is. So ToPDF will exist as a alternative converter until the full functionallity of GenPDF is ported/combined.
Usage
- the whole script is based on TWiki:Plugins/GenPDFAddOn
- as backend it uses html2pdf, a php5 script to convert html files into PDFs. It supports CSS 2.0 and even float content.
Add-On Installation Instructions
Note: You do not need to install anything on the browser to use this add-on. The following instructions are for the administrator who installs the add-on on the server where TWiki is running.
Dependecies( Tested with linux, should work under windows too)
Linux
- PHP5 as client modes, so for the use in the command line
- Ghostscript-GPL ( worked with 8.61, please add other versions here, if you tested it )
- pdflib ( worked with 7.0.2, please add other versions here, if you have tested it )
optional
- gnu-gs-fonts-std: Ghostscript Standard Fonts
- gnu-gs-fonts-other: Ghostscript Extra Fonts
Windows
Installation instructions
- Download the ZIP file from the Add-on Home (see below)
- Install all dependecies
- Unzip
ToPDFAddOn.zip in your twiki installation directory. Content: | File: | Description: |
data/TWiki/ToPDFAddOn.txt | Add-on topic |
data/TWiki/ToPDFAddOn.txt,v | Add-on topic repository |
pub/TWiki/ToPDFAddOn/html2pdf | html2pdf conversion Script including .htaccess which permits any browser-use |
bin/topdf | Add-on script |
- Configuration
- pub/ToPDFAddOn/html2pdf/configure.inc.php
- BASEURL: Set your url, you use with TWiki. This is used for CSS files and stuff
- TYPE1_FONTS_REPOSITORY: your absolute path to the ghostscript fonts ( e.g /usr/share/fonts/default/ghostscript/ )
- DEFAULT_ENCODING: set this to your twik encoding
- GS_PATH: your ghostscript path ( usually /usr/bin/gs )
- pub/ToPDFAddOn/header.inc.php
- Set your header and footer if needed
-
- Add the PDF button to your viewtopicactions.skin.tmpl ( or somewhere else )
- Test if the installation was successful:
- open view/TWiki/ToPDFAddOn and click this link and hopefully you get a PDF of the ToPDFAddOn topic.
Add-On Info
- Set SHORTDESCRIPTION = Converts topics ( TML ) into PDF
Related Topic: TWikiAddOns
--
TWiki:Main/MayerEugen
- 01 Jun 2008