Is there a simple PDF class that converts HTML output pdf file?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • perhapscwk
    New Member
    • Sep 2007
    • 123

    Is there a simple PDF class that converts HTML output pdf file?

    Code:
    $pdf->Cell(10,7,'test test test test test',1,0,'L');
    Let say if i draw a table like above, since the string are longer than the width as i set (10), then some words will display out of the table.

    it seem fpdf quite difficult to use, any simple pdf class
    which able to use simple code like html to output pdf file? use html to draw a table seems much more easier than fpdf.
  • Niheel
    Recognized Expert Moderator Top Contributor
    • Jul 2005
    • 2432

    #2
    You can use dopdf from google:

    dompdf is an HTML to PDF converter. At its heart, dompdf is (mostly) CSS 2.1 compliant HTML layout and rendering engine written in PHP. It is a style-driven renderer: it will download and read external stylesheets, inline style tags, and the style attributes of individual HTML elements. It also supports most presentational HTML attributes.

    PDF rendering is currently provided either by PDFLib or by a bundled version the R&OS CPDF class written by Wayne Munro. (Some important changes have been made to the R&OS class, however). In order to use PDFLib with dompdf, the PDFLib PECL extension is required. Using PDFLib improves performance and reduces the memory requirements of dompdf somewhat, while the R&OS CPDF class, though slightly slower, eliminates any dependencies on external PDF libraries.
    niheel @ bytes

    Comment

    Working...