TCPDF and insert an image base64 encoded

后端 未结 4 1875
粉色の甜心
粉色の甜心 2021-01-05 23:38

I\'ve this string from Mysql db:

$img_base64_encoded = 

\'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+         


        
4条回答
  •  长情又很酷
    2021-01-06 00:15

    For those who generate an HTML variable for output, this is how I got it working: Note that I am generating a barcode using the tc-lib-barcode library found here

    $img_base64_encoded = 'data:image/png;base64,' . base64_encode($bobj->getPngData());
    $text.= '';
    

提交回复
热议问题