Re:PDFium: Chrome’s PDF rendering engine is now open-source
by e12e on Thursday May 22, 2014 @01:39AM
(#7782292)
I don't really mind pdfjs being slow (it's not really slow enough that I've noticed) -- but it has some serious issues with printing/fonts (not sure quite which) -- even for "simple" pdfs from latex source (your typical paper or math homework) I've had to print from Adobe Acrobat (and, I think evince is also better -- but it's been a long while since I've printed from Linux -- for entirely unrelated reasons).
[ Parent
| on HN ]
Re:PDFium: Chrome’s PDF rendering engine is now open-source
by Hengjie on Thursday May 22, 2014 @09:13AM
(#7783622)
Latex documents are typically slow on PDFjs because it positions characters individually. I think it's because Latex has some specific formatting that the PDF spec/apps can't handle well enough. So for text selection PDFjs wraps each character with it's own absolutely positioned element. The massive number of DOM elements cause browsers to slow down to 5-6fps.
I've been working on coalescing the elements and you can see the fruits of my labour by dropping a PDF into https://web.notablepdf.com which is an annotation app based on PDF.js.
Re:PDFium: Chrome’s PDF rendering engine is now open-source
by omaranto on Thursday May 22, 2014 @11:42AM
(#7784383)
Oh, that explains why I thought PDF.js is horrible across the board! If you judged the source of PDF's solely by the ones I read, you'd think every PDF in the world is either produced by LaTeX or is a restaurant menu.
Are there statistics about what other sorts of PDF's people read? How else are PDF's made? I always assumed that people that use word processors would exchange files in their word processor's format, but maybe some people export to PDF? (I'm not familiar with the habits of word processor users.)
Re:PDFium: Chrome’s PDF rendering engine is now open-source
by Hengjie on Friday May 23, 2014 @12:46PM
(#7790111)
There aren't statistics that I know of. Though anecdotal evidence suggests that there's quite a lot of PDFs with this problem. There are a lot of people whom export to PDF because users then can't "edit" the file.
So far, coalescing works, but we've had to make substantial changes to a lot of places. The hard part is still ensuring it is compliant with PDF specs, which we're in the process of working through before we submit it as a patch to the PDF.js team.
Re:PDFium: Chrome’s PDF rendering engine is now open-source
by Steuard on Thursday May 22, 2014 @09:32AM
(#7783720)
Thank you for that explanation! LaTeX docs constitute the vast majority of PDFs that I view, and I've wondered for ages why PDF.js seemed to be so laggy so much of the time.