Table of Contents

Class LayoutBox

Namespace
SimpleSign.HtmlToPdf.Layout
Assembly
SimpleSign.HtmlToPdf.dll

Represents a positioned box in the layout tree. Uses top-down Y coordinates during layout (0 = top of content area). The renderer flips Y to PDF coordinates (bottom-up).

public sealed class LayoutBox
Inheritance
LayoutBox
Inherited Members

Properties

Children

Gets the child boxes.

public List<LayoutBox> Children { get; }

Property Value

List<LayoutBox>

ContentLeft

Gets the content left edge (after margin+border+padding).

public float ContentLeft { get; }

Property Value

float

ContentTop

Gets the content top edge (after margin+border+padding).

public float ContentTop { get; }

Property Value

float

Height

Gets or sets the content height in points.

public float Height { get; set; }

Property Value

float

ImageSource

Gets or sets the image source path or data URI.

public string? ImageSource { get; set; }

Property Value

string

LinkUrl

Gets or sets the link URL for clickable text.

public string? LinkUrl { get; set; }

Property Value

string

Marker

Gets or sets the list marker string (e.g., "•", "1.").

public string? Marker { get; set; }

Property Value

string

Node

Gets the source DOM node (for style access).

public HtmlNode? Node { get; init; }

Property Value

HtmlNode

Style

Gets the computed style snapshot.

public ComputedStyle Style { get; init; }

Property Value

ComputedStyle

Text

Gets or sets the text content for inline text boxes.

public string? Text { get; set; }

Property Value

string

TotalHeight

Gets the total box height including margin, border, and padding.

public float TotalHeight { get; }

Property Value

float

TotalWidth

Gets the total box width including margin, border, and padding.

public float TotalWidth { get; }

Property Value

float

Type

Gets the box type.

public LayoutBoxType Type { get; init; }

Property Value

LayoutBoxType

Width

Gets or sets the content width in points.

public float Width { get; set; }

Property Value

float

X

Gets or sets the X position relative to page content area.

public float X { get; set; }

Property Value

float

Y

Gets or sets the Y position relative to page content area.

public float Y { get; set; }

Property Value

float