Package-level declarations

Types

Link copied to clipboard
data class BorderSides(val top: BorderStroke? = null, val right: BorderStroke? = null, val bottom: BorderStroke? = null, val left: BorderStroke? = null)

Per-side border spec for a container.

Link copied to clipboard
data class BorderStroke(val width: Dp, val color: PdfColor, val style: LineStyle = LineStyle.Solid)

Outline drawn around a container.

Link copied to clipboard
data class CornerRadius(val topLeft: Dp = Dp.Zero, val topRight: Dp = Dp.Zero, val bottomLeft: Dp = Dp.Zero, val bottomRight: Dp = Dp.Zero)

Per-corner radius spec for a container.

Link copied to clipboard
data class DropShadow(val color: PdfColor = PdfColor(0f, 0f, 0f, 0.18f), val offsetX: Dp = Dp.Zero, val offsetY: Dp = Dp(2f), val blur: Dp = Dp(6f))

Soft shadow drawn behind a decorated container (card, box, column, row).

Link copied to clipboard

Italic vs normal. Renderers may synthesize italic if the font has no italic glyphs.

Link copied to clipboard
value class FontWeight(val value: Int)

Font weight on the standard 100..900 axis. Renderers map this to the closest available weight in the resolved font.

Link copied to clipboard
data class GradientStop(val offset: Float, val color: PdfColor)

One colour stop along a gradient.

Link copied to clipboard

Stroke pattern applied to lines, dividers, and shape outlines.

Link copied to clipboard
data class PdfColor(val red: Float, val green: Float, val blue: Float, val alpha: Float = 1.0f)

RGBA color, components in 0f..1f.

Link copied to clipboard
sealed interface PdfFont

A resolvable font. Three flavours are supported:

Link copied to clipboard
sealed interface PdfPaint

Visual recipe used to fill a vector path. Either a flat colour or a smooth gradient.

Link copied to clipboard
data class TableBorder(val color: PdfColor = PdfColor.Gray, val width: Dp = Dp(0.5f), val showOutline: Boolean = true, val showHorizontalLines: Boolean = true, val showVerticalLines: Boolean = true)

Border configuration for a com.conamobile.pdfkmp.dsl.table.

Link copied to clipboard
data class TableCellStyle(val padding: Padding = Padding.all(Dp(8f)), val verticalAlignment: VerticalAlignment = VerticalAlignment.Top, val horizontalAlignment: HorizontalAlignment = HorizontalAlignment.Start, val background: PdfColor? = null)

Per-cell visual style. Defaults are sensible for body cells; the com.conamobile.pdfkmp.dsl.TableScope.header DSL applies its own sensible defaults on top.

Link copied to clipboard
sealed interface TableColumn

Width specification for one column of a com.conamobile.pdfkmp.dsl.table.

Link copied to clipboard

Horizontal alignment of wrapped lines inside a TextStyle's paragraph box.

Link copied to clipboard

Base direction of a paragraph.

Link copied to clipboard

What to do with text that exceeds TextStyle.maxLines.

Link copied to clipboard

Vertical script position of a rich-text span.

Link copied to clipboard
data class TextStyle(val fontSize: Sp = 12.sp, val fontWeight: FontWeight = FontWeight.Normal, val fontStyle: FontStyle = FontStyle.Normal, val color: PdfColor = PdfColor.Black, val font: PdfFont = PdfFont.Default, val letterSpacing: Sp = Sp.Zero, val lineHeight: Sp = Sp.Zero, val underline: Boolean = false, val strikethrough: Boolean = false, val align: TextAlign = TextAlign.Start, val maxLines: Int? = null, val overflow: TextOverflow = TextOverflow.Clip, val script: TextScript = TextScript.None, val direction: TextDirection = TextDirection.Auto, val minLinesBeforeBreak: Int = 1, val minLinesAfterBreak: Int = 1, val hyphenation: HyphenationPatterns? = null, val kashidaJustify: Boolean = false)

Visual style applied to a piece of text.

Functions

Link copied to clipboard

Resolves TextDirection.Auto against actual text: the first strong directional character wins, mirroring the UAX#9 paragraph-level rule. Strings with no strong characters (digits, punctuation) read as LTR.