This commit is contained in:
Mrx
2026-03-17 17:18:54 +08:00
parent 6f0a8e0519
commit 12ed1c81e3
16 changed files with 763 additions and 123 deletions

View File

@@ -1139,7 +1139,7 @@ func (pb *PageBuilder) addWatermark(pdf *gofpdf.Fpdf, chineseFontAvailable bool)
// 段前缩进宽度约两字符mm
const paragraphIndentMM = 7.0
// drawRichTextBlock 按段落与换行绘制文本块(还原 HTML 换行),超出 maxContentY 截断并显示 …
// drawRichTextBlock 按段落与换行绘制文本块(还原 HTML 换行)
// align: "C" 居中;"L" 左对齐。firstLineIndent 为 true 时每段首行缩进(段前两空格效果)。
func (pb *PageBuilder) drawRichTextBlock(pdf *gofpdf.Fpdf, text string, contentWidth, lineHeight float64, maxContentY float64, align string, firstLineIndent bool, chineseFontAvailable bool) {
pageWidth, _ := pdf.GetPageSize()