Evgeny Posted February 20 Share Posted February 20 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. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.