tags:

views:

95

answers:

3

Possible Duplicate:
Convert HTML + CSS to PDF with PHP?

Please give code for PDF generation using HTML and CSS

+2  A: 

In one of my projects I am using dompdf. Here you can find the code you are looking for.

captaintokyo
A: 

What's your development environment?

I have used iTextSharp with great success. You might want to have a look at it.

Izmoto
The question is tagged php, so I don't think this is useful for him.
captaintokyo
New versions of iTextSharp cannot be used in commercial applications (unless you buy a license from them). It's still OK to see it in open source projects, etc.
Rowan
@captaintokyo my bad, i didn't see the 'php' tag when i posted :-(
Izmoto
A: 

It's not possible to generate a PDF file using just HTML and CSS code. You will need a PHP library that supports converting HTML documents to PDF documents. See this StackOverflow question for some tips.

Rowan