function new_page_size($paper, $orientation) { $size = $this->get_size($paper, $orientation); $this->_width = $size[2] - $size[0]; $this->_height = $size[3] - $size[1]; $this->_pdf->newDocument($size); }