Skip to content

Commit

Permalink
README update
Browse files Browse the repository at this point in the history
  • Loading branch information
jedateach committed Aug 18, 2012
1 parent 7e60f02 commit 27cb3de
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions README.md
@@ -1,21 +1,32 @@
# PDF Generation via DOMPDF Library

Maintainer: Jeremy Shipman (jeremy@burnbright.net)

# Writing templates

You'll want to

* Use tables for layout


http://code.google.com/p/dompdf/

Input:

* SS Template + data
* HTML string (which could be rendered template)
* HTML File

Output

* PDF File location
* SS File
* PDF binary stream
* PDF binary stream to browser

## Example usage

$pdf = new SS_DOMPDF();
$pdf->setHTML($mydataobject->renderWith('MyTemplate'));
$pdf->render();
$pdf->toFile('mypdf.pdf');

## Debugging

The $pdf->streamdebug(); function is useful for quickly viewing pdfs, particularly
if your browser supports displaying pdfs, rather than downloading.

You can check your html before it is converted like this:

echo $mydataobject->renderWith('MyTemplate');die();

0 comments on commit 27cb3de

Please sign in to comment.