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

SignatureDescription
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)doubleDispatches a paragraph to the appropriate type-specific renderer.
layoutTextFragment(tf: TextFragment, builder: ContentStreamBuilder, resources: ResourceBuilder, ctx: LayoutContext)doubleLays out a TextFragment with word wrapping, font selection, and color.
resetNoteState()
layoutHeading(heading: Heading, builder: ContentStreamBuilder, resources: ResourceBuilder, ctx: LayoutContext)doubleLays 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)doubleLays 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.

See Also