Any PDF Plugin
Generate high quality PDF files from topics.
Introduction
This Plugin lets you use any Pdf-Creator and is not bound down to a specific one. Just configure the one you want to use in your Foswikis config. The Creator will be called like "$executable $opt1 $infile $outfile $opt2". You just need to make sure your creator can be used in this way
Example Configurations
Pdf-Creator |
Before |
After |
Comment |
phantomjs |
/path/to/rasterize.js |
format |
If it is not working with Ubuntu update phantomjs, as the version in the repo is too old. |
wkhtmltopdf |
-q --enable-plugins --outline --print-media-type |
|
no after command needed |
Usage
View the PDF version of a topic by adding
contenttype=application/pdf
to the url like this:
%SCRIPTURL{"view"}/%WEB%/%TOPIC%?contenttype=application/pdf
Test this:
http://365847.689093.cn/Extensions/AnyPdfPlugin?contenttype=application/pdf
Limitations
- Currently you can only create one page at a time.
Adding PDF buttons to the page
Add
pdf
to the skin path, for example:
* Set SKIN = pdf,pattern
or to put the 'pdf skin' in front of any skin:
* Set COVER = pdf
The button label is configurable. Re-define module
pdf:text
in your own skin, and put it in front of the skin path:
* Set SKIN = myskin,pdf,pattern
For more help see
SkinTemplates.
Installation instructions
You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.
Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".
If you have any problems, or if the extension isn't available in
configure
, then you can still install manually from the command-line. See
http://foswiki.org/Support/ManuallyInstallingExtensions for more help.
Configuration settings
In Configure you can set these settings:
Setting |
Explanation |
Default value |
pdfcmd |
Location of the the pdf-creator executable. |
/usr/bin/phantomjs |
pdfparams |
Parameters passed to the pdf-creator . |
/usr/share/phantomjs/examples/rasterize.js |
pdfformat |
Parameters passed to the pdf-creator ater the file names |
A4 |
Debug |
Writes debugging output to debug.log . |
0 |
Plugin Info
--
LukasResch - 03 Feb 2014