Skip to main content

Crate pdfboss_markdown

Crate pdfboss_markdown 

Source
Expand description

Markdown to PDF composition for pdfboss, taking CommonMark+GFM source and a CSS theme as input. It produces a pdfboss_write::Pdf alongside a replace-and-report Report of anything sanitized along the way. Given the same markdown and options, to_pdf always emits the same bytes: no clock, no randomness, no environment dependence.

Re-exports§

pub use block::Block;
pub use block::CellAlign;
pub use block::ListItem;
pub use block::Run;
pub use report::Report;

Modules§

block
The Markdown block tree: a CommonMark+GFM document parsed into blocks and inline runs, independent of any layout or wrapping concern.
report
Character replacement and sanitizing report for Markdown rendering. Tracks unencodable characters and HTML fragments skipped during composition.

Structs§

Options
Composition options for to_pdf.
Pdf
A document under construction. The fields are the composition: singleton slots are Options, pages keep the order given.
StyleError
A located parse failure. line and column are 1-indexed.
Theme
A theme: cascade of CSS rules resolved into concrete styles by element.

Enums§

Error
Errors raised while laying out or writing a Markdown-composed document.
PageSize
A page size, in default user-space units (1/72 inch), portrait.

Functions§

to_pdf
Parses markdown, lays it out under options, and emits a pdfboss_write::Pdf ready to serialize, alongside a Report of unencodable characters replaced and raw HTML fragments skipped.