Hacker News new | ask | show | jobs
by djs070 3180 days ago
I would like to adopt something like this, but there are some pretty normal table functions in our current print solution that I don't know how to support in HTML.

E.g. on a multi-page invoice, show a sub-total row at the bottom of each page. Does anyone know how to create this kind of function?

3 comments

IIRC you can solve that using CSS for print media.

The browser will display a different CSS to the printer, so to speak.

Yes, and instead of px or em, you can use mm for css units (positioning, size, etc.).
Use a <tfoot> element (unless you're actually trying to show a sub-total of just the page you're looking at).
Yeah literally need to add an invoice subtotal for the items on that page
I'd be interested in this as well. The industry standard, PrinceXML, has a huge licensing fee (currently $3800 per server), but it's also rock solid, handles modern CSS, and has hooks for adding things like headers and footers for pages and tables.