Open daksh-sehgal opened 4 months ago
I had the same problem:
pdf := fpdf.New("P", "mm", "A4", "./fonts")
pdf.AddUTF8Font("myfont", "", "font.ttf")
pdf.SetFont("myfont", "", 14)
pageWidth, _ := pdf.GetPageSize()
width := pageWidth - 30
pdf.MultiCell(width, 8, "该视频中共检测出 2 项格式问题,此类问题可能会导致:可能影响视频播放,影响播放体验", fpdf.BorderNone, fpdf.AlignLeft, false)
If you call splitText on a string such as "参照番号", it may have the last character removed for some widths. i.e. SplitText("参照番号", 18.46) returns ["参照番"].