3 ms·
PDF.js is a nightmare. Horribly slow to load large documents, slow to scroll or search, and utterly fails in the bigges thing PDF has going for it... PDF.js o
by axiolite 6y ago
PDF.js is a nightmare. Horribly slow to load large documents, slow to scroll or search, and utterly fails in the bigges thing PDF has going for it... PDF.js often doesn't display or print out the PDF like the original (cutting off parts, failing to rotate properly, etc).
You might as well say Notepad or VI "just work" as HTML viewers.
- maxerickson 6y agoYeah, it's weird that Firefox sends a poorly rendered bitmap to print PDF. Does that happen on all operating systems? With all printer drivers?
- SigmundA 6y agoIt renders to canvas to draw the pdf so all it has is a bitmap, hence the bitmap printing. To get decent quality with bitmap printing you have to do really high res which eats memory and is slow. 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.
- maxerickson 6y agoDon't a lot of printer drivers pretty much support pdf though?
- pjmlp 6y agoOnly the Laser class ones, and definitely not the cheapest models.
- SigmundA 6y agoThe browser has no way to send anything directly to the printer through javascript and probably not the best idea to let it either from a security perspective, especially PDF's. 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.
- musicale 6y ago"Just sort of works" is a great phrase that I intend to apply to a wide variety of software.
- wyqydsyq 6y agoI always thought Apple's slogan was hilarious because I basically interpreted it with emphasis on the "just". It just works. Like, only barely passes the bar for what could be considered working, only just.