function pdf_find_xref() {
       	fseek ($this->f, -min(filesize($this->filename),1500), SEEK_END);
        $data = fread($this->f, 1500);
        
        $pos = strlen($data) - strpos(strrev($data), strrev('startxref')); 
        $data = substr($data, $pos);
        
        if (!preg_match('/\s*(\d+).*$/s', $data, $matches)) {
	 	// mPDF 4.0
           	$this->success = false;
            $this->errormsg = sprintf("Unable to find pointer to xref table");
		return false;
    	}

    	return (int) $matches[1];
    }
function pdf_find_xref() {
       	fseek ($this->f, -min(filesize($this->filename),1500), SEEK_END);
        $data = fread($this->f, 1500);
        
        $pos = strlen($data) - strpos(strrev($data), strrev('startxref')); 
        $data = substr($data, $pos);
        
        if (!preg_match('/\s*(\d+).*$/s', $data, $matches)) {
	 	// mPDF 4.0
           	$this->success = false;
            $this->errormsg = sprintf("Unable to find pointer to xref table");
		return false;
    	}

    	return (int) $matches[1];
    }
function pdf_find_xref ( ) { fseek ( $ this -> f , - min ( filesize ( $ this -> filename ) , 1500 ) , SEEK_END ) ; $ data = fread ( $ this -> f , 1500 ) ; $ pos = strlen ( $ data ) - strpos ( strrev ( $ data ) , strrev ( 'startxref' ) ) ; $ data = substr ( $ data , $ pos ) ; if ( ! preg_match ( '/\s*(\d+).*$/s' , $ data , $ matches ) ) { // mPDF 4.0 $ this -> success = false ; $ this -> errormsg = sprintf ( "Unable to find pointer to xref table" ) ; return false ; } return ( int ) $ matches [ 1 ] ; }
Find the xref-Table
Find the xref - Table