Closed
Description
Please check the title.
How can I resolve this?
code
use Spiritix\Html2Pdf\Converter;
use Spiritix\Html2Pdf\Input\UrlInput;
use Spiritix\Html2Pdf\Output\EmbedOutput;
$input = new UrlInput();
$input->setUrl($requestTmplUrl);
$converter = new Converter($input, new EmbedOutput());
$footerTemplate = <<<END
<div style="font-family: '游ゴシック体', 'Yu Gothic', YuGothic, 'ヒラギノ角ゴ Pro', 'Hiragino Kaku Gothic Pro', 'メイリオ', 'Meiryo', sans-serif; position: relative; margin: 0.5cm 1cm; font-size: 9px; width: 100%;">
<div style="position: absolute; left: 0; top: 0.5cm;">Site Title</div>
<div style="position: absolute; width: 100%; top: 0.5cm; text-align: center;">
<span class="pageNumber"></span> / <span class="totalPages"></span>
</div>
<div style="position: absolute; right: 0; top: 0.5cm;">$footerRight</div>
</div>
END;
$converter->setOptions([
'printBackground' => true,
'displayHeaderFooter' => true,
'margin' => array('top' => '1cm','right' => '1cm','bottom' => '0cm','left' => '1cm',),
'footerTemplate' => $footerTemplate,
]);
$output = $converter->convert();
$output->embed($title . ".pdf");
Metadata
Metadata
Assignees
Labels
No labels