Euro Icon for CellFormat
Closed this issue · 2 comments
KarlChow92 commented
sbinet commented
UTF-8 handling is a bit cumbersome.
see:
https://pkg.go.dev/github.com/go-pdf/fpdf#example-Fpdf.CellFormat-Codepage
e.g.:
package main
import (
"log"
"github.com/go-pdf/fpdf"
)
func main() {
pdf := fpdf.New(fpdf.OrientationPortrait, "mm", "A4", "")
pdf.AddPage()
pdf.SetFont("Arial", "B", 16)
tr := pdf.UnicodeTranslatorFromDescriptor("")
pdf.Cell(40, 10, tr("Hello World! €"))
err := pdf.OutputFileAndClose("out.pdf")
if err != nil {
log.Fatal(err)
}
}
sbinet commented
(closing. feel free to reopen if that didn't answer your question)