Created
November 7, 2013 13:58
-
-
Save manuakasam/7354957 to your computer and use it in GitHub Desktop.
DOMPdfModule Default Configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| return array( | |
| 'dompdf_module' => array( | |
| 'dpi' => 300 | |
| ), | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace Yournamespace\Controller; | |
| use DOMPDFModule\View\Model\PdfModel; | |
| use Zend\Mvc\Controller\AbstractActionController; | |
| class PdfController extends AbstractActionController | |
| { | |
| public function testAction() | |
| { | |
| $pdf = new PdfModel(); | |
| $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" | |
| return $pdf; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment