Get current pdf object.

@param bool $init Set true if you want to create a new pdf regardless there is always an existing pdf

@return Mpdf
503131
public function getPdf(bool $init = false): Mpdf
    {
        $this->pdf = (null === $this->pdf || true === $init) ? new Mpdf($this->config) : $this->pdf;

        return $this->pdf;
    }
766740
function initializeObjectAttribute( $contentObjectAttribute, $currentVersion, $originalContentObjectAttribute )
    {
        if ( $currentVersion != false )
        {
            $dataText = $originalContentObjectAttribute->attribute( "data_text" );
            $contentObjectAttribute->setAttribute( "data_text", $dataText );
        }
    }
484225
public static function getInstance($type, $init)
    {
        if (!self::$cachingInstance) {
            self::$cachingInstance = new FileCache($type, $init);
        }

        return self::$cachingInstance;
    }
491224
public static function nativeSupport(string $ext = '')
    {
        $support = static::$nativeSupport;
        if (!$support) {
            $support['mbstring'] = function_exists('mb_strlen');
            $support['intl'] = function_exists('intl_error_name');
            static::$nativeSupport = $support;
        }
        if ($ext) {
            return !empty($support[$ext]);
        }
        return $support;
    }
1325931
public function downloadpdf()
    {
        if (!$this->owner->data()->config()->get('pdf_export')) {
            return false;
        }

        // We only allow producing live pdf. There is no way to secure the draft files.
        Versioned::set_stage(Versioned::LIVE);

        $path = $this->owner->data()->getPdfFilename();
        if (!file_exists($path)) {
            $this->owner->generatePDF();
        }

        return HTTPRequest::send_file(file_get_contents($path), basename($path), 'application/pdf');
    }
476658
function openObject() {
		//Helpers::dompdf_debug("trace", "Enter My_TCPDF.openObject(state = $this->state)");

		if ($this->state == 2) {
			$curr_buffer = $this->getPageBuffer($this->page);
		}
		else {
			$curr_buffer = $this->getBuffer();
		}

		$this->dompdf_num_stack++;
		$this->dompdf_stack[$this->dompdf_num_stack] = array('c' => $curr_buffer, 'p' => $this->page, 'g' => $this->getGraphicVars());

		//Helpers::dompdf_debug("trace", "---------> " . $curr_buffer);

		if ($this->state == 2) {
			$this->setPageBuffer($this->page, '');
		}
		else {
			$this->buffer = '';
			$this->bufferlen = strlen($this->buffer);
		}
		$this->page = 1;	// some output is not done if page = 0 (e.g SetDrawColor())

		$this->dompdf_num_objects++;
		$this->dompdf_objects[$this->dompdf_num_objects] = array('c' => '', 'p' => 0, 'g' => null);

		return $this->dompdf_num_objects;
	}
1332339
public static function getInstance($type, $init)
    {
        if (!self::$cachingInstance) {
            self::$cachingInstance = new IDS_Caching_File($type, $init);
        }

        return self::$cachingInstance;
    }
1218715
function initializeObjectAttribute( $contentObjectAttribute, $currentVersion, $originalContentObjectAttribute )
    {
        if ( $currentVersion == false )
        {
            $multioption = $contentObjectAttribute->content();
            if ( $multioption )
            {
                $contentClassAttribute = $contentObjectAttribute->contentClassAttribute();
                $multioption->setName( $contentClassAttribute->attribute( 'data_text1' ) );
                $contentObjectAttribute->setAttribute( "data_text", $multioption->xmlString() );
                $contentObjectAttribute->setContent( $multioption );
            }
        }
        else
        {
            $dataText = $originalContentObjectAttribute->attribute( "data_text" );
            $contentObjectAttribute->setAttribute( "data_text", $dataText );
        }
    }
240438
function initializeObjectAttribute( $contentObjectAttribute, $currentVersion, $originalContentObjectAttribute )
    {
        if ( $currentVersion != false )
        {
            $idString = $originalContentObjectAttribute->attribute( "data_text" );
            $contentObjectAttribute->setAttribute( "data_text", $idString );
            $contentObjectAttribute->store();
        }
    }
1090858
function initializeObjectAttribute( $contentObjectAttribute, $currentVersion, $originalContentObjectAttribute )
    {
        if ( $currentVersion != false )
        {
            $contentObjectAttributeID = $originalContentObjectAttribute->attribute( "id" );
            $version = $contentObjectAttribute->attribute( "version" );
            $oldfile = eZBinaryFile::fetch( $contentObjectAttributeID, $currentVersion );
            if ( $oldfile != null )
            {
                $oldfile->setAttribute( 'contentobject_attribute_id', $contentObjectAttribute->attribute( 'id' ) );
                $oldfile->setAttribute( "version",  $version );
                $oldfile->store();
            }
        }
    }
68096
public function getMpdf($constructorArgs = array()) 
    {
        $allConstructorArgs = $constructorArgs;
	    if($this->getAddDefaultConstructorArgs()) {
	        $allConstructorArgs = array(array_merge(array('utf-8', 'A4'), $allConstructorArgs));
	    }		

        $reflection = new \ReflectionClass('Mpdf\Mpdf');
        $mpdf = $reflection->newInstanceArgs($allConstructorArgs);

        return $mpdf;
    }
223234
public function build(): GetFlattenedDocumentRequest
	{
		$instance = new GetFlattenedDocumentRequest();
		$instance->depth = $this->depth;
		$instance->pierce = $this->pierce;
		return $instance;
	}
219567
public function getRequest($autoInit = false)
    {
        $this->setAutoInitRequest($autoInit);
        if ($this->request == null && $this->isAutoInitRequest()) {
            $this->initRequest();
        }

        return $this->request;
    }
1057611
function initializeObjectAttribute( $contentObjectAttribute, $currentVersion, $originalContentObjectAttribute )
    {
        if ( $currentVersion != false )
        {
//             $contentObjectAttributeID = $contentObjectAttribute->attribute( "id" );
//             $currentObjectAttribute = eZContentObjectAttribute::fetch( $contentObjectAttributeID,
//                                                                         $currentVersion );
            $dataText = $originalContentObjectAttribute->attribute( "data_text" );
            $contentObjectAttribute->setAttribute( "data_text", $dataText );
        }
        else
        {
            $contentClassAttribute = $contentObjectAttribute->contentClassAttribute();
            $default = $contentClassAttribute->attribute( 'data_text1' );
            if ( $default !== '' && $default !== NULL )
            {
                $contentObjectAttribute->setAttribute( 'data_text', $default );
            }
        }
    }
881793
public static function get($initArgs = array())
    {
        if (get_class(Core\Config::getHTMLInstance()) == 'Xiphe\HTML') {
            return Core\Config::getHTMLInstance();
        } elseif (get_class($GLOBALS['HTML']) == 'Xiphe\HTML') {
            return $GLOBALS['HTML'];
        } else {
            return new HTML($initArgs);
        }
    }
1313603
protected function instantiate()
    {
        $oOptions = new Options();
        $aOptions = [];

        //  Default options
        foreach (self::DEFAULT_OPTIONS as $sOption => $mValue) {
            $aOptions[$sOption] = $mValue;
        }

        //  Custom options override default options
        foreach ($this->aCustomOptions as $sOption => $mValue) {
            $aOptions[$sOption] = $mValue;
        }

        //  Set the options
        foreach ($aOptions as $sOption => $mValue) {
            $oOptions->set($sOption, $mValue);
        }

        $this->oDomPdf = new Dompdf($oOptions);
        $this->setPaperSize($this->sPaperSize, $this->sPaperOrientation);

        return $this;
    }
149924
protected function initCurrentObject()
    {
        parent::initCurrentObject();

        $request = new CreatePaymentRequest();

        $this->recipient = new Recipient();
        $this->airline = new Airline();

        return $request;
    }