LayoutEngine
Overview
LayoutEngine is a class in Aspose.Pdf FOSS for Java.
The main layout engine that converts high-level paragraph objects into PDF content stream bytes during {@code Document.save()}.
Methods
| Signature | Description |
|---|---|
LayoutEngine() | Creates a new LayoutEngine. |
setPageNumbering(pageNumber: int, totalPages: int) | Sets the page numbering context for $p / $P variable substitution. |
layout(page: Page) | Performs layout on a page, converting its paragraphs into a PDF content stream. |
layoutParagraph(para: BaseParagraph, builder: ContentStreamBuilder, resources: ResourceBuilder, ctx: LayoutContext) → double | Dispatches a paragraph to the appropriate type-specific renderer. |
layoutTextFragment(tf: TextFragment, builder: ContentStreamBuilder, resources: ResourceBuilder, ctx: LayoutContext) → double | Lays out a TextFragment with word wrapping, font selection, and color. |
resetNoteState() | |
layoutHeading(heading: Heading, builder: ContentStreamBuilder, resources: ResourceBuilder, ctx: LayoutContext) → double | Lays out a Heading paragraph, rendering it as a TOC entry with optional |
| dot leader line and page number. | |
layoutTable(table: Table, builder: ContentStreamBuilder, resources: ResourceBuilder, ctx: LayoutContext) → double | Lays out a Table with borders, backgrounds, and cell content. |
layoutStamps(page: Page, builder: ContentStreamBuilder, resources: ResourceBuilder) | Applies stamp overlays (TextStamp, ImageStamp, PageNumberStamp) to the page. |
layoutTextStamp(stamp: TextStamp, builder: ContentStreamBuilder, resources: ResourceBuilder, pageWidth: double) | Lays out a TextStamp at its specified position. |