News for hackers. Stuff that matters.
Re:PDFium: Chrome’s PDF rendering engine is now open-source by comex on Thursday May 22, 2014 @12:45AM (#7782155)
Well, Chrome could make this viewer not increase the surface area of the browser just by changing it to a NaCl plugin. After all, it already exposes the ability to run native code inside NaCl to the web. ;p

I like the concept of pdf.js, but it's still significantly slower, and thus provides a worse experience to the user, than native viewers.

Re:PDFium: Chrome’s PDF rendering engine is now open-source by Hengjie on Thursday May 22, 2014 @09:04AM (#7783587)
A large part of why PDF.js is slow is because it doesn't have text coalescing. http://www.NotablePDF.com/ is based on PDF.js and has a coalescing code in production which has improved performance substantially.

It's been a significant effort on our part, and we'll be contributing it back to the PDFjs code base. Opera also has a similar coalescing effort underway by Christian Krebs.

Re:PDFium: Chrome’s PDF rendering engine is now open-source by garblegarble on Thursday May 22, 2014 @01:17PM (#7784933)
Would you mind explaining what text coalescing is in this context?
Re:PDFium: Chrome’s PDF rendering engine is now open-source by ehsanu1 on Friday May 23, 2014 @12:02AM (#7787916)
Re:PDFium: Chrome’s PDF rendering engine is now open-source by pcwalton on Thursday May 22, 2014 @10:23AM (#7783983)
> Well, Chrome could make this viewer not increase the surface area of the browser just by changing it to a NaCl plugin. After all, it already exposes the ability to run native code inside NaCl to the web. ;p

Will V8 run inside NaCl? As I understand it, the NaCl JIT functionality is pretty slow for use cases like polymorphic inline caching.

> I like the concept of pdf.js, but it's still significantly slower, and thus provides a worse experience to the user, than native viewers.

Most of the issues in pdf.js are actually rendering-related, not JavaScript-related—that is, they wouldn't be fixed just by changing the language to native code.

Re:PDFium: Chrome’s PDF rendering engine is now open-source by bla2 on Thursday May 22, 2014 @06:27PM (#7786945)
> Will V8 run inside NaCl? As I understand it, the NaCl JIT functionality is pretty slow for use cases like polymorphic inline caching.

Would that matter for PDFs? I thought js in PDFs is mostly used for form validation, which isn't very compute-heavy.

Re:PDFium: Chrome’s PDF rendering engine is now open-source by zobzu on Thursday May 22, 2014 @01:34AM (#7782278)
i dont know, on recent computers, more often than not i dont really see a diff between pdf.js and others as a user.

it seems to only be an issue on really heavy pdfs, which are pretty rare

Re:PDFium: Chrome’s PDF rendering engine is now open-source by keeperofdakeys on Thursday May 22, 2014 @07:51AM (#7783317)
I've found pdf.js to be a negative user experience on most pdfs I try to view. From what I've read, this is mainly because pdf.js directly renders to a canvas, and doesn't store decoded vector information. Other readers seem to be able to zoom instantly, even for vector graphics.

Firefox also seems to register two separate mime-types for pdf, only giving an option to use pdf.js on one of them. I've yet to dig into firefox and fix this.

Re:PDFium: Chrome’s PDF rendering engine is now open-source by orbifold on Thursday May 22, 2014 @09:31AM (#7783719)
The speed of pdf.js on older computers is abysmal compared to native applications like okular.
Re:PDFium: Chrome’s PDF rendering engine is now open-source by Jyaif on Thursday May 22, 2014 @02:35AM (#7782442)
Think mobile.
Re:PDFium: Chrome’s PDF rendering engine is now open-source by Ygg2 on Thursday May 22, 2014 @03:27AM (#7782566)
On mobile (Android) both Fx and Chrome start downloading pdfs.
Re:PDFium: Chrome’s PDF rendering engine is now open-source by JohnTHaller on Friday May 23, 2014 @09:09AM (#7789138)
On mobile, both Firefox and Chrome download PDFs to be rendered by another app on Android. I'm unsure about Chrome on iOS. There is no Firefox for iOS because Apple.
Re:PDFium: Chrome’s PDF rendering engine is now open-source by gsnedders on Thursday May 22, 2014 @02:39PM (#7785492)
> Well, Chrome could make this viewer not increase the surface area of the browser just by changing it to a NaCl plugin. After all, it already exposes the ability to run native code inside NaCl to the web. ;p

AIUI from the NaCl guys, it already does.