Accrue.Invoices.Layouts (accrue v0.3.0)

Copy Markdown View Source

HEEx layout wrappers for PDF (and optionally, shared email shells).

print_shell/1 assembles the four Accrue.Invoices.Components into a standalone HTML document suitable for ChromicPDF input.

Paper size via adapter options, NOT CSS paper rules (Pitfall 6)

Chromium reliably honors the ChromicPDF print_to_pdf options for paper size / margins (:paper_width, :paper_height, :margin_top, etc.), and does NOT reliably honor CSS paper-size rules. The layout therefore ships print-friendly CSS (body { margin: 0 }, page-break-inside: avoid on line-item rows) — paper size is a property of the PDF adapter call, not the template.

See accrue/guides/pdf.md for the full pitfall writeup.

Summary

Functions