3 ms·
The use case is when I buy a plane ticket it comes with a 3 page receipt and E-ticket, and rather than downloading a PDF, we can have HTML specify how to flow t
by teyc 7y ago
The use case is when I buy a plane ticket it comes with a 3 page receipt and E-ticket, and rather than downloading a PDF, we can have HTML specify how to flow the document into a document. It seems the necessary extensions are almost TeX like, alternating headers, columns, sections, page break.
HTML is already exceeding good at flow layout, we can flow text into desktop, mobiles. Why not extend the rules so they flow into a piece of A4 document, or two columns?
Another use case is reports, where there are tabular data, where headers should be repeated at the top of every page. Wouldn't it be nice if HTML/CSS could specify this instead of resorting to Crystal Reports? It'd certainly make us doubly productive.
- akersten 7y agoIn my opinion it's a first-principles kind of thing with respect to "what is the purpose of a web browser." To me, a web browser's purpose is to render markup into something useful for a user, dependent on variables like screen size, user preferences, browser zoom, accessibility needs, etc. A browser's purpose is not to render-a-document-as-an-A4-printout-specifically,-because-no-other-format-will-do. "Make it look exactly like this" is not an expectation we can or should have about web browsers, and this proposal is an attempt at that. Anyway, to specifically address your use cases: > The use case is when I buy a plane ticket it comes with a 3 page receipt and E-ticket, and rather than downloading a PDF, we can have HTML specify how to flow the document into a document HTML can already specify that document. Why does the browser care that it would be 3 different physical pages? Why would a user care? We're letting the tail wag the dog - just put the information in HTML. > Why not extend the rules so they flow into a piece of A4 document, or two columns? Two-column layouts are a concession of print formats due to constraints of needing to get all the other content onto the physical page. We don't have those constraints in Web, there's no need to introduce them. > Another use case is reports, where there are tabular data, where headers should be repeated at the top of every page. Wouldn't it be nice if HTML/CSS could specify this instead of resorting to Crystal Reports? It'd certainly make us doubly productive. If we're spinning up this whole AlmostPostscript.js thing to render a <table> with a sticky header, I really don't want to be a modern web developer anymore.
- dreix 7y agoYou're missing the point here. I have created an electron app that renders reports via json and svelte. They are intended for print not the web and the easiest way to get the data printed was using the browser engine which gladly outputs to PDF. However, styling these pages would be a lot easier with better page support in CSS. Or at least better support of those CSS specs. I really look forward to having these polyfills. Using paged media is in a lot of contexts easier than latex. Especially when it comes to dynamic content.
- baggy_trough 7y agoWhy shouldn't people be able to print nice looking versions of certain web pages, for example books or reports? I don't understand the objection.