Problem with Image in Yii PDF


I have a problem with displaying jpg images in Yii PDF. In my PDF page JPG images are not displayed but png images displaying correctly. Here is the code I used:

<?php echo CHtml::image(‘admin/64.jpg’, ‘DORE’); ?>

<?php echo CHtml::image(‘admin/12.png’, ‘DORE’); ?> // displaying correctly

I have also tried this too

<img src="data:image/png;base64,<?php echo base64_encode(file_get_contents("admin/64.jpg")); ?>" />

It is also not working

Any help is greatly appreciated…

Thanks in advance

Hi bro,

try with

<?= Html::img('url img');?>


Not working!! Fatal Error!!

You may use this software at pdf-to-jpg-convert[dot]en[dot]softonic[dot]com it will help you more for all type of file conversion.