v0.0.454
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m17s
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m17s
This commit is contained in:
parent
a55ee1a6ce
commit
d0d72167eb
@ -1,5 +1,5 @@
|
|||||||
package goext
|
package goext
|
||||||
|
|
||||||
const GoextVersion = "0.0.453"
|
const GoextVersion = "0.0.454"
|
||||||
|
|
||||||
const GoextVersionTimestamp = "2024-05-14T14:57:10+0200"
|
const GoextVersionTimestamp = "2024-05-14T15:10:27+0200"
|
||||||
|
@ -9,6 +9,7 @@ type WPDFBuilder struct {
|
|||||||
b *gofpdf.Fpdf
|
b *gofpdf.Fpdf
|
||||||
tr func(string) string
|
tr func(string) string
|
||||||
cellHeight float64
|
cellHeight float64
|
||||||
|
cellSpacing float64
|
||||||
fontName PDFFontFamily
|
fontName PDFFontFamily
|
||||||
fontStyle PDFFontStyle
|
fontStyle PDFFontStyle
|
||||||
fontSize float64
|
fontSize float64
|
||||||
@ -41,6 +42,7 @@ func NewPDFBuilder(orientation PDFOrientation, size PDFSize, unicode bool) *WPDF
|
|||||||
b: fpdfbuilder,
|
b: fpdfbuilder,
|
||||||
tr: tr,
|
tr: tr,
|
||||||
cellHeight: 5,
|
cellHeight: 5,
|
||||||
|
cellSpacing: 1,
|
||||||
}
|
}
|
||||||
|
|
||||||
b.SetMargins(PDFMargins{Left: 15, Top: 25, Right: 15}) // default values
|
b.SetMargins(PDFMargins{Left: 15, Top: 25, Right: 15}) // default values
|
||||||
@ -103,6 +105,10 @@ func (b *WPDFBuilder) SetFont(fontName PDFFontFamily, fontStyle PDFFontStyle, fo
|
|||||||
b.cellHeight = b.b.PointConvert(fontSize)
|
b.cellHeight = b.b.PointConvert(fontSize)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (b *WPDFBuilder) SetCellSpacing(h float64) {
|
||||||
|
b.cellSpacing = h
|
||||||
|
}
|
||||||
|
|
||||||
func (b *WPDFBuilder) Ln(h float64) {
|
func (b *WPDFBuilder) Ln(h float64) {
|
||||||
b.b.Ln(h)
|
b.b.Ln(h)
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,7 @@ func (b *WPDFBuilder) Cell(txt string, opts ...*PDFCellOpt) {
|
|||||||
txtTR := b.tr(txt)
|
txtTR := b.tr(txt)
|
||||||
|
|
||||||
width := float64(0)
|
width := float64(0)
|
||||||
height := b.cellHeight
|
height := b.cellHeight + b.cellSpacing
|
||||||
border := BorderNone
|
border := BorderNone
|
||||||
ln := BreakToNextLine
|
ln := BreakToNextLine
|
||||||
align := AlignLeft
|
align := AlignLeft
|
||||||
|
@ -91,7 +91,7 @@ func (b *WPDFBuilder) MultiCell(txt string, opts ...*PDFMultiCellOpt) {
|
|||||||
txtTR := b.tr(txt)
|
txtTR := b.tr(txt)
|
||||||
|
|
||||||
width := float64(0)
|
width := float64(0)
|
||||||
height := b.cellHeight
|
height := b.cellHeight + b.cellSpacing
|
||||||
border := BorderNone
|
border := BorderNone
|
||||||
align := AlignLeft
|
align := AlignLeft
|
||||||
fill := false
|
fill := false
|
||||||
|
Loading…
Reference in New Issue
Block a user