Link to home
Start Free TrialLog in
Avatar of Geerd
Geerd

asked on

Generating a PDF invoice directly from my php and mysql website

Hi Everybody,

I've got a webshop where customers can buy certain items.
The items they order are stored as an order in a MySQL database.

I would like to generate an PDF invoice directly from the site and email it.

(hit button --> get data from mysql --> generate pdf --> email to customer)

The site is hosted by an external party.

I hope somebody's got an idea.

Thanx in advance

G.
SOLUTION
Avatar of dr_dedo
dr_dedo
Flag of Egypt image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of michel-angelo
michel-angelo

http://sourceforge.net/projects/pdf-php
Easy to use, well documented.
HINT: do not forget to install the font directory when you use it, it got me for an hour :)
>> it got me for an hour :)
easy indeed :P
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
niceeeee

now to the second part, the questioner want to send that PDF via email

you can use almighty phpMailer tool to do that. get it here
http://phpmailer.sourceforge.net/

when u save that PDF to a file, add that file as an attachment to the email and when mail is sent, delete the generated PDF file unlink(file_path)