src/Pdf/Pdf.php
public function initializePageSetup(string $pageSize = null, string $orientation = null): PdfInterface
    {
        in_array($pageSize, $this->pageTypes)
            ? $this->setProperty(
                'mpdf',
                new \mPDF(
                    'utf-8',
                    $pageSize . '-' . $orientation[0],
                    $this->fontSize,
                    $this->fontType,
                    $this->marginLeft,
                    $this->marginRight,
                    $this->marginTop,
                    $this->marginBottom,
                    $this->marginHeader,
                    $this->marginFooter,
                    $orientation[0]
                )
            )
            : $this->setProperty('mpdf', new \mPDF('UTF-8', 'Letter-P'));

        return $this;
    }
public function initializePageSetup(string $pageSize = null, string $orientation = null): PdfInterface
    {
        in_array($pageSize, $this->pageTypes)
            ? $this->setProperty(
                'mpdf',
                new \mPDF(
                    'utf-8',
                    $pageSize . '-' . $orientation[0],
                    $this->fontSize,
                    $this->fontType,
                    $this->marginLeft,
                    $this->marginRight,
                    $this->marginTop,
                    $this->marginBottom,
                    $this->marginHeader,
                    $this->marginFooter,
                    $orientation[0]
                )
            )
            : $this->setProperty('mpdf', new \mPDF('UTF-8', 'Letter-P'));

        return $this;
    }
public function initializePageSetup ( string $ pageSize = null , string $ orientation = null ) : PdfInterface { in_array ( $ pageSize , $ this -> pageTypes ) ? $ this -> setProperty ( 'mpdf' , new \ mPDF ( 'utf-8' , $ pageSize . '-' . $ orientation [ 0 ] , $ this -> fontSize , $ this -> fontType , $ this -> marginLeft , $ this -> marginRight , $ this -> marginTop , $ this -> marginBottom , $ this -> marginHeader , $ this -> marginFooter , $ orientation [ 0 ] ) ) : $ this -> setProperty ( 'mpdf' , new \ mPDF ( 'UTF-8' , 'Letter-P' ) ) ; return $ this ; }
Initialize a new PDF document by specifying page size and orientation.

@param string $pageSize    The page size ('Letter','Legal','A4')
@param string $orientation The page orientation ('Portrait','Landscape')

@return PdfInterface The current interface

@api
Initialize a new PDF document by specifying page size and orientation .