v0.1.3
Breaking Changes
This release simplifies text positioning with explicit vertical anchoring.
Removed
line_heightfield from text elements (rupdf renders single-line text only)
Added
vertical_anchorfield for text with values:"baseline"(default): y is the text baseline"cap_top": y is the top of capital letters"center": y is the midpoint between baseline and cap_top
Text Positioning
Text is now positioned using an explicit anchor point defined by:
- Horizontal (
align):"left"(default),"center","right" - Vertical (
vertical_anchor):"baseline"(default),"cap_top","center"
Example:
{
"type": "text",
"x": 100, "y": 200,
"text": "Hello",
"font": "myfont", "size": 12,
"align": "center",
"vertical_anchor": "center"
}Non-Text Elements
All non-text elements (rect, line, image, barcode, qrcode) use (x, y) as the top-left corner with no alignment support.
Installation
pip install rupdf==0.1.3