RES: [PHP] Bar Charts in PDFs
| From: | Alejandro Michelin Salomon | Date: | Fri, 11 Feb 2011 18:06:39 +0000 |
| Subject: | RES: [PHP] Bar Charts in PDFs | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-311251@lists.php.net to get a copy of this message | ||
Tom:
You can try:
http://www.tcpdf.org/ to generate pdf.
And http://jpgraph.net/ To generate chart.
EX: to add a image to a pdf document:
$pdf->Image( '/home/peter/test.png',
127.78, 15, // left and right
74.93, 6.42, // width and height
'PNG', '', 'T', false, 300 );
With this tcpdf i create a legal documents for Brazilian government.
Alejandro MS
-----Mensagem original-----
De: Tom Barrett [mailto:tom@miramedia.co.uk]
Enviada em: sexta-feira, 11 de fevereiro de 2011 06:55
Para: php-general@lists.php.net
Assunto: [PHP] Bar Charts in PDFs
Hi
I need to generate some PDF reports (1000s). Part of the report is a set of
bar charts (the results of a questionnaire). Each question has the same 5
answers (v.bad, bad, ok ,good, v.good) and the chart is the % distribution
of the answers.
My plan is to create a HTML version, using "some graph drawing"* (saving a
copy of the HTML to disk), creating a PDF version using html2pdf (saving a
copy to disk and emailing to the recipient).
I think html2pdf can handle this. But I have not had much success finding
something to draw my graphs. Any (free) simple libraries out there I could
be pointed towards?
Thanks!
Tom