JaroslavH Posted October 4, 2013 Share Posted October 4, 2013 Hi all, I want insert this QR code in to PDF invoice: <img alt="QR platba" src="http://api.paylibo.com/paylibo/generator/czech/image?accountNumber=2171532&bankCode=0800&amount=1599.00¤cy=CZK&vs=1234567890&message=ALZA.CZ&size=200"/> If i insert this code to invoice.tpl I get message TCPDF ERROR: [Image] Unable to get image: /home/www/.../www/cache/tcpdf/img_Op1TFs Thanks for advice. Jaroslav Link to comment Share on other sites More sharing options...
JaroslavH Posted October 22, 2013 Author Share Posted October 22, 2013 (edited) Hi, I partially solved it. To the file HTMLTemplate.php I added this: $image_path = 'cache/tcpdf/'.$order_number_1.'.png'; $filename = 'http://api.paylibo.com/paylibo/generator/czech/image?accountNumber=0250507904&bankCode=0300&amount='.$amount.'¤cy=CZK&vs='.$order_number_1.'&ks=0308&message=my_web.com&size=125'; copy($filename, $image_path); To the file invoice.tpl I added this: <img src="{$image_path}" style="padding-left:20px;width:125px; height:125px;"/> If I open PDF invoice in order summary, it is all OK. The image is created in the subdirectory cache/tcpdf. If I generate invoice or view invoice in administration I got this Err message: TCPDF ERROR: [Image] Unable to get image: cache/tcpdf/000000010.png The image does not create in the subdirectory cache/tcpdf. I need a script from HTMLTemplate.php place somewhere else? Thanks for advice. Edited October 22, 2013 by JaroslavH (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts