Documentation
¶
Overview ¶
Package report 提供报告格式推断、flow 排版、字体加载与标准文档输出。
Index ¶
- Constants
- Variables
- func FromOutput(output string) (string, bool)
- func WriteOFD(ctx context.Context, w io.Writer, document *creator.Document) error
- func WritePDF(ctx context.Context, w io.Writer, document *creator.Document) error
- type Builder
- func (b *Builder) Block(kind string, level int, text string, style flow.TextStyle)
- func (b *Builder) Build() (*creator.Document, error)
- func (b *Builder) Callout(variant, title, text string)
- func (b *Builder) Heading(level int, text string, color *creator.Color)
- func (b *Builder) Paragraph(text string, color *creator.Color)
- func (b *Builder) Table(headers []string, rows [][]flow.TableCell, widths []float64, ...)
- type Font
- type TableOptions
Constants ¶
View Source
const Width = 174.0
Variables ¶
Functions ¶
Types ¶
type Builder ¶
Builder 累积报告内容,Build 统一返回文字准备或分页错误。
func (*Builder) Callout ¶ added in v0.1.9
Callout 添加带语义图标的提示框,标题不加入章节大纲。 文字准备扣除 flow 提示框两侧各 3mm 内边距及首块的图标占位。
type TableOptions ¶
type TableOptions struct {
// SplitRows 允许长单元格按完整文字行跨页续排,续页仍重复表头。
SplitRows bool
// ColumnAlign 按列设置表头和正文的水平对齐,空字符串沿用主题。
ColumnAlign []string
}
TableOptions 配置报告表格的跨页方式。
Click to show internal directories.
Click to hide internal directories.