Expand description
Layout engine for Apache FOP
This crate implements the layout algorithms that transform the FO tree into an area tree suitable for rendering.
§Architecture
The layout process follows these steps:
- Area Tree Generation: Convert FO tree to area tree
- Block Layout: Position block-level areas vertically
- Inline Layout: Position inline-level areas horizontally with line breaking
- Page Breaking: Split content across pages
§Example
use fop_layout::LayoutEngine;
use fop_core::FoArena;
// Assume we have an FO tree in `arena`
let engine = LayoutEngine::new();
let area_tree = engine.layout(&arena).unwrap();Re-exports§
pub use area::Area;pub use area::AreaId;pub use area::AreaTree;pub use area::AreaType;pub use layout::properties::measure_text_width;pub use layout::ColumnWidth;pub use layout::KnuthPlassBreaker;pub use layout::LayoutEngine;pub use layout::ListLayout;pub use layout::ListMarkerStyle;pub use layout::PageBreaker;pub use layout::TableLayout;
Modules§
Enums§
- FopError
- Base error type for FOP operations
Type Aliases§
- Result
- Result type alias for FOP operations