NativeElixirPdfUtilities.HtmlToPdf.PageFurniture (native_elixir_pdf_utilities v0.8.0)

View Source

Adds 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

detailed_error()

error_reason()

@type error_reason() ::
  :invalid_css
  | :invalid_document
  | :invalid_encoding
  | :invalid_html
  | :invalid_layout
  | :invalid_options
  | :unsupported_glyph
  | :unsupported_html

layout_tree()

page()

render_option()

Functions

decorate(pages, layout_tree, opts)

@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.