我想在codeigniter中显示我专门选择要生成为pdf的事件的图像。附件是我的tcpdf代码的片段,以及我从数据库中获取图像的方式之一。
//tcpdf code
$title = <<<EOD
<h3>QR Code</h3>
EOD;
$pdf->WriteHTMLCell(0, 0, '', '',$title, 0, 1, 0, true, 'C', true);
foreach($events as $event){
$image = '';
}
$pdf->WriteHTMLCell(0, 0, '', '', $image, 0, 1, 0, true, 'C', true);
//sample view code as to how i get the image from database
<?php foreach ($events as $event): ?>
<img id="myImg" src="<?php echo base_url(); ?>/assets/eventImages/<?php
echo $event['eventImage']; ?>" alt="" >