public function setSourceFile($file)
    {
        $this->currentReaderId = $this->getPdfReaderId($file);
        $this->objectsToCopy[$this->currentReaderId] = [];

        $reader = $this->getPdfReader($this->currentReaderId);
        $this->setMinPdfVersion($reader->getPdfVersion());

        return $reader->getPageCount();
    }
public function setSourceFile($file)
    {
        $this->currentReaderId = $this->getPdfReaderId($file);
        $this->objectsToCopy[$this->currentReaderId] = [];

        $reader = $this->getPdfReader($this->currentReaderId);
        $this->setMinPdfVersion($reader->getPdfVersion());

        return $reader->getPageCount();
    }
public function setSourceFile ( $ file ) { $ this -> currentReaderId = $ this -> getPdfReaderId ( $ file ) ; $ this -> objectsToCopy [ $ this -> currentReaderId ] = [ ] ; $ reader = $ this -> getPdfReader ( $ this -> currentReaderId ) ; $ this -> setMinPdfVersion ( $ reader -> getPdfVersion ( ) ) ; return $ reader -> getPageCount ( ) ; }
Set the source PDF file.

@param string|resource|StreamReader $file Path to the file or a stream resource or a StreamReader instance.
@return int The page count of the PDF document.
@throws PdfParserException
Set the source PDF file .