Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 3.14.248.199
<?php
namespace Mpdf\Writer;
use Mpdf\Strict;
use Mpdf\Mpdf;
final class JavaScriptWriter
{
use Strict;
/**
* @var \Mpdf\Mpdf
*/
private $mpdf;
/**
* @var \Mpdf\Writer\BaseWriter
*/
private $writer;
public function __construct(Mpdf $mpdf, BaseWriter $writer)
{
$this->mpdf = $mpdf;
$this->writer = $writer;
}
public function writeJavascript() // _putjavascript
{
$this->writer->object();
$this->mpdf->n_js = $this->mpdf->n;
$this->writer->write('<<');
$this->writer->write('/Names [(EmbeddedJS) ' . (1 + $this->mpdf->n) . ' 0 R ]');
$this->writer->write('>>');
$this->writer->write('endobj');
$this->writer->object();
$this->writer->write('<<');
$this->writer->write('/S /JavaScript');
$this->writer->write('/JS ' . $this->writer->string($this->mpdf->js));
$this->writer->write('>>');
$this->writer->write('endobj');
}
}
|