plugin:html2pdf
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:html2pdf [2009-12-27 08:22] – 125.131.236.242 | plugin:html2pdf [2019-08-16 15:05] (current) – Aleksandr | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== html2pdf | + | ====== html2pdf |
---- plugin ---- | ---- plugin ---- | ||
- | description: | + | description: |
author | author | ||
email : d.stonier@gmail.com | email : d.stonier@gmail.com | ||
Line 10: | Line 10: | ||
depends | depends | ||
conflicts | conflicts | ||
- | similar | + | similar |
- | tags : export, pdf | + | tags : export, pdf, !broken |
+ | |||
+ | sourcerepo : https:// | ||
+ | bugtracker : https:// | ||
+ | downloadurl: | ||
---- | ---- | ||
Line 24: | Line 28: | ||
* Outputs graphics of reasonable quality. | * Outputs graphics of reasonable quality. | ||
- | ===== Links ===== | + | ===== Demo (not working) |
- | * [[http:// | ||
* [[http:// | * [[http:// | ||
- | | + | |
- | * [[http://snorriheim.dnsdojo.com/redmine/ | + | ===== Installation ====== |
- | * [[http://snorriheim.dnsdojo.com/redmine/wiki/html2pdf/TroubleShooting|TroubleShooting]] | + | |
- | * [[http://snorriheim.dnsdojo.com/redmine/ | + | Download and install the plugin using the Plugin Manager using the following url. |
- | | + | |
+ | | ||
+ | |||
+ | Warning! This is a large file (~36MB) and the plugin manager would not handle it for me (not sure where that's a DokuWiki setting or an Apache setting at this point in time). Alternatively, | ||
+ | |||
+ | ===== Links ===== | ||
+ | |||
+ | == Insufficient Memory == | ||
+ | |||
+ | The html2ps script is pretty greedy and you might not have enough memory reserved for the PHP script. When this happens, it will return with an error stating so. To increase the memory: | ||
+ | Edit your php.ini file, set the memory_limit variable to 128K or more. Restart the web server. | ||
+ | |||
+ | == Bad CSS == | ||
+ | |||
+ | The html2pdf | ||
+ | |||
+ | == Blank PDF Output == | ||
+ | |||
+ | Check that the html is being made in doku/lib/plugins/html2pdf/tmp/export_pdf.html. | ||
+ | Check that the html2pdf is working with the systemcheck link in the troubleshooting section above. | ||
+ | Especially check curl and ghostscript - you need php with curl use flag and ghostscript package installed. | ||
+ | Make sure your entire directory is read/writeable by your web server user (usually apache: | ||
+ | |||
+ | == Large PDF File Size == | ||
+ | |||
+ | Aye, thats normal. The holy grail of easily convertable documents isn't really here yet (though I've seen a project aiming to get there), but this is the best I've seen for faithfully rendering what you see in a dokuwiki page to pdf, even if it is pretty heavy getting there. I wouldn' | ||
+ | |||
+ | ===== Export Link/Button ===== | ||
+ | |||
+ | To use the plugin, you simply need to call the page passing it a “do=export_pdf” php argument. The easiest way to implement this is to add a button or similar somewhere in your template design. | ||
+ | |||
+ | == Dokubook == | ||
+ | |||
+ | I use an extended dokubook for this, and have the following code inserted into the top__nav unordered list in main.php: | ||
+ | |||
+ | <code php> | ||
+ | $pdf_plugin = & | ||
+ | if ( $pdf_plugin ) { | ||
+ | | ||
+ | print '< | ||
+ | print ' | ||
+ | echo exportlink($ID, | ||
+ | print '" | ||
+ | print '</li>' | ||
+ | } | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | The appropriate bit of CSS is added for tab_pdf in dokubook_design.css. | ||
+ | |||
+ | == Monobook == | ||
+ | |||
+ | When using the template “monobook for DokuWiki”, | ||
+ | |||
+ | <code php> | ||
+ | $monobook[' | ||
+ | $monobook[' | ||
+ | </ | ||
===== Issues and Requests ===== | ===== Issues and Requests ===== | ||
Line 64: | Line 124: | ||
Run the systemcheck link (see the troubleshooting section above) and check everything is in working order. Is it primarily a fonts or graphics problem? | Run the systemcheck link (see the troubleshooting section above) and check everything is in working order. Is it primarily a fonts or graphics problem? | ||
+ | |||
+ | |||
+ | === Too heavy === | ||
+ | I see the interest to include the font, but the result is really too heavy; such files cannot even be sent by mail! \\ | ||
+ | Pat -- 2010-11-09 |
plugin/html2pdf.1261898571.txt.gz · Last modified: 2009-12-27 08:22 by 125.131.236.242