pub struct HtmlRenderer;Expand description
Renders PDF page content as semantic HTML.
Implementations§
Source§impl HtmlRenderer
impl HtmlRenderer
Sourcepub fn render(chars: &[Char], tables: &[Table], options: &HtmlOptions) -> String
pub fn render(chars: &[Char], tables: &[Table], options: &HtmlOptions) -> String
Render characters and tables as HTML.
This is the main entry point. It:
- Extracts words from characters
- Groups words into text blocks
- Classifies blocks as headings, paragraphs, or lists
- Converts tables to HTML table elements
- Interleaves text and tables in reading order
Sourcepub fn render_text(chars: &[Char], options: &HtmlOptions) -> String
pub fn render_text(chars: &[Char], options: &HtmlOptions) -> String
Render characters as HTML (no tables).
Sourcepub fn table_to_html(table: &Table) -> String
pub fn table_to_html(table: &Table) -> String
Convert a table to HTML table element.
Auto Trait Implementations§
impl Freeze for HtmlRenderer
impl RefUnwindSafe for HtmlRenderer
impl Send for HtmlRenderer
impl Sync for HtmlRenderer
impl Unpin for HtmlRenderer
impl UnsafeUnpin for HtmlRenderer
impl UnwindSafe for HtmlRenderer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more