kevin_zhangl 3 лет назад
Родитель
Сommit
e1f209af50

+ 3 - 3
common/libs/export/BaseExport.php

@@ -786,7 +786,7 @@ ORDER;
             // 设置行高
             $pdf->setCellHeightRatio(1);
             // 设置左、上、右的间距
-            $pdf->SetMargins('10', '10', '10');
+            $pdf->SetMargins('10', '0', '10');
             // 设置是否自动分页  距离底部多少距离时分页
             $pdf->SetAutoPageBreak(TRUE, '15');
             // 设置图像比例因子
@@ -799,8 +799,8 @@ ORDER;
             $pdf->AddPage();
             // 设置字体
             $pdf->SetFont('stsongstdlight', '', 10, '', true);
-//            $image = file_get_contents(\Yii::$app->basePath . '/../frontendEle/src/static/img/ngds-logo.jpg');
-//            $pdf->Image('@' . $image, 165, 5, 20, 10, 'JPG');
+            $image = file_get_contents(\Yii::$app->basePath . '/../frontendEle/src/static/img/ngds-logo.jpg');
+            $pdf->Image('@' . $image, 15, 12, 20, 7, 'JPG');
             $pdf->writeHTML($context);
             $pdf->Output($realFile, 'F');
 

+ 6 - 6
frontendApi/modules/v1/controllers/ShopController.php

@@ -701,7 +701,7 @@ ORDER;
         // 设置行高
         $pdf->setCellHeightRatio(1);
         // 设置左、上、右的间距
-        $pdf->SetMargins('10', '10', '10');
+        $pdf->SetMargins('10', '0', '10');
         // 设置是否自动分页  距离底部多少距离时分页
         $pdf->SetAutoPageBreak(TRUE, '15');
         // 设置图像比例因子
@@ -714,8 +714,8 @@ ORDER;
         $pdf->AddPage();
         // 设置字体
         $pdf->SetFont('stsongstdlight', '', 10, '', true);
-//        $image = file_get_contents(\Yii::$app->basePath . '/../frontendEle/src/static/img/ngds-logo.jpg');
-//        $pdf->Image('@' . $image, 165, 5, 20, 10, 'JPG');
+        $image = file_get_contents(\Yii::$app->basePath . '/../frontendEle/src/static/img/ngds-logo.jpg');
+        $pdf->Image('@' . $image, 15, 12, 20, 7, 'JPG');
         $pdf->writeHTML($context);
 
         ob_clean();
@@ -947,7 +947,7 @@ ORDER;
         // 设置行高
         $pdf->setCellHeightRatio(1);
         // 设置左、上、右的间距
-        $pdf->SetMargins('10', '10', '10');
+        $pdf->SetMargins('10', '0', '10');
         // 设置是否自动分页  距离底部多少距离时分页
         $pdf->SetAutoPageBreak(TRUE, '15');
         // 设置图像比例因子
@@ -960,8 +960,8 @@ ORDER;
         $pdf->AddPage();
         // 设置字体
         $pdf->SetFont('stsongstdlight', '', 10, '', true);
-//        $image = file_get_contents(\Yii::$app->basePath . '/../frontendEle/src/static/img/ngds-logo.jpg');
-//        $pdf->Image('@' . $image, 165, 5, 20, 10, 'JPG');
+        $image = file_get_contents(\Yii::$app->basePath . '/../frontendEle/src/static/img/ngds-logo.jpg');
+        $pdf->Image('@' . $image, 15, 12, 20, 7, 'JPG');
         $pdf->writeHTML($context);
 
         ob_clean();