Skip to content

Commit 78184f8

Browse files
committed
Fill text cell with FillColor
1 parent a2a0e7f commit 78184f8

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Diff for: fpdf.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -2817,9 +2817,9 @@ func (f *Fpdf) write(h float64, txtStr string, link int, linkStr string) {
28172817
if c == '\n' {
28182818
// Explicit line break
28192819
if f.isCurrentUTF8 {
2820-
f.CellFormat(w, h, string([]rune(s)[j:i]), "", 2, "", false, link, linkStr)
2820+
f.CellFormat(w, h, string([]rune(s)[j:i]), "", 2, "", true, link, linkStr)
28212821
} else {
2822-
f.CellFormat(w, h, s[j:i], "", 2, "", false, link, linkStr)
2822+
f.CellFormat(w, h, s[j:i], "", 2, "", true, link, linkStr)
28232823
}
28242824
i++
28252825
sep = -1
@@ -2854,15 +2854,15 @@ func (f *Fpdf) write(h float64, txtStr string, link int, linkStr string) {
28542854
i++
28552855
}
28562856
if f.isCurrentUTF8 {
2857-
f.CellFormat(w, h, string([]rune(s)[j:i]), "", 2, "", false, link, linkStr)
2857+
f.CellFormat(w, h, string([]rune(s)[j:i]), "", 2, "", true, link, linkStr)
28582858
} else {
2859-
f.CellFormat(w, h, s[j:i], "", 2, "", false, link, linkStr)
2859+
f.CellFormat(w, h, s[j:i], "", 2, "", true, link, linkStr)
28602860
}
28612861
} else {
28622862
if f.isCurrentUTF8 {
2863-
f.CellFormat(w, h, string([]rune(s)[j:sep]), "", 2, "", false, link, linkStr)
2863+
f.CellFormat(w, h, string([]rune(s)[j:sep]), "", 2, "", true, link, linkStr)
28642864
} else {
2865-
f.CellFormat(w, h, s[j:sep], "", 2, "", false, link, linkStr)
2865+
f.CellFormat(w, h, s[j:sep], "", 2, "", true, link, linkStr)
28662866
}
28672867
i = sep + 1
28682868
}
@@ -2882,9 +2882,9 @@ func (f *Fpdf) write(h float64, txtStr string, link int, linkStr string) {
28822882
// Last chunk
28832883
if i != j {
28842884
if f.isCurrentUTF8 {
2885-
f.CellFormat(l/1000*f.fontSize, h, string([]rune(s)[j:]), "", 0, "", false, link, linkStr)
2885+
f.CellFormat(l/1000*f.fontSize, h, string([]rune(s)[j:]), "", 0, "", true, link, linkStr)
28862886
} else {
2887-
f.CellFormat(l/1000*f.fontSize, h, s[j:], "", 0, "", false, link, linkStr)
2887+
f.CellFormat(l/1000*f.fontSize, h, s[j:], "", 0, "", true, link, linkStr)
28882888
}
28892889
}
28902890
}

0 commit comments

Comments
 (0)