Key-value pair component for PDF documents.
Renders aligned label-value rows, like invoice details or profile info.
Examples
doc |> Pdf.Component.KeyValue.render({50, 700}, %{width: 300}, [
{"Name:", "John Doe"},
{"Email:", "john@example.com"},
{"Role:", "Admin"}
])
Summary
Functions
Calculate the total height this key-value list will occupy, accounting for word-wrap on long values.
Render key-value pairs at {x, y}.
Functions
Calculate the total height this key-value list will occupy, accounting for word-wrap on long values.
Takes the same style map as render/4 plus the pairs list.
Returns the height in points.
Render key-value pairs at {x, y}.
Style options
:width— total width (default300):font— font name (default"Helvetica"):font_size— text size (default10):label_color— label text color:value_color— value text color:line_height— row spacing (default18):label_width— fraction of width for labels (default0.35):divider— show divider between rows (defaultfalse):divider_color— divider line color:striped— alternate row backgrounds (defaultfalse):stripe_color— background for even rows:value_align—:left(default) or:rightto right-align values:label_bold— bold labels (defaulttrue):value_bold— bold values (defaultfalse)