Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
CSS Paged Media Module Level 3 (bugzilla.mozilla.org)
56 points by djoldman on March 22, 2023 | hide | past | favorite | 14 comments


I absolutely love the first reply. "Depends on what you mean by 'soon'. Probably not this year."

That was 18 years ago. That comment is old enough to vote.


Soon(tm).


Welcome to my life. Let's tap dance from one implementation to another as we wait for an eighteen year W3C draft to get implemented.

FlyingSaucer, prawn, itext, fpdf, PDFkit, pdftk, aaalllll the way to today: Paged.js, Weazy, and vivliostyle

Yeah yeah yeah, I know. Prince is great. That's fine. My customers don't want to pay that kind of cash to make PDFs and I agree with them. Especially a feature that should have made it into browser core almost two decades ago.

I long ago imagined a steamy scenario involving Adobe executives and W3C steering groups, but that back room orgy has grown to improbable durations by the current date.


Weasyprint is an excellent tool for converting HTML to PDF. It has supported CSS Paged Media Module for a while; this has been very useful for making printable PDFs from web pages.

Weasyprint seems to be one of the few HTML->PDF engines out there that doesn't depend on a browser engine. It's impressive just how much works (HTML, CSS, SVG, etc), given that this is a relatively simple project compared to a full-featured browser. Performance isn't bad, considering it is implemented in Python.


How well does it install on systems that don't run python web apps? (I.e. I have whatever python the distro comes with)

Currently reliant on wkhtmltopdf for a few client projects, and while it works it has some.. Oddities that if I can, I'd like to get rid of having to remember.


Unfortunately wkhtmltopdf seems to be sunsetted... it's GitHub repo was archived in January and there don't seem to be any plans to move development elsewhere. When its version of WebKit becomes too old to be useful, that'll sort of be it :(


Related discussion from yesterday https://news.ycombinator.com/item?id=35242299

There is some polifill for this spec https://pagedjs.org/documentation/


Has anyone used the polyfill? I've written a book using HTML and CSS and it was mostly fine but adding page numbers turned out to be the painful part.


I've used it with much success, it works pretty well but there's a lot of quirks and gotchas, nothing major but it can be cumbersome.


An 18 year old bug.

For comparison, Duke Nukem Forever took 14 years from announcement to release.


FWIW, Prince is the gold standard for producing PDFs from HTML/CSS/JS: https://www.princexml.com/

It's a paid product built and maintained by Håkon Wium Lie, the original developer of the CSS language (and the former CTO of the Opera browser company).


Are they making progress on this now? Every few years this comes up in my life. Have not been happy each time I've looked into it.


Agreed. No movement on WebKit either: https://bugs.webkit.org/show_bug.cgi?id=85062


I 100% think they should prioritize this. They've added a bunch of cool stuff to CSS, but half of it is useless unless they actually implement a standard document type of interface so that HTML can be used to create paged media.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: