You might as well say Notepad or VI "just work" as HTML viewers.
Does that happen on all operating systems? With all printer drivers?
They were working on an SVG renderer to support proper vector printing still don’t think its done. They should have used SVG to begin with.
I actually like the idea of pdf.js, having a pure browser based pdf viewer is a good thing, really needs good vector print support though to be serious.
It's up to the browser to render the page to the printer, if it contains canvases they are sent as bitmaps, since thats what they are.
HTML elements and SVG are generally rendered as vector commands to the printer which might end up being postscript or pdf. So svg's are much lighter going to printer then high dpi canvases. They also looks much better too since the printer renders them to the final raster at native res say 600 dpi.
Other browsers use a native PDF renders that can do whatever it wants, not sure what PDFium does in Chrome/Edge maybe it just sends the PDF if it can determine the printer supports it, otherwise it does native print commands for sure, it does not send bitmaps.
The nice thing about pdf.js is it runs on platforms that have no pdf viewer built in but have a web browser or maybe a buggy built in one. You can also style and control it yourself and add features to it for your app making for tighter embedding. Also it can be updated independently of browser.
Seems to be derived from Foxit.