NativeElixirPdfUtilities.HtmlToPdf.Pagination (native_elixir_pdf_utilities v0.5.1)

View Source

Pagination stage for the native HTML-to-PDF renderer.

Milestone 7 splits layout output into deterministic PDF pages with page margins, automatic page breaks, manual page breaks, unbroken flow units, and repeated table headers.

Summary

Functions

Splits a layout tree into PDF pages.

Types

error_reason()

@type error_reason() :: :invalid_layout

page()

@type page() :: %{size: {float(), float()}, boxes: [term()]}

render_option()

Functions

paginate(layout_tree, opts \\ [])

@spec paginate(term(), [render_option()]) ::
  {:ok, [page()]}
  | {:error,
     {error_reason(), NativeElixirPdfUtilities.Diagnostics.diagnostic()}}

Splits a layout tree into PDF pages.