pdftract/crates/pdftract-cli/src/inspect/render/mod.rs
jedarden 3d04ca5f6f feat(pdftract-5bu2k): implement render_columns inspector layer renderer
Implement dashed vertical lines at column boundaries for debugging
Phase 4.4 column detection. Each column boundary uses a different
color from an 8-color palette with distinct dash patterns for left vs
right boundaries.

- Created render_columns() function in inspect/render/columns.rs
- CSS classes: column-boundary column-left/right for toggleability
- Data attributes: column-index, boundary, x0, x1 for UI consumption
- 10 unit tests covering all functionality

Also fixed pre-existing compilation errors in extract.rs and render
test files where SpanJson/BlockJson structs were missing required
fields (color, confidence_source, flags, rendering_mode, lang, spans).

Closes: pdftract-5bu2k

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 04:52:46 -04:00

18 lines
512 B
Rust

//! Layer renderers for the inspector debug viewer.
//!
//! Each renderer generates SVG elements for a specific debugging layer.
//! All renderers follow a common pattern:
//!
//! ```rust
//! pub fn render_<name>(input: &[InputType]) -> Vec<String>
//! ```
//!
//! The returned Vec<String> contains SVG elements that are placed inside
//! a `<g class="layer-<name>">` group in the final output.
pub mod anchors;
pub mod blocks;
pub mod columns;
pub mod confidence_heatmap;
pub mod reading_order;
pub mod spans;