Re: Bar Charts in PDFs
| From: | Richard Quadling | Date: | Fri, 11 Feb 2011 12:44:58 +0000 |
| Subject: | Re: Bar Charts in PDFs | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-311247@lists.php.net to get a copy of this message | ||
On 11 February 2011 10:08, Mattias Geniar <mattias@nucleus.be> wrote:
> Hi Tom,
>
> Have a look at the library called 'pChart':
> http://pchart.sourceforge.net/
> While it's a bit old, it generates very nice looking (anti aliased)
> charts, using the default GD library.
>
> Regards,
> Mattias
>
> -----Original Message-----
> From: Tom Barrett [mailto:tom@miramedia.co.uk]
> Sent: vrijdag 11 februari 2011 10:55
> To: php-general@lists.php.net
> Subject: [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
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
For the PDF production, I'd recommend looking at fpdf [1]. A free PHP
class that doesn't use any libraries.
It can easily take the image you've created using Mattias's suggestion.
I use the fpdf class to take fax documents and add various report data
to it and subsequent pages. All fairly simple stuff.
Regards,
Richard.
[1] http://www.fpdf.org/
--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY