open-nav
    Preparing search index...

    Function renderInvoiceHtml

    • Render an invoice as a self-contained, printable HTML document.

      HTML rather than PDF on purpose. A Hungarian invoice needs ő and ű, which are outside the WinAnsi encoding the PDF core fonts use, so a dependency-free PDF would need a bundled and licensed font to spell the language correctly. HTML gets the typography right, needs nothing bundled, and turns into a PDF with any browser:

      chromium --headless --print-to-pdf=invoice.pdf invoice.html
      

      The output carries no external references, so it renders identically offline and archives as a single file.

      Parameters

      Returns string