NativeElixirPdfUtilities.HtmlToPdf.Pagination (native_elixir_pdf_utilities v1.1.0)
View SourcePagination 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
Prepares validated placed pages for writing without paginating their content again.
Splits a layout tree into PDF pages.
Types
@type error_reason() :: :invalid_layout | :unsupported_html | :resource_limit_exceeded
@type render_option() :: NativeElixirPdfUtilities.HtmlToPdf.render_option()
Functions
@spec finalize([page()], map(), [render_option()]) :: {:ok, [page()]} | {:error, {atom(), NativeElixirPdfUtilities.Diagnostics.diagnostic()}}
Prepares validated placed pages for writing without paginating their content again.
@spec paginate(term(), [render_option()]) :: {:ok, [page()]} | {:error, {error_reason(), NativeElixirPdfUtilities.Diagnostics.diagnostic()}}
Splits a layout tree into PDF pages.