Text
Letter spacing, text indent, and text decoration examples
Letter Spacing
Control the spacing between characters with positive values for wider spacing or negative for tighter.
::pdf-example{pdf="/pdfs/examples/22_letter_spacing.pdf"}
{
"page": {"size": "A4", "margins": "20mm"},
"body": [
{"row": {"cols": [
{"span": 12, "elements": [
{"type": "text", "content": "Letter Spacing Demo", "style": {"size": 20, "bold": true}},
{"type": "spacer", "height": "8mm"},
{"type": "text", "content": "Normal spacing (0pt)"},
{"type": "spacer", "height": "3mm"},
{"type": "text", "content": "Letter spacing 1pt", "style": {"letterSpacing": 1}},
{"type": "spacer", "height": "3mm"},
{"type": "text", "content": "Letter spacing 3pt", "style": {"letterSpacing": 3}},
{"type": "spacer", "height": "3mm"},
{"type": "text", "content": "WIDE HEADER", "style": {"size": 16, "bold": true, "letterSpacing": 5}},
{"type": "spacer", "height": "3mm"},
{"type": "text", "content": "Tight spacing -0.5pt", "style": {"letterSpacing": -0.5}}
]}
]}}
]
}
::
Text Decoration
Underline, strikethrough, and combined decorations.
::pdf-example{pdf="/pdfs/examples/24_text_decoration.pdf"}
{
"page": {"size": "A4", "margins": "20mm"},
"body": [
{"row": {"cols": [
{"span": 12, "elements": [
{"type": "text", "content": "Text Decoration Demo", "style": {"size": 20, "bold": true}},
{"type": "spacer", "height": "8mm"},
{"type": "text", "content": "Normal text without decoration"},
{"type": "spacer", "height": "4mm"},
{"type": "text", "content": "Underlined text for emphasis", "style": {"underline": true}},
{"type": "spacer", "height": "4mm"},
{"type": "text", "content": "Strikethrough text for deletions", "style": {"strikethrough": true}},
{"type": "spacer", "height": "4mm"},
{"type": "text", "content": "Combined underline and strikethrough", "style": {"underline": true, "strikethrough": true}},
{"type": "spacer", "height": "4mm"},
{"type": "text", "content": "Colored underlined text", "style": {"underline": true, "color": "#1565C0", "size": 14}},
{"type": "spacer", "height": "4mm"},
{"type": "text", "content": "Bold underlined heading", "style": {"bold": true, "underline": true, "size": 16}}
]}
]}}
]
}
::
Something unclear or missing on this page?