Programmatically generating PDF invoices

debonair

Well-Known Member
Joined
Sep 10, 2008
Messages
228
Reaction score
2
Location
Cape Town
I would like to generate pdf invoices from a template using php. could someone please point me in the right direction,

Thanks!
 
iirc

PDFLib in PHP can do this for you.

EDIT: Sorry my advice may be worthless as I've only ever used PDFLib to push formatted text into a PDF. Not sure if it supports images etc
 
PDF invoicing is harder than you think.. unless you are talking about printing copies to pdf.. then it easy...


check out SARS for the requirements for electronics invoicing.
letter or authorisation from you client to recieve electronic invoices( the Letter needs to be kept for 5 year)
128bit encryption with ssl certs and the like..
 
We use PrinceXML, it supports both XML and HTML and supports the use of style sheets. Has a free version that will add a logo to the PDF or you can pay and get it with no logo. It is really easy to use and is hugely customisable.
 
I've been doing this for quite some time, in the days of PHP4 I used ROSPDF, but they never re-coded for PHP 5... since switching to PHP 5 I've standardised on TCPDF, free-to-use library, very robust... and OO of course... I've written a data tabulation extension for it as well that I use on my project...

http://www.tcpdf.org
 
I believe that is not what the OP asked for, he asked for a way to do it from PHP. You can give dompdf a try, it supports majority of css 2.1

I tried it, formatting is a total pain...
 
Well everyone's experience will differ, for me the main issue was formatting inconsistencies, incorrect CSS interpretations... maybe the developers have improved the code or brought out a new version, I'll take another look at it when I have time...
 
Top
Sign up to the MyBroadband newsletter
X