Skip to main content

Crate oxipdf_html

Crate oxipdf_html 

Source
Expand description

oxipdf-html — HTML+CSS → StyledTree adapter for oxipdf.

Parses HTML5 documents and CSS stylesheets, resolves the cascade, and produces a StyledTree that the oxipdf engine can render to PDF.

§Example

use oxipdf_html::html_to_tree;

let html = r#"<h1>Hello</h1><p>World</p>"#;
let tree = html_to_tree(html).unwrap();

This crate is a consumer of oxipdf-ir, not part of the core engine. It sits in the same position as oxidoc-export — building a StyledTree from an input format.

Structs§

ConvertOptions
Options for HTML → StyledTree conversion.

Enums§

HtmlError
Error produced during HTML → StyledTree conversion.

Functions§

html_to_tree
Convert an HTML string to a StyledTree.
html_to_tree_with_css
Convert an HTML string to a StyledTree with additional CSS.
html_to_tree_with_options
Convert an HTML string to a StyledTree with full options.