1

i use tcpdf for pdf generation in php. http://www.tcpdf.org/examples.php

i use a javascript / jquery framwork / plugin to display some charts. (f.e. http://filamentgroup.com/lab/update_to_jquery_visualize_accessible_charts_with_html5_from_designing_with/ )

the tcpdf intern way for charts is no opportunity for me. there is a method transforming canvas to png like described here ( Capture HTML Canvas as gif/jpg/png/pdf? ) which unfortunately does only convert, in all tested plugins/frameworks, fragments of the needed chart.

tcpdf supports javascript but imo only for form interactions, like seen in one of the samples.

which way, even which library (different than tcpdf) allows me to include js-charts into a pdf in php without server access?

Community
  • 1
  • 1
Email
  • 2,395
  • 3
  • 35
  • 63

2 Answers2

0

wkhtmltopdf sits on top of a QT port of WebKit (thus the "wk" in the name). Its JavaScript support is EXCELLENT.

I've used it to successfully render a page containing a google map. It doesn't get much more script-intense than that. I did have to play with the command line a bit (allowed the page's JS longer than the default time to complete, 100ms, 200?).

Mark Storer
  • 15,672
  • 3
  • 42
  • 80
0

My work-arround for this goes along by using google charts api. google helps you to get interactive charts on the webpage and for converting to pdf google creates static png's with the whole data displayed. so far i can live with that pretty good.

Email
  • 2,395
  • 3
  • 35
  • 63
  • 1
    For anyone who is going to use this suggestion, Google announced that this API is now deprecated (image version) which is what @Email is referring to. – Duniyadnd Jun 28 '12 at 20:26