3

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

I want to convert page like this http://alexking.org/projects/html-resume-template/demo/resume.php to pdf on the fly by a link inside the page, I tried dompdf but failed to have the result.

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
Pipo
  • 41
  • 1
  • 1
  • 3

5 Answers5

3

I has some success with HTML2PDF, give it a try. Example:

$content = get_include_contents('/resume.php');

require_once(dirname(__FILE__).'/html2pdf/html2pdf.class.php');
$html2pdf = new HTML2PDF('P', 'A4', 'en');
$html2pdf->WriteHTML($content);
$html2pdf->Output('example.pdf');
ldiqual
  • 15,015
  • 6
  • 52
  • 90
0

Check out Zend_PDF(), which provides all possibilities. If you need a bigger freedom and other formatting, I'd recommend to use latex and a latex2pdf-call, but this one might be a bit much for what you want to achieve.

Unfortunatly, I haven't seen a decent html2pdf-generator so far.

Lars
  • 5,757
  • 4
  • 25
  • 55
0

What about http://www.php.net/manual/en/pdf.examples-basic.php ?

Rob
  • 1,235
  • 2
  • 19
  • 44
0

I've found this to be very good http://code.google.com/p/wkhtmltopdf/. It uses the webkit engine.

WayneC
  • 5,569
  • 2
  • 32
  • 43
-1

Personally I use TCPDF. It fully supports UTF-8 and you don't need any external libraries to use it.

matino
  • 17,199
  • 8
  • 49
  • 58