NativeElixirPdfUtilities.HtmlToPdf.Layout (native_elixir_pdf_utilities v0.9.0)
View SourceLayout engine for the native HTML-to-PDF renderer.
Lays out block text elements, inline text runs, box styling, lists, link annotation bounds, deterministic tables, a documented flexbox/grid subset, image boxes, embedded-font text metrics, and pagination metadata.
Summary
Functions
Converts a styled document tree into a layout tree.
Types
@type box() :: map()
@type layout_tree() :: %{ type: :layout, page_size: term(), margin: term(), margins: NativeElixirPdfUtilities.HtmlToPdf.PageGeometry.margins(), boxes: [box()] }
@type render_option() :: NativeElixirPdfUtilities.HtmlToPdf.render_option()
Functions
@spec layout(term(), term()) :: {:ok, layout_tree()} | {:error, :invalid_layout | :invalid_margin | :invalid_page_size}
Converts a styled document tree into a layout tree.