|
|
@@ -830,10 +830,11 @@ ORDER;
|
|
|
$pdf->AddPage();
|
|
|
// 设置字体
|
|
|
$pdf->SetFont('stsongstdlight', '', 10, '', true);
|
|
|
- $image = file_get_contents(\Yii::$app->basePath . '/../frontendEle/src/static/img/ngds-logo.jpg');
|
|
|
- if (!file_exists($image)) {
|
|
|
- $image = file_get_contents(\Yii::$app->runtimePath . '/uploads/ngds-logo.jpg');
|
|
|
+ $image_file = \Yii::$app->basePath . '/../frontendEle/src/static/img/ngds-logo.jpg';
|
|
|
+ if (!file_exists($image_file)) {
|
|
|
+ $image_file = \Yii::$app->runtimePath . '/uploads/ngds-logo.jpg';
|
|
|
}
|
|
|
+ $image = file_get_contents($image_file);
|
|
|
|
|
|
$pdf->Image('@' . $image, 15, 12, 20, 7, 'JPG');
|
|
|
$pdf->writeHTML($context);
|
|
|
@@ -1108,10 +1109,11 @@ ORDER;
|
|
|
// 设置字体
|
|
|
$pdf->SetFont('stsongstdlight', '', 10, '', true);
|
|
|
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
|
|
|
- $image = file_get_contents(\Yii::$app->basePath . '/../frontendEle/src/static/img/ngds-logo.jpg');
|
|
|
- if (!file_exists($image)) {
|
|
|
- $image = file_get_contents(\Yii::$app->runtimePath . '/uploads/ngds-logo.jpg');
|
|
|
+ $image_file = \Yii::$app->basePath . '/../frontendEle/src/static/img/ngds-logo.jpg';
|
|
|
+ if (!file_exists($image_file)) {
|
|
|
+ $image_file = \Yii::$app->runtimePath . '/uploads/ngds-logo.jpg';
|
|
|
}
|
|
|
+ $image = file_get_contents($image_file);
|
|
|
$pdf->Image('@' . $image, 165, 5, 20, 10, 'JPG');
|
|
|
$pdf->writeHTML($context);
|
|
|
$pdf->Output($realFile, 'F');
|
|
|
@@ -1507,10 +1509,11 @@ ORDER;
|
|
|
$pdf->AddPage();
|
|
|
// 设置字体
|
|
|
$pdf->SetFont('stsongstdlight', '', 10, '', true);
|
|
|
- $image = file_get_contents(\Yii::$app->basePath . '/../frontendEle/src/static/img/ngds-logo.jpg');
|
|
|
- if (!file_exists($image)) {
|
|
|
- $image = file_get_contents(\Yii::$app->runtimePath . '/uploads/ngds-logo.jpg');
|
|
|
+ $image_file = \Yii::$app->basePath . '/../frontendEle/src/static/img/ngds-logo.jpg';
|
|
|
+ if (!file_exists($image_file)) {
|
|
|
+ $image_file = \Yii::$app->runtimePath . '/uploads/ngds-logo.jpg';
|
|
|
}
|
|
|
+ $image = file_get_contents($image_file);
|
|
|
$pdf->Image('@' . $image, 15, 12, 20, 7, 'JPG');
|
|
|
$pdf->writeHTML($context);
|
|
|
$pdf->Output($realFile, 'F');
|