6021803929f8f66811f39836df65fd5cb8f1ec64
[ikiwiki.git] / doc / todo / pdf_output.mdwn
1 Some time ago there was a [[question|http://ikiwiki.info/forum/how_to_get_nice_pdf_from_ikiwiki_pages__63__/?updated#comment-05381634f89629ad26298a1af4b1d5f9]] in the forum how to get a nice pdf output from an ikiwiki page. However there were no answers. So I put it on the todo list, because I think this would be a nice feature.
2
3 Note that for example dokuwiki has a [[nice plugin|http://danjer.doudouke.org/tech/dokutexit]] which converts the wiki page to latex and then to pdf and you can customize the latex-preamble.
4
5 > I've actually written one, it's just not publicly released.  You can check it out from the "experimental" branch of my <a href="https://github.com/rubykat/ikiplugins">ikiplugins githup repo</a>.  It's called "html2pdf" and it depends on the static version of <a href="http://code.google.com/p/wkhtmltopdf/">wkhtmltopdf</a> rather than requiring a whole LaTeX setup. It's only been used on Ubuntu, so I can't say what problems there might be on other setups, but it works for me.  It's not properly documented; I'd appreciate some help with that.
6 > -- [[KathrynAndersen]]
7
8 >> Thanks, I downloaded the git-repro and did `sudo cp html2pdf.pm /usr/share/perl5/IkiWiki/Plugin/` then I added html2pdf to the addplugins line in my setup-file (`mywiki.setup`) as well a new line `html2pdf_pages=>"/*",`. Then I did `sudo ikiwiki --setup mywiki.setup`. However there is no button or something like that which let's me create the pdf's
9 >> -- [[micheal]]
10
11 >>> That is because they are created automatically as part of the page-build process.  That's what the "html2pdf_pages" option is for: it defines which pages have PDFs generated from them.  If a PDF is generated for page "foo", then the PDF itself will be in "foo/foo.pdf".
12
13 >>> I also notice you didn't mention installing wkhtmltopdf - it won't create PDFs without that!
14 >>> -- [[KathrynAndersen]]
15
16 >>>> Yes, wkhtmltopdf is installed and works, however there are no pdf-files in my /var/www/myiki directory or in scrdir.