Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

How To Display Blob Image On Tcpdf In Yii?

$
0
0
Is there a way to display a blob image in TCPDF in Yii? I've tried calling the function below but it just returns a blank picture.

My controller:
public function actionDisplayAgencyIcon()
{
        $info = BaseAgencyInfo::model()->find();
        $id = $info->agencyID;

        if($id == null || trim($id)=='') {
        echo "error in image, bad ID value [{$id}]";
        exit();
        }

        $model=BaseAgencyInfo::model()->find("agencyID = '{$id}'");

        if($model->agency_logo == null){
        echo "error in image, using ID [{$id}] ";
        exit();
        }

header('Content-Type: gif,jpeg,png');
echo $model->agency_logo;
}


So, any ideas how to achieve this?

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>