NativeElixirPdfUtilities.HtmlToPdf.PageFurniture (native_elixir_pdf_utilities v0.9.0)
View SourceAdds opt-in running headers and footers to already paginated layout boxes.
Page furniture is rendered after body pagination so current and total page tokens are known. Templates use the normal HTML, style, layout, image, and font pipeline and are placed inside the page margin.
Summary
Functions
Adds configured running headers and footers to paginated pages.
Types
@type detailed_error() :: {error_reason(), NativeElixirPdfUtilities.Diagnostics.diagnostic()}
@type error_reason() ::
:invalid_css
| :invalid_document
| :invalid_encoding
| :invalid_html
| :invalid_layout
| :invalid_options
| :unsupported_glyph
| :unsupported_html
@type layout_tree() :: NativeElixirPdfUtilities.HtmlToPdf.Layout.layout_tree()
@type page() :: NativeElixirPdfUtilities.HtmlToPdf.Pagination.page()
@type render_option() :: NativeElixirPdfUtilities.HtmlToPdf.render_option()
Functions
@spec decorate([page()], layout_tree(), [render_option()]) :: {:ok, [page()]} | {:error, detailed_error()}
Adds configured running headers and footers to paginated pages.
Omitted, nil, and false page furniture leave pages unchanged. Configured
templates must fit inside the corresponding top or bottom margin in
layout_tree.