[cgi-wiki-dev] [CGI::Wiki] PDF Output

Kjetil Kjernsmo kjetil at kjernsmo.net
Sun Jan 22 14:11:38 GMT 2006


On Sunday 22 January 2006 10:36, Kake L Pugh wrote:
> On Fri 20 Jan 2006, HERMIER Christophe 
<christophe.hermier at quickfds.com> wrote:
> > But on my checklist I need to be able to produce (nice) PDF files
> > out of the wiki pages.  At first, I thought that the "Formatter"
> > classes where the sort of thing to do that but it seems they are
> > concerned with input format rather than ouput format.
>
> Kjetil Kjernsmo did some stuff along these lines.
>
> http://search.cpan.org/~kjetilk/Formatter-0.95/Formatter.pod
> http://search.cpan.org/~kjetilk/Formatter-HTML-Textile-0.7/
> etc

Yup, I think it would be very interesting to create a Formatter for it. 

However, I just reviewed our general options for creating PDFs from web 
pages, and the conclusion was that it was a non-trivial matter. We're 
skipping it, and instead we create print CSS stylesheets and have 
people use the client to create PDFs if they like. 

The general approach that people seem to be using a bit is to use the 
XML they get from their web app and transform that to an XSL-FO format, 
which is then piped through a formatting engine, FOP:
http://xmlgraphics.apache.org/fop/ and PassiveTex: 
http://www.tei-c.org.uk/Software/passivetex/ comes to mind. 

I didn't go as far as trying, but people say that XSL-FO is not nice to 
work with and both these engines are incomplete and buggy....

So, while I'd certainly love to see a Formatter for PDF, it is going to 
be a long and painful thing to do, it seems...

Cheers,

Kjetil
-- 
Kjetil Kjernsmo
Programmer / Astrophysicist / Ski-orienteer / Orienteer / Mountaineer
kjetil at kjernsmo.net
Homepage: http://www.kjetil.kjernsmo.net/     OpenPGP KeyID: 6A6A0BBC



More information about the CGI-Wiki-dev mailing list