Skip to content

Commit

Permalink
Added an example to help out users to set variables
Browse files Browse the repository at this point in the history
Shows users how to specify view variables by using (extended) method from ZF2's ViewModel.
  • Loading branch information
jamiehannaford committed Apr 24, 2013
1 parent c479871 commit e7c9fa5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,16 @@ class ReportController extends AbstractActionController
$pdf->setOption('filename', 'monthly-report'), // Triggers PDF download, automatically appends ".pdf"
$pdf->setOption('paperSize', 'a4'); // Defaults to "8x11"
$pdf->setOption('paperOrientation', 'landscape'); // Defaults to "portrait"


// To set view variables
$pdf->setVariables(array(
'message' => 'Hello'
));

return $pdf;
}
}
```

## To-do
- Add command line support.
- Add command line support.

0 comments on commit e7c9fa5

Please sign in to comment.