php mpdf的使用,php – FontAwesome图标不会在使用mPDF生成的...

我正在使用mPDF来生成工资单.但是,生成后,工资单中的图标不会显示.它只留下一个空白区域:

图标应显示在突出显示的位置上.

到目前为止,这就是我所做的:

我正在使用Yii2 PHP框架,这是我的动作控制器:

public function actionPdf($id)

{

$model = $this->findModel($id);

$earnings = EarningDetails::find()->where(['payslip_id' => $model->_id, 'status' => 1])->all();

$deductions = DeductionDetails::find()->where(['payslip_id' => $model->_id, 'status' => 1])->all();

$html = $this->render('view', [

'model' => $model,

'earnings' => $earnings,

'deductions' => $deductions,

]);

$mpdf = new mPDF('c','A5-L','0','',0,4,1,1,0,0);

$mpdf->allow_charset_conversion = true;

$mpdf->charset_in = 'windows-1252';

$mpdf->SetTopMargin(0);

$user_password = User::find()->where(['_id' => $model->user_id ])->one();

$password = $user_password->fname.$user_password->lname;

$mpdf->SetProtection(array(), $password, $password);

$mpdf->WriteHTML($html);

$mpdf->Output('Payslip.pdf', 'D');

exit;

}

我错过了什么吗?请告诉我.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值