Loading...
 
Skip to main content

History: wkhtmltopdf

Source of version: 23 (current)

Copy to clipboard
^ wkhtmltopdf is still is an option for Tiki, however future energy will go in improving the ((doc:MPDF)) integration. 

((Online Publishing House - Output formats|A thorough analysis of all the options was done.))

^


* http://wkhtmltopdf.org/
** Already basic support in Tiki: ((doc:PDF))
* https://www.ohloh.net/p/wkhtmltopdf
* https://www.ohloh.net/p/web2pdf (a GUI for Windows)

!! High
* Investigate https://github.com/AAverin/JSUtils/tree/master/wkhtmltopdfTableSplitHack
* Tiki ((Check)) should report if wkhtmltopdf and wkhtmltoimage are available  (and which version)
** {CODE()}** [root ~]# which wkhtmltopdf
/usr/local/bin/wkhtmltopdf{CODE}
** Perhaps the dreaded "Unable to generate PDF" (seen on dev.tiki.org) could be "Unable to generate PDF because wkhtmltopdf is not detected"
* [http://timwhitlock.info/blog/2011/12/14/pdf-conversion-with-webkit/|make sure there is no problem with wkhtmltopdf] (From wiki page to tiki-print.php, add onclick="window.print()" to save a click)
* Document when access via ((doc:Tokens)) is necessary (only when page is not accessible to anonymous?). Perhaps add a pref dependency
** And avoid this: http://stackoverflow.com/questions/27515760/tikiwiki-print-to-pdf-via-wkhtmltopdf-renders-login-screen/27541701#27541701
* Keep an eye on this issue: [https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2301|Bootstrap and wkhtmltopdf]
* "The original document is available at..." has a few issues
** It doesn't respect the current language 
** It's pretty weird when you are printing out an official document (same problem at tiki-print.php?page=) Perhaps this should be optional? (and default off)
* Images: some images are OK on tiki-print.php but don't show up in PDF because they are not visible to anonymous (Token Access is not passed to embedded images)

!! Medium
* Investigate Tiki slideshow conversion to PDF for ((Tiki Slideshow used in BigBlueButton)) to replace dompdf because "Fatal error: Call to a member function get_current_line_box() on a non-object in vendor/dompdf/dompdf/include/absolute_positioner.cls.php on line 92 "
* Use page-break-inside: avoid; for tables and ideally between header and 1st paragraph

!! Later
* Integrate phpwkhtmltopdf or Snappy to have more options when printing. 
** Logo / header (could be more than one template) 
** ((Mail Merge))
** etc.

!! OpenHub badges
{HTML()}<script type="text/javascript" src="https://www.openhub.net/p/721841/widgets/project_factoids_stats.js"></script>{HTML}

{HTML()}<script type="text/javascript" src="https://www.openhub.net/p/627599/widgets/project_factoids_stats.js"></script>{HTML}

{HTML()}<script type="text/javascript" src="https://www.openhub.net/p/722039/widgets/project_factoids_stats.js"></script>{HTML}


!! Related links
* themes: ((themes:print))
* https://packagist.org/packages/knplabs/knp-snappy
* https://packagist.org/packages/h4cc/wkhtmltopdf-amd64
* https://packagist.org/packages/mikehaertl/phpwkhtmltopdf
* ((PhantomJS))
** https://www.openhub.net/p/compare?metric=Summary&project_0=phantomjs&project_1=&project_2=wkhtmltopdf
Show PHP error messages