This commit is contained in:
胡尧
2025-05-15 14:39:40 +08:00
parent c2e4085b50
commit e6d8ebb7b3

View File

@@ -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 # 文字位置靠近底部