2017 © Pedro Peláez
 

library zf-dompdf-module

A Zend Framework 2 module for incorporating DOMPDF support.

image

reinfi/zf-dompdf-module

A Zend Framework 2 module for incorporating DOMPDF support.

  • Thursday, June 15, 2017
  • by reinfi
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

ZFDompdfModule

The DOMPDF module integrates the DOMPDF library with Zend Framework 2 with minimal effort on the consumer's end., (*1)

Requirements

Installation

Installation of DOMPDFModule uses PHP Composer. For more information about PHP Composer, please visit the official PHP Composer site., (*2)

Installation steps

  1. composer require "reinfi/zf-dompdf-module"
  2. open my/project/directory/config/application.config.php and add the following key to your modules:, (*3)

    php 'ZFDomPdf',, (*4)

Configuration options

You can override options via the dompdf key in your local or global config files. See Dompdf class for all options., (*5)

Usage

<?php

namespace Application\Controller;

use Zend\Mvc\Controller\AbstractActionController;
use ZFDomPdf\View\Model\PdfModel;

class ReportController extends AbstractActionController
{
    public function monthlyReportPdfAction()
    {
        $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"

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

        return $pdf;
    }
}

The Versions

15/06 2017

dev-master

9999999-dev

A Zend Framework 2 module for incorporating DOMPDF support.

  Sources   Download

MIT

The Requires

 

by Avatar reinfi

zf2 pdf dompdf

15/06 2017

v1.0

1.0.0.0

A Zend Framework 2 module for incorporating DOMPDF support.

  Sources   Download

MIT

The Requires

 

by Avatar reinfi

zf2 pdf dompdf