Open links in s PDF generated by mPDF embedded on a webpage in a new tab / window

I’m using mPDF to create a PDF from HTML via PHP.

<object id="pdfObject" class="pdf" data="<?php echo $pdf ?>"></object>

But when I click on an anchor link it’s not opening in a new tab. I tried target=‘_blank’ and pdf_open_window=‘1’ but it still opens in the same parent tab.

$html = "<html> ...
<a href='https://example.test/starter-monthly' target='_blank' pdf_open_window='1'>
Get Starter<br/>Monthly
</a>
... </html>";
$mpdf->WriteHTML($html);

How do I get anchor links to open in a new tab / window ?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.