Package-level declarations

Types

Link copied to clipboard

Receiver of box { ... }.

Link copied to clipboard
data class ChartSeries(val label: String, val value: Float, val color: PdfColor)

One datum in a chart: a human-readable label, a numeric value, and the color used to draw it.

Link copied to clipboard

Receiver inside column { ... }.

Link copied to clipboard
abstract class ContainerScope

Common parent of every scope that can hold child layout nodes (page body, column, row).

Link copied to clipboard

Receiver of pdf { ... }. Top-level entry of the DSL.

Link copied to clipboard

Receiver of encryption { ... }.

Link copied to clipboard

Receiver of freeDraw { ... } — collects vector paths authored in the node's local coordinate space.

Link copied to clipboard

Receiver inside grid { ... }. Each child added here becomes one grid cell, filled row-major.

Link copied to clipboard
data class LineSeries(val label: String, val points: List<Float>, val color: PdfColor)

One line in a multi-series lineChart.

Link copied to clipboard

Receiver of metadata { ... }.

Link copied to clipboard

Receiver of page { ... }.

Link copied to clipboard
class PathScope

Receiver of FreeDrawScope.path — records absolute path commands.

Link copied to clipboard
annotation class PdfDsl

Marks the receiver scopes of the PDF DSL so that nested scopes don't leak outer-scope members into inner blocks. Without this annotation a call like column { text { row { ... } } } would let text and row see each other's properties; with it the compiler rejects such cross-scope access.

Link copied to clipboard

Receiver of richText { ... }.

Link copied to clipboard

Receiver inside row { ... }.

Link copied to clipboard
data class StackedBarGroup(val label: String, val segments: List<StackedBarSegment>)

One group (single bar) in a stackedBarChart, built from stacked segments drawn bottom-to-top in list order.

Link copied to clipboard
data class StackedBarSegment(val label: String, val value: Float, val color: PdfColor)

One coloured segment within a stacked bar.

Link copied to clipboard

Receiver of header { ... } and row { ... } inside a TableScope.

Link copied to clipboard

Receiver of table { ... }.

Link copied to clipboard
class TextScope

Mutable receiver passed to the text("...") { ... } configuration block.

Functions

Link copied to clipboard
fun ContainerScope.barChart(series: List<ChartSeries>, width: Dp, height: Dp, showValues: Boolean = true, showAxis: Boolean = true, gridLines: Int = 0, axisColor: PdfColor = PdfColor.Gray, gridColor: PdfColor = PdfColor.LightGray)

Appends a vertical bar chart.

Link copied to clipboard
fun ContainerScope.donutChart(slices: List<ChartSeries>, diameter: Dp, holeRatio: Float = 0.55f, showLegend: Boolean = true)

Appends a donut chart — a pie with a circular hole punched in the centre.

Link copied to clipboard
fun ContainerScope.lineChart(series: List<LineSeries>, width: Dp, height: Dp, strokeWidth: Float = 2.0f, gridLines: Int = 0, showLegend: Boolean = true, axisColor: PdfColor = PdfColor.Gray, gridColor: PdfColor = PdfColor.LightGray)

Appends a multi-series line chart.

fun ContainerScope.lineChart(points: List<Float>, width: Dp, height: Dp, color: PdfColor = PdfColor.Blue, strokeWidth: Float = 2.0f, fillUnderLine: Boolean = false, gridLines: Int = 0, axisColor: PdfColor = PdfColor.Gray, gridColor: PdfColor = PdfColor.LightGray)

Appends a line chart.

Link copied to clipboard
fun ContainerScope.pieChart(slices: List<ChartSeries>, diameter: Dp, showLegend: Boolean = true)

Appends a pie chart.

Link copied to clipboard
fun ContainerScope.stackedBarChart(groups: List<StackedBarGroup>, width: Dp, height: Dp, showAxis: Boolean = true, gridLines: Int = 0, showLegend: Boolean = true, axisColor: PdfColor = PdfColor.Gray, gridColor: PdfColor = PdfColor.LightGray)

Appends a stacked bar chart.