public function create(array $options = array())
    {
        $reflClass = $this->getReflectionClass($options);

        $options = array_merge(array(
            'orientation' => 'P',
            'unit' => 'mm',
            'format' => 'USLETTER',
            'unicode' => true,
            'encoding' => 'UTF-8',
            'diskcache' => true,
            'pdfa' => false,
            'printHeader' => false,
            'printFooter' => false,
            'margins' => array(15, 27, 15),
            'autoPageBreak' => array(true, 25),
        ), $options);

        $pdf = $reflClass->newInstanceArgs($this->getConstructorOptions($options));

        foreach ($options as $option => $arguments) {
            if (is_callable(array($pdf, 'set' . $option))) {
                if (!is_array($arguments)) {
                    if (null === $arguments) {
                        $arguments = array();
                    } else {
                        $arguments = array($arguments);
                    }
                }

                call_user_func_array(array($pdf, 'set' . $option), $arguments);
            }
        }

        return new TcPdf($pdf);
    }
public function create(array $options = array())
    {
        $reflClass = $this->getReflectionClass($options);

        $options = array_merge(array(
            'orientation' => 'P',
            'unit' => 'mm',
            'format' => 'USLETTER',
            'unicode' => true,
            'encoding' => 'UTF-8',
            'diskcache' => true,
            'pdfa' => false,
            'printHeader' => false,
            'printFooter' => false,
            'margins' => array(15, 27, 15),
            'autoPageBreak' => array(true, 25),
        ), $options);

        $pdf = $reflClass->newInstanceArgs($this->getConstructorOptions($options));

        foreach ($options as $option => $arguments) {
            if (is_callable(array($pdf, 'set' . $option))) {
                if (!is_array($arguments)) {
                    if (null === $arguments) {
                        $arguments = array();
                    } else {
                        $arguments = array($arguments);
                    }
                }

                call_user_func_array(array($pdf, 'set' . $option), $arguments);
            }
        }

        return new TcPdf($pdf);
    }
public function create ( array $ options = array ( ) ) { $ reflClass = $ this -> getReflectionClass ( $ options ) ; $ options = array_merge ( array ( 'orientation' => 'P' , 'unit' => 'mm' , 'format' => 'USLETTER' , 'unicode' => true , 'encoding' => 'UTF-8' , 'diskcache' => true , 'pdfa' => false , 'printHeader' => false , 'printFooter' => false , 'margins' => array ( 15 , 27 , 15 ) , 'autoPageBreak' => array ( true , 25 ) , ) , $ options ) ; $ pdf = $ reflClass -> newInstanceArgs ( $ this -> getConstructorOptions ( $ options ) ) ; foreach ( $ options as $ option => $ arguments ) { if ( is_callable ( array ( $ pdf , 'set' . $ option ) ) ) { if ( ! is_array ( $ arguments ) ) { if ( null === $ arguments ) { $ arguments = array ( ) ; } else { $ arguments = array ( $ arguments ) ; } } call_user_func_array ( array ( $ pdf , 'set' . $ option ) , $ arguments ) ; } } return new TcPdf ( $ pdf ) ; }
Create a new TcPdf

@param array $options

@return \Orkestra\Bundle\PdfBundle\Pdf\PdfInterface|\Orkestra\Bundle\PdfBundle\Pdf\TcPdf
Create a new TcPdf