public function getPageCount()
    {
        if ($this->pageCount === null) {
            $catalog = $this->parser->getCatalog();

            $pages = PdfType::resolve(PdfDictionary::get($catalog, 'Pages'), $this->parser);
            $count = PdfType::resolve(PdfDictionary::get($pages, 'Count'), $this->parser);

            $this->pageCount = PdfNumeric::ensure($count)->value;
        }

        return $this->pageCount;
    }
public function getPageCount()
    {
        if ($this->pageCount === null) {
            $catalog = $this->parser->getCatalog();

            $pages = PdfType::resolve(PdfDictionary::get($catalog, 'Pages'), $this->parser);
            $count = PdfType::resolve(PdfDictionary::get($pages, 'Count'), $this->parser);

            $this->pageCount = PdfNumeric::ensure($count)->value;
        }

        return $this->pageCount;
    }
public function getPageCount ( ) { if ( $ this -> pageCount === null ) { $ catalog = $ this -> parser -> getCatalog ( ) ; $ pages = PdfType :: resolve ( PdfDictionary :: get ( $ catalog , 'Pages' ) , $ this -> parser ) ; $ count = PdfType :: resolve ( PdfDictionary :: get ( $ pages , 'Count' ) , $ this -> parser ) ; $ this -> pageCount = PdfNumeric :: ensure ( $ count ) -> value ; } return $ this -> pageCount ; }
Get the page count.

@return int
@throws PdfTypeException
@throws CrossReferenceException
@throws PdfParserException
Get the page count .