rdocx-layout 0.5.0

Layout engine for converting DOCX flow model to positioned frames
Documentation

rdocx-layout

rdocx-layout converts an assembled Word LayoutInput into positioned page frames. It owns DOCX style resolution, line breaking, table layout, and pagination. Use layout_document_deterministic for reproducible output with bundled fonts. Applications that start from a DOCX file should normally call the rendering methods on rdocx::Document instead.

use rdocx_layout::{LayoutInput, Result, layout_document_deterministic};

fn page_count(input: &LayoutInput) -> Result<usize> {
    Ok(layout_document_deterministic(input)?.pages.len())
}
[dependencies]
rdocx-layout = "0.5"