-1

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

How to convert current html rendered in browser

to an image or pdf (so later on i can convert it to image),

using javascript (canvas or anything) or php?

what are the alternative solution?

Community
  • 1
  • 1
Kokizzu
  • 24,974
  • 37
  • 137
  • 233
  • What have you tried so far? Tag php: I assume you also accept PHP-PDF converters? – Zim84 Jan 25 '13 at 07:37
  • @Zim84, TCPDF, buat it doesn't support css styling – Kokizzu Jan 25 '13 at 07:49
  • @Kiswono Prayogo yes it does its just not fully compliant it support some styling and not some other styling. eg styling on tables doesn't work when using pseudo classes etc but applying style="" to a table cell/row etc works perfectly – Dave Jan 25 '13 at 09:11

4 Answers4

3

For PDF conversion, it will help you.

dompdf: HTML to PDF Converter

0b10011
  • 18,397
  • 4
  • 65
  • 86
Edwin Alex
  • 5,118
  • 4
  • 28
  • 50
2

If you want to generate PDF of HTML+CSS through PHP then There is TCPDF for generating PDF from HTML + CSS.

TCPDF is a PHP class for generating PDF documents without requiring external extensions. TCPDF Supports UTF-8, Unicode, RTL languages, XHTML, Javascript, digital signatures, barcodes and much more.

J.K.A.
  • 7,272
  • 25
  • 94
  • 163
1

For creating pdf im using FPDF - php library, if you have an option do it with it...

Jaroslav Štreit
  • 415
  • 1
  • 5
  • 16
1

[For converting html to PDF in client side you can use printElement

Nandakumar V
  • 4,317
  • 4
  • 27
  • 47