Versions in this module Expand all Collapse all v0 v0.1.1 Feb 15, 2023 v0.1.0 Feb 15, 2023 Changes in this version + const BMP + const DIV_DASHED + const DIV_DOTTED + const DIV_NONE + const DIV_STRAIGHT + const FONT_BOLD + const FONT_IALIC + const FONT_NORMAL + const JPEG + const PNG + const TIFF + const TYPE_BLOCKQUOTE + const TYPE_CODE + const TYPE_CODESPAN + const TYPE_EM + const TYPE_HEADING + const TYPE_IMAGE + const TYPE_LINK + const TYPE_LIST + const TYPE_PARAGRAPH + const TYPE_SPACE + const TYPE_STRONG + const TYPE_TEXT + const WEBP + func CommonGenerateAtomicCell(children *[]mardown) (pagebreak, over bool, err error) + func Convert2JPEG(srcPath string, dstPath string) error + func ConvertBMP2JPEG(srcPath, dstPath string) (err error) + func ConvertPNG2JPEG(srcPath, dstPath string) (err error) + func ConvertTIFF2JPEG(srcPath, dstPath string) (err error) + func ConvertWEBP2JPEG(srcPath, dstPath string) (err error) + func DrawFiveCycle(srcPath string) + func DrawInnerFiveCycle(srcPath string) + func DrawPNG(srcPath string) + func DrawPlumCurve(srcPath string) + func DrawRotationOutCircle(srcPath string) + func DrawSunLine(srcPath string) + func GetImageWidthAndHeight(picturePath string) (w, h int) + type Div struct + func NewDiv(lineHeight, lineSpce float64, pdf *core.Report) *Div + func NewDivWithWidth(width float64, lineHeight, lineSpce float64, pdf *core.Report) *Div + func (div *Div) Copy(content string) *Div + func (div *Div) GenerateAtomicCell() error + func (div *Div) GetHeight() (height float64) + func (div *Div) GetWidth() (width float64) + func (div *Div) HorizontalCentered() *Div + func (div *Div) RightAlign() *Div + func (div *Div) SetBackColor(color string) *Div + func (div *Div) SetBorder(border core.Scope) *Div + func (div *Div) SetContent(content string) *Div + func (div *Div) SetFont(font core.Font) *Div + func (div *Div) SetFontColor(color string) *Div + func (div *Div) SetFontWithColor(font core.Font, color string) *Div + func (div *Div) SetFrameType(frameType int) *Div + func (div *Div) SetMarign(margin core.Scope) *Div + type HLine struct + func NewHLine(pdf *core.Report) *HLine + func (h *HLine) GenerateAtomicCell() + func (h *HLine) SetColor(color float64) *HLine + func (h *HLine) SetMargin(margin core.Scope) *HLine + func (h *HLine) SetWidth(width float64) *HLine + type Image struct + func NewImage(path string, pdf *core.Report) *Image + func NewImageWithWidthAndHeight(path string, width, height float64, pdf *core.Report) *Image + func (image *Image) GenerateAtomicCell() (pagebreak, over bool, err error) + func (image *Image) GetHeight() float64 + func (image *Image) GetWidth() float64 + func (image *Image) SetAutoBreak() + func (image *Image) SetMargin(margin core.Scope) *Image + type MarkdownText struct + func NewMarkdownText(pdf *core.Report, x float64, fonts map[string]string) (*MarkdownText, error) + func (mt *MarkdownText) GenerateAtomicCell() (err error) + func (mt *MarkdownText) SetTokens(tokens []Token) + type MdBlockQuote struct + func (a *MdBlockQuote) GenerateAtomicCell() (pagebreak, over bool, err error) + func (a *MdBlockQuote) GetType() string + func (a *MdBlockQuote) SetText(interface{}, ...string) + func (b *MdBlockQuote) SetToken(t Token) error + type MdHeader struct + func (a *MdHeader) GetType() string + func (a *MdHeader) SetText(interface{}, ...string) + func (h *MdHeader) CalFontSizeAndLineHeight(size int) (fontsize int, lineheight float64) + func (h *MdHeader) GenerateAtomicCell() (pagebreak, over bool, err error) + func (h *MdHeader) SetToken(t Token) (err error) + type MdImage struct + func (i *MdImage) GenerateAtomicCell() (pagebreak, over bool, err error) + func (i *MdImage) GetType() string + func (i *MdImage) SetText(_ interface{}, filename ...string) + type MdList struct + func (a *MdList) GetType() string + func (a *MdList) SetText(interface{}, ...string) + func (l *MdList) GenerateAtomicCell() (pagebreak, over bool, err error) + func (l *MdList) SetToken(t Token) error + func (l *MdList) String() string + type MdMutiText struct + func (a *MdMutiText) GenerateAtomicCell() (pagebreak, over bool, err error) + func (a *MdMutiText) GetType() string + func (a *MdMutiText) SetText(interface{}, ...string) + func (m *MdMutiText) SetToken(t Token) error + type MdParagraph struct + func (a *MdParagraph) GetType() string + func (a *MdParagraph) SetText(interface{}, ...string) + func (p *MdParagraph) GenerateAtomicCell() (pagebreak, over bool, err error) + func (p *MdParagraph) SetToken(t Token) error + type MdSpace struct + func (a *MdSpace) GetType() string + func (a *MdSpace) SetText(interface{}, ...string) + func (c *MdSpace) GenerateAtomicCell() (pagebreak, over bool, err error) + func (c *MdSpace) String() string + type MdText struct + func (a *MdText) GetType() string + func (c *MdText) GenerateAtomicCell() (pagebreak, over bool, err error) + func (c *MdText) GetSubText(x1, x2 float64) (text string, width float64, newline bool) + func (c *MdText) SetText(font interface{}, texts ...string) + func (c *MdText) String() string + type Span struct + func NewSpan(lineHeight, lineSpce float64, pdf *core.Report) *Span + func NewSpanWithWidth(width float64, lineHeight, lineSpce float64, pdf *core.Report) *Span + func (span *Span) Copy(content string) *Span + func (span *Span) GenerateAtomicCell() error + func (span *Span) GetHeight() (height float64) + func (span *Span) GetWidth() (width float64) + func (span *Span) HorizontalCentered() *Span + func (span *Span) RightAlign() *Span + func (span *Span) SetBorder(border core.Scope) *Span + func (span *Span) SetContent(content string) *Span + func (span *Span) SetFont(font core.Font) *Span + func (span *Span) SetFontColor(color string) *Span + func (span *Span) SetFontWithColor(font core.Font, color string) *Span + func (span *Span) SetHeight(height float64) *Span + func (span *Span) SetMarign(margin core.Scope) *Span + func (span *Span) VerticalCentered() *Span + type Table struct + func NewTable(cols, rows int, width, lineHeight float64, pdf *core.Report) *Table + func (table *Table) GenerateAtomicCell() error + func (table *Table) GetColWidth(row, col int) float64 + func (table *Table) NewCell() *TableCell + func (table *Table) NewCellByRange(w, h int) *TableCell + func (table *Table) SetLineHeight(lineHeight float64) + func (table *Table) SetMargin(margin core.Scope) + type TableCell struct + func (cell *TableCell) SetElement(e core.Cell) *TableCell + type TextCell struct + func NewTextCell(width, lineHeight, lineSpace float64, pdf *core.Report) *TextCell + func (cell *TextCell) Copy(content string) *TextCell + func (cell *TextCell) GenerateAtomicCell(maxheight float64) (int, int, error) + func (cell *TextCell) GetHeight() float64 + func (cell *TextCell) GetLastHeight() float64 + func (cell *TextCell) HorizontalCentered() *TextCell + func (cell *TextCell) RightAlign() *TextCell + func (cell *TextCell) SetBackColor(color string) *TextCell + func (cell *TextCell) SetBorder(border core.Scope) *TextCell + func (cell *TextCell) SetContent(s string) *TextCell + func (cell *TextCell) SetFont(font core.Font) *TextCell + func (cell *TextCell) SetFontColor(color string) *TextCell + func (cell *TextCell) SetFontWithColor(font core.Font, color string) *TextCell + func (cell *TextCell) TryGenerateAtomicCell(maxheight float64) (int, int) + func (cell *TextCell) VerticalCentered() *TextCell + type Token = lex.Token