edof

edof Documentation

Reference documentation for the edof Python library — a tool for programmatic document creation, template filling, and high-quality export. Documents are described in code or in a small ZIP-based file format, then rendered to PNG, JPEG, TIFF, BMP, PDF, or SVG.

This documentation covers every public function, class, and method, plus practical recipes for common tasks.

Where to start

If you have never used edof, read in this order:

  1. Installation — how to install edof and which optional features need extra packages
  2. Quick start — a 10-minute tour covering the 80% most useful features
  3. Reference: Document & Page — the basic document model

If you have a specific task in mind, jump straight to:

Reference

Complete API reference, organized by topic:

Topic What’s inside
01 — Document & Page edof.new, Document, Page, persistence, validation
02 — Objects TextBox, ImageBox, Shape, QRCode, Table, Group, common fields
03 — Styles TextStyle, FillStyle, StrokeStyle, Gradient, ShadowStyle, CellBorder, Transform
04 — Variables & Templates Variable types, define_variable, fill_variables, placeholders, repeat_objects
05 — Export PDF (vector / raster), bitmap formats, SVG, multi-page, printing
06 — Import import_pdf, EDOF 2 legacy import, version migration
07 — Encryption Passwords, permission levels, set_password, unlock, recovery keys, per-object locks
08 — Editor The PyQt6 desktop editor — features, shortcuts, dialogs
09 — CLI edof-cli and all its subcommands
10 — Helpers add_card, add_metric, add_kv_list, row(), column(), make_table, measure_text_height

Advanced

Topic What’s inside
.edof file format ZIP layout, JSON schema, manifest format, encrypted archive structure
Extending edof Adding custom object types, custom serialization
Troubleshooting Common issues and how to fix them

Conventions used in this documentation

Measurements — All sizes and positions are in millimetres (mm) unless stated otherwise. Object opacity is 0.01.0. Colors are RGB or RGBA tuples in 0255 range, e.g. (50, 80, 160, 255).

Coordinate system(0, 0) is the top-left corner of the page. X increases rightward, Y increases downward.

Code examples — Examples that need only the core library (pip install edof) are unmarked. Examples requiring an optional extra are tagged like:

Requires pip install edof[crypto]

Version

This documentation is for edof 4.0.3.