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:
So, any ideas how to achieve this?
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?