Commit 3f40e840 by lujunyi

减小重要处方药品文字大小,防止重叠

parent 0e000050
...@@ -200,7 +200,7 @@ public function search() ...@@ -200,7 +200,7 @@ public function search()
if ($prescription->prescription_type == PrescriptionModel::PRESCRIPTION_TYPE_TCM) { if ($prescription->prescription_type == PrescriptionModel::PRESCRIPTION_TYPE_TCM) {
$lineHeight = 100; // 每3条数据换行后的行间距 $lineHeight = 100; // 每3条数据换行后的行间距
$horizontalSpacing = 350; // 每行中的每条记录之间的水平间距 $horizontalSpacing = 350; // 每行中的每条记录之间的水平间距
$xStart = 400; // 起始x坐标值 $xStart = 300; // 起始x坐标值
foreach ($medicines as $k => $medicine) { foreach ($medicines as $k => $medicine) {
// 每行显示3个记录,并且如果不是第一行,增加下一行的Y坐标 // 每行显示3个记录,并且如果不是第一行,增加下一行的Y坐标
if ($k % 3 == 0) { if ($k % 3 == 0) {
...@@ -215,7 +215,7 @@ public function search() ...@@ -215,7 +215,7 @@ public function search()
$medicineText = sprintf('%-12s %-12s', $medicine['drug_name'], "*{$medicine['num']}{$medicine['unit']}"); $medicineText = sprintf('%-12s %-12s', $medicine['drug_name'], "*{$medicine['num']}{$medicine['unit']}");
$img->text($medicineText, $xCoordinate, $yCoordinate, function ($font) { $img->text($medicineText, $xCoordinate, $yCoordinate, function ($font) {
$font->filename(public_path('static/fonts/SimHei.ttf')); $font->filename(public_path('static/fonts/SimHei.ttf'));
$font->size(40); $font->size(35);
$font->color('#000000'); $font->color('#000000');
$font->align('left'); $font->align('left');
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment