Flow
Overview
Flow is a type in Aspose.PDF FOSS for Go.
Flow is a document generator that lays content out top-to-bottom and paginates automatically — the “flow” counterpart to the Rectangle-based drawing API.
This type provides 11 methods for working with Flow objects in Go programs.
Available methods include: AddColumnBreak, AddFloatBox, AddFloatingBox, AddHeading, AddImage, AddImageAlt, AddList, AddParagraph, AddSpacer, AddTable, Render.
All public members are accessible to any Go application after installing the Aspose.PDF FOSS for Go package.
Methods
| Signature | Description |
|---|---|
AddParagraph(text: string, style: TextStyle) → *Flow | AddParagraph appends a paragraph of flowing text (wraps and splits across pages). |
AddHeading(level: int, text: string, style: TextStyle) → *Flow | AddHeading appends a heading of the given level (1–6). |
AddImage(path: string, width: float64) → *Flow | AddImage appends an image scaled to width×height points. |
AddImageAlt(path: string, width: float64, alt: string) → *Flow | AddImageAlt is AddImage with alternate text (used when the flow is tagged). |
AddTable(t: *Table) → *Flow | AddTable appends a table (paginated when taller than a page). |
AddList(items: []string, ordered: bool, style: TextStyle) → *Flow | AddList appends a bulleted (ordered=false) or numbered list. |
AddSpacer(height: float64) → *Flow | AddSpacer appends vertical space. |
AddColumnBreak() → *Flow | AddColumnBreak forces the following content to start in the next column (or, from the last column, on the next page). |
AddFloatingBox(box: *FloatingBox) → *Flow | AddFloatingBox appends a floating box, which takes its measured height in the flow (moving to a new page if it does not fit). |
Render() → (int, error) | Render lays out the queued elements into the document and returns the number of pages the flow occupies. |
AddFloatBox(box: *FloatingBox, side: FloatSide, width: float64) → *Flow | AddFloatBox appends a floated box pinned to the given side at width points; the paragraphs that follow wrap around it until the text passes its bottom. |