-
Notifications
You must be signed in to change notification settings - Fork 0
/
GenPDFWebkitPlugin.txt
53 lines (38 loc) · 2.35 KB
/
GenPDFWebkitPlugin.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
%META:TOPICINFO{author="ProjectContributor" comment="reprev" date="1265996392" format="1.1" reprev="1.3" version="1.3"}%
---+!! %TOPIC%
This plugin generates PDF using the [[http://code.google.com/p/wkhtmltopdf/][Webkit rendering engine]].
---++ Usage
Get a PDF by adding =contenttype=application/pdf= to the view url like this:
<verbatim class="tml">
%SCRIPTURL{"view"}/%WEB%/%TOPIC%?contenttype=application/pdf
</verbatim>
Here's the complete Foswiki documentation in [[%SCRIPTURL{"view"}%/%SYSTEMWEB%/CompleteDocumentation?contenttype=application/pdf][PDF]].
---++ Installation
Download =wkhtmltopdf= from http://code.google.com/p/wkhtmltopdf/ matching your platform and install it into the =tools/= directory of your
Foswiki installation. In case you installed it somewhere else use =configure= to point to the proper location.
%$INSTALL_INSTRUCTIONS%
---++ Known issues
as of wkhtmltopdf-0.9.1
* anchors still don't work: acroread throws a security exception
as of wkhtmltopdf-0.8.3
* links don't work even local #anchors don't do it; they are only drawn viually; [[http://code.google.com/p/wkhtmltopdf/issues/detail?id=39][bug report]]
* the =<base href="... />= html header must occur _before_ any other js or css files in the html source;
relative urls before are not resolved correctly (this is a general webkit problem – not a wkhtmltopdf issue)
* there's no way to provide a base url on the command-line if a =<base ...>= tag is missing in the html source
* a couple of important css3 features are not implemented yet, e.g. =::after=, =::before=, =leader()=, =target-counter()=, =@page=, =string-set=, =title=, =chapter=, =hyphens=
---++ Plugin Info
<!--
* Set SHORTDESCRIPTION = 'Generate PDF using Webkit';
-->
| Author: | Foswiki:Main.MichaelDaum |
| Copyright: | © 2009-2013, Michael Daum http://michaeldaumconsulting.com |
| License: | GPL ([[http://www.gnu.org/copyleft/gpl.html][GNU General Public License]]) |
| Release: | %$RELEASE% |
| Version: | %$VERSION% |
| Change History: | <!-- versions below in reverse order --> |
| 12 Dec 2013 | align with changes in Foswiki:Extensions/GenPDFPrincePlugin |
| 12 Feb 2010 | upgraded to wkhtml-0.9.1 |
| 17 Nov 2009 | fixed use of uninitialized value |
| 09 Sep 2009 | initial release |
| Home: | Foswiki:Extensions/%TOPIC% |
| Support: | Foswiki:Support/%TOPIC% |