Commit 44d2a560 by lujunyi

处方单调整

parent 207978d4
...@@ -59,13 +59,19 @@ public function search() ...@@ -59,13 +59,19 @@ public function search()
$imageWidth = 1653; $imageWidth = 1653;
// 手动调整 X 坐标以居中 // 手动调整 X 坐标以居中
$centerX = $imageWidth / 2; $centerX = $imageWidth / 2;
$img->text('江阴康恒诊所处方', $centerX, 110, function ($font) { $img->text('江阴康恒诊所处方', $centerX, 70, function ($font) {
$font->filename(public_path('static/fonts/SimHei.ttf')); $font->filename(public_path('static/fonts/SimHei.ttf'));
$font->size(72); $font->size(72);
$font->color('#000000'); $font->color('#000000');
$font->align('center'); // 使用 align('center') 以确保文本相对于 X 坐标居中 $font->align('center'); // 使用 align('center') 以确保文本相对于 X 坐标居中
$font->valign('top'); // 确保文本垂直对齐方式 $font->valign('top'); // 确保文本垂直对齐方式
}); });
// 处方单编号
$img->text('处方单编号:10000001', 1170, 190, function ($font) {
$font->filename(public_path('static/fonts/SimHei.ttf'));
$font->size(24);
$font->color('#000000');
});
// 姓名 // 姓名
$img->text('周永福', 410, 260, function ($font) { $img->text('周永福', 410, 260, function ($font) {
$font->filename(public_path('static/fonts/SimHei.ttf')); $font->filename(public_path('static/fonts/SimHei.ttf'));
......
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