Builds PDF text drawing commands.
Supports:
- standard PDF fonts;
- font size;
- text color;
- left, center, and right alignment;
- positioning inside a defined width.
Summary
Functions
Generates the PDF commands required to draw one line of text.
Types
Functions
Generates the PDF commands required to draw one line of text.
Required options:
:x:y:font:resource_name
Optional options:
:size, defaults to12:color, defaults to black:width:align, defaults to:left
When :width is provided, the final X coordinate is calculated
according to :align.
Example
PaperForge.Graphics.Text.command(
"Centered title",
x: 72,
y: 740,
width: 450,
align: :center,
font: :helvetica_bold,
resource_name: "F2",
size: 24
)