Closed sredxny closed 4 years ago
Use SetDrawColor()
to set the border color and false for the fill flag in CellFormat()
.
package main
import (
"fmt"
"github.com/jung-kurt/gofpdf/v2"
)
func main() {
pdf := gofpdf.New("L", "mm", "A4", "")
pdf.SetFont("Helvetica", "", 18)
pdf.AddPage()
pdf.SetDrawColor(0xff, 0x33, 0x44)
pdf.CellFormat(50, 30, "Hello, world", "1", 0, "CM", false, 0, "")
err := pdf.OutputFileAndClose("cell.pdf")
if err != nil {
fmt.Print("%s\n", err)
}
}
@jung-kurt thank you so much. It works!
Hi, is possible to set a color to the border of the cells without filling the cell by itself?