Print Production
Paper Presets
Start with a standard paper size — the preset gives you dimensions, units, and DPI:
(require '[eido.scene :as scene])
(scene/paper :a4)
;=> {:image/size [21.0 29.7] :image/units :cm :image/dpi 300}
(scene/paper :letter :landscape true)
;=> {:image/size [11.0 8.5] :image/units :in :image/dpi 300}
(scene/paper :a3 :dpi 600)
;=> {:image/size [29.7 42.0] :image/units :cm :image/dpi 600}Available sizes: :a3, :a4, :a5, :letter, :legal, :tabloid, :square-8.
Real-World Units
Describe geometry in centimeters, millimeters, or inches. with-units converts to pixels before rendering:
(-> (scene/paper :a4)
(assoc :image/background :white
:image/nodes
[{:node/type :shape/circle
:circle/center [10.5 14.85] ;; center of A4 in cm
:circle/radius 5.0 ;; 5 cm radius
:style/stroke {:color :black :width 0.1}}]) ;; 1mm stroke
scene/with-units
(eido/render {:output "print.tiff"}))
with-units walks the entire scene tree, scaling all spatial values (coordinates, radii, stroke widths, dash patterns, font sizes) while leaving non-spatial values (opacity, angles, colors) untouched.
Margins
Add margins to any scene with with-margin:
(-> (scene/paper :a4)
(assoc :image/nodes [,,,your artwork,,,])
(scene/with-margin 2.0) ;; 2cm margin on all sides
scene/with-units
(eido/render {:output "print.tiff"}))The margin clips artwork to the inset rectangle, giving you a clean border. Apply it before with-units.
Print-Ready Export
For archival output, use TIFF with DPI metadata:
;; TIFF with embedded DPI — the standard for print shops
(eido/render scene {:output "print.tiff" :dpi 300})
;; High-DPI PNG
(eido/render scene {:output "print.png" :dpi 300})
;; Or set DPI on the scene and it propagates automatically
(eido/render (assoc scene :image/dpi 300)
{:output "print.tiff"})TIFF supports LZW compression (default), deflate, or none. DPI metadata is embedded in the file header — print software reads it automatically.
Archival Manifests
For print editions, attach a manifest to every render:
(eido/render scene {:output "edition-01.tiff"
:dpi 300
:emit-manifest? true
:seed 42
:params params})The manifest records the full scene, parameters, Eido version, and timestamp — everything needed to reproduce the exact print years later.