protected function registerPageFormat(string $pageSize = null, string $orientation = null): PdfInterface
    {
        in_array($pageSize, $this->pageTypes)
            ? $this->setProperty('pageSize', $pageSize)
            : $this->setProperty('pageSize', static::DEFAULT_PAGE_SIZE);

        $this->setPageOrientation($orientation);

        return $this;
    }
protected function registerPageFormat(string $pageSize = null, string $orientation = null): PdfInterface
    {
        in_array($pageSize, $this->pageTypes)
            ? $this->setProperty('pageSize', $pageSize)
            : $this->setProperty('pageSize', static::DEFAULT_PAGE_SIZE);

        $this->setPageOrientation($orientation);

        return $this;
    }
protected function registerPageFormat ( string $ pageSize = null , string $ orientation = null ) : PdfInterface { in_array ( $ pageSize , $ this -> pageTypes ) ? $ this -> setProperty ( 'pageSize' , $ pageSize ) : $ this -> setProperty ( 'pageSize' , static :: DEFAULT_PAGE_SIZE ) ; $ this -> setPageOrientation ( $ orientation ) ; return $ this ; }
Generate and store a defined PDF page format.

@param string $pageSize    The page format type ['Letter','Legal', etc.]
@param string $orientation The page orientation ['Portrait','Landscape']

@return PdfInterface The current instance
Generate and store a defined PDF page format .