Documentation
¶
Overview ¶
Package painter
Package painter
Index ¶
- Constants
- type Cell
- type Color
- type HeadCell
- type Painter
- type PdfPainter
- func (p *PdfPainter) AddPage(wh ...float64) error
- func (p *PdfPainter) Barcode(code string, x, y, w, h float64) error
- func (p *PdfPainter) BarcodeWithTransform(code string, x, y, w, h, h2, angle float64) error
- func (p *PdfPainter) GetName() string
- func (p *PdfPainter) Init(resource string) error
- func (p *PdfPainter) Line(x1, y1, x2, y2, width float64, isDash bool) error
- func (p *PdfPainter) MiShape(x, y, w float64, wordNum int) error
- func (p *PdfPainter) MiShapeWithPinyin(text, font, fontStyle string, fontSize, x, y, w, hPinyin float64) error
- func (p *PdfPainter) Output(writer io.Writer) error
- func (p *PdfPainter) Picture(pic string, x, y, w, h float64) error
- func (p *PdfPainter) QRCode(code string, x, y, w, h float64) error
- func (p *PdfPainter) Rect(styleStr string, x, y, w, h float64) error
- func (p *PdfPainter) RectText(text, font, fontStyle string, fontSize, hPerLine, x, y, w, h float64, ...) error
- func (p *PdfPainter) Table(startX, startY float64, table *Table) error
- func (p *PdfPainter) Text(text, font, fontStyle string, fontSize, x, y, w, h float64, align string, ...) error
- func (p *PdfPainter) TextWithTransform(text, font, fontStyle string, fontSize, x, y, w, h, h2, angle float64, ...) error
- type Table
- type TableHead
- type TableRow
Constants ¶
View Source
const ( FontSimhei = "simhei" FontNone = "" FontBold = "B" FontItalic = "I" AlignNone = "" AlignCenterMiddle = gofpdf.AlignCenter + gofpdf.AlignMiddle AlignLeftMiddle = gofpdf.AlignLeft + gofpdf.AlignMiddle AlignRightMiddle = gofpdf.AlignRight + gofpdf.AlignMiddle )
FontSimhei ...
View Source
const ( Nonespan = 0 Colspan = 1 Rowspan = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Painter ¶
type Painter interface { Init(resource string) error GetName() string AddPage(wh ...float64) error Line(x1, y1, x2, y2, width float64, isDash bool) error Text(text, font, fontStyle string, fontSize, x, y, w, h float64, align string, color *Color, border string) error TextWithTransform(text, font, fontStyle string, fontSize, x, y, w, h, h2, angle float64, align string, color *Color) error RectText(text, font, fontStyle string, fontSize, hPerLine, x, y, w, h float64, color *Color) error Barcode(code string, x, y, w, h float64) error BarcodeWithTransform(code string, x, y, w, h, h2, angle float64) error Picture(pic string, x, y, w, h float64) error Rect(styleStr string, x, y, w, h float64) error QRCode(code string, x, y, w, h float64) error Table(startX, startY float64, font, fontStyle string, fontSize float64, table *Table) error MiShapeWithPinyin(text, font, fontStyle string, fontSize, x, y, w, hPinyin float64) error Output(writer io.Writer) error }
type PdfPainter ¶
type PdfPainter struct {
// contains filtered or unexported fields
}
func NewPdfPainter ¶
func NewPdfPainter(w float64, h float64) *PdfPainter
func NewPdfPainterResource ¶
func NewPdfPainterResource(w float64, h float64, resource string) (*PdfPainter, error)
func (*PdfPainter) AddPage ¶
func (p *PdfPainter) AddPage(wh ...float64) error
func (*PdfPainter) BarcodeWithTransform ¶
func (p *PdfPainter) BarcodeWithTransform(code string, x, y, w, h, h2, angle float64) error
func (*PdfPainter) GetName ¶
func (p *PdfPainter) GetName() string
func (*PdfPainter) Init ¶
func (p *PdfPainter) Init(resource string) error
func (*PdfPainter) Line ¶
func (p *PdfPainter) Line(x1, y1, x2, y2, width float64, isDash bool) error
func (*PdfPainter) MiShapeWithPinyin ¶
func (p *PdfPainter) MiShapeWithPinyin(text, font, fontStyle string, fontSize, x, y, w, hPinyin float64) error
func (*PdfPainter) RectText ¶
func (p *PdfPainter) RectText(text, font, fontStyle string, fontSize, hPerLine, x, y, w, h float64, color *Color) error
func (*PdfPainter) TextWithTransform ¶
Click to show internal directories.
Click to hide internal directories.