Hi,
I have module bankinvoice and it generate qr code for banks. I want to add QR code picture to PDF template in file invoicepdf.tpl
I add all php code at the begin of file invoicepdf.tpl
... code .. code...
$qrcode = base64_encode($contents);
in callback php file i use this string to show it
<img style="width: 35mm; height: 35mm;" src="data:image/png;base64, <? echo $qrcode; ?>" />
and it show qr code.
Return to file invoicepdf.tpl
I try this
$pdf->writeHTML($qrcode, true, false, false, false, '');
and it show content in base64 result: BxCry.. ...sria7=
It's tell me that inserted code work good and i try to show it as image
$paymethhtml = '
<img style="width: 35mm; height: 35mm;" src="data:image/png;base64,
'.$qrcode.' />';
$pdf->writeHTML($paymethhtml, true, false, false, false, '');
but it not add QR (PDF generated as base, i think that i make something wrong. Please help to execute this string:
<img style="width: 35mm; height: 35mm;" src="data:image/png;base64, <? echo $qrcode; ?>" />
in file invoicepdf.tpl correctly to show QR in PDF.