src/Smalot/PdfParser/Header.php
protected function resolveXRef($name)
    {
        if (($obj = $this->elements[$name]) instanceof ElementXRef && !is_null($this->document)) {
            /** @var ElementXRef $obj */
            $object = $this->document->getObjectById($obj->getId());

            if (is_null($object)) {
                return new ElementMissing(null, null);
            }

            // Update elements list for future calls.
            $this->elements[$name] = $object;
        }

        return $this->elements[$name];
    }
protected function resolveXRef($name)
    {
        if (($obj = $this->elements[$name]) instanceof ElementXRef && !is_null($this->document)) {
            /** @var ElementXRef $obj */
            $object = $this->document->getObjectById($obj->getId());

            if (is_null($object)) {
                return new ElementMissing(null, null);
            }

            // Update elements list for future calls.
            $this->elements[$name] = $object;
        }

        return $this->elements[$name];
    }
protected function resolveXRef ( $ name ) { if ( ( $ obj = $ this -> elements [ $ name ] ) instanceof ElementXRef && ! is_null ( $ this -> document ) ) { /** @var ElementXRef $obj */ $ object = $ this -> document -> getObjectById ( $ obj -> getId ( ) ) ; if ( is_null ( $ object ) ) { return new ElementMissing ( null , null ) ; } // Update elements list for future calls. $ this -> elements [ $ name ] = $ object ; } return $ this -> elements [ $ name ] ; }
Resolve XRef to object.

@param string $name

@return Element|PDFObject
@throws \Exception
Resolve XRef to object .