Flow
Overview
Flow is a class in Aspose.PDF FOSS for TypeScript.
A flow layout container.
This class declares 14 methods for Flow objects in TypeScript programs.
Available methods include: AddCodeBlock, AddColumnBreak, AddFloatBox, AddFloatingBox, AddHeading, AddImage, AddList, AddMarkdown, AddParagraph, AddQuote, AddRule, AddTable, and 2 additional methods.
All public members are accessible to any TypeScript application after installing the Aspose.PDF FOSS for TypeScript package.
Methods
| Signature | Description |
|---|---|
constructor(doc: Document, options: FlowOptions) | Calls constructor(doc, options) on this Flow instance. |
AddParagraph(text: FlowText, options: FlowParagraphOptions) → this | Append a word-wrapped paragraph. |
AddHeading(level: number, text: FlowText, options: FlowHeadingOptions) → this | Append a word-wrapped heading. |
AddList(items: FlowListNode[], options: FlowListOptions) → this | Append a bullet (default) or numbered ({ ordered: true }) list. |
AddImage(data: Uint8Array, options: FlowImageOptions) → this | Append a raster image (JPEG/PNG) as its own flow block. |
AddRule(options: FlowRuleOptions) → this | Append a horizontal rule — a section divider, and Markdown’s thematic break. |
AddCodeBlock(text: string, options: FlowCodeOptions) → this | Append a preformatted code block. |
AddQuote(blocks: FlowElement[], options: FlowQuoteOptions) → this | Append a block quote: the given elements, indented behind a gutter bar. |
AddTable(t: TableBuilder, options: FlowTableOptions) → this | Append a table built with createTable, paginating by row across columns and pages. |
AddMarkdown(src: string | MdDocument, options: MarkdownFlowOptions) → MarkdownResult | Append a Markdown document: CommonMark 0.31.2, or GFM with { gfm: true }. |
AddColumnBreak() → this | Force the following content to start in the next column (next page if in the last column). |
AddFloatBox(box: FloatingBox, side: 'left' | 'right') → this | Float box to the left or right of the column; following flow text wraps in the narrowed channel beside it and resumes full width below. |
AddFloatingBox(box: FloatingBox, options: FlowBoxOptions) → this | Place box in the flow itself — a pull-quote, callout or formula card. |
Render() → Page[] | Lay out the queued content, appending fresh pages at the end of the document, and return those pages in order. |