diff --git a/sf_base/commons/common.py b/sf_base/commons/common.py index 579125f0..b90bf037 100644 --- a/sf_base/commons/common.py +++ b/sf_base/commons/common.py @@ -197,7 +197,7 @@ class PrintingUtils(models.AbstractModel): if buttom_text: # 在下方中间添加文字 - text = button_text + text = buttom_text text_width = c.stringWidth(text, "SimSun" if font_found else "Helvetica", 10) # 准确计算文字宽度 text_x = (page_width - text_width) / 2 # 文字居中对齐 text_y = margin + 20 # 文字位置靠近底部