Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert a portion of PHP output into PDF or Image 1

Status
Not open for further replies.

Sleidia

Technical User
May 4, 2001
1,284
FR

Hi guys,

I need to know what is the easiest way to transform a portion of the PHP output into either a PDF or an image.

I'm asking this because I want to capture the users shopping cart and send it to them by email when the payment is issued.

I'd like to avoid HML mail.

I've read the documentation of FPDF and it looks like you have to write the PDF from A to Z. No page conversion available as it seems. The same goes for the GD library.

Thanks :)
 
the easiest way through is to use dompdf. it has been unsupported for a couple of years, and it's css support is not perfect, but if you keep your 'invoice' pages simple, it should work for you.
 
Thanks jpadie :)

Unfortunately I'm not on PHP5 yet and from what I read on various sites, it's far from being a perfect solution :(
 
it's ok for simple pages. but it does require php5.

otherwise take a look at fpdf. you could create a pdf yourself in acrobat or something, use form fields for dynamic data, and then fill the form fields in using the library.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top