public function setPage($page)
    {
        if ($page > $this->getNumberOfPages() || $page < 1) {
            throw new PageDoesNotExist("Page {$page} does not exist");
        }

        $this->page = $page;

        return $this;
    }
public function setPage($page)
    {
        if ($page > $this->getNumberOfPages() || $page < 1) {
            throw new PageDoesNotExist("Page {$page} does not exist");
        }

        $this->page = $page;

        return $this;
    }
public function setPage ( $ page ) { if ( $ page > $ this -> getNumberOfPages ( ) || $ page < 1 ) { throw new PageDoesNotExist ( "Page {$page} does not exist" ) ; } $ this -> page = $ page ; return $ this ; }
Set the page number that should be rendered.

@param int $page

@return $this

@throws \Spatie\PdfToImage\Exceptions\PageDoesNotExist
Set the page number that should be rendered .