News for hackers. Stuff that matters.
Re:WebAssembly: A New Hope by flavio81 on Wednesday August 09, 2017 @01:43PM (#14971700)
TL:DR; They have written a PS & PDF renderer that runs completely in the client, by using web-assembly. They show the performance to be not so far off using native code, and this allows offloading the CPU load of PDF rendering to the client rather than the server.

Excellent !!

Re:WebAssembly: A New Hope by mpweiher on Wednesday August 09, 2017 @02:43PM (#14972326)
Correction: last I checked, they didn't write the PDF renderer themselves, it is Google's PDFium[1] which was open-sourced a while ago. Before they were using Apple's built in PDF engine, but apparently that had too many bugs for them.

It does not do Postscript, the "PS" in PSPDFKit are the initials of the creator, Peter Steinberger (really nice guy, by the way!). Two/three letter prefixes are common in Objective-C as there are no namespaces (I use MPW).

[1] https://pdfium.googlesource.com

Re:WebAssembly: A New Hope by robocop2018 on Thursday August 10, 2017 @01:59PM (#14982333)
mpweiher, you are correct! PSPDF is a pdfium lipstick. You can find its license in binary sdk-s or simply ask them. Included or derived work must be disclosed!

Also using the pdfium via Enscripten is not news (https://github.com/coolwanglu/PDFium.js is 3 years old).

On commercial, battle tested side PDFTron offers PDFNetJS & WebViewer for years https://blog.pdftron.com/2015/11/10/pdfnetjs-html5-pdf-viewe... (http://xodo.com/app is the demo referenced in the presentation).

Re:WebAssembly: A New Hope by favorited on Wednesday August 09, 2017 @04:42PM (#14973387)
Based on Peter's blog post[0] a few years ago, I was under the impression they wrote their own.

Maybe steipete can chime in?

[0]https://pspdfkit.com/blog/2016/a-pragmatic-approach-to-cross...

Re:WebAssembly: A New Hope by mpweiher on Wednesday August 09, 2017 @05:08PM (#14973622)
Hmmm...don't remember where I got that information from, so I could well be remembering wrong.

I do see that pspdfkit folk are active in the pdfium bug tracker, for example:

https://bugs.chromium.org/p/pdfium/issues/detail?id=641

That sounds like a production problem, but it could just as well be them trying it out.

Re:WebAssembly: A New Hope by eridius on Wednesday August 09, 2017 @06:53PM (#14974513)
It's certainly quite plausible that they compare their behavior with other engines, and then file bugs on those other engines if they find them.
Re:WebAssembly: A New Hope by flavio81 on Wednesday August 09, 2017 @03:10PM (#14972568)
Thanks, i thought PS stood for "postscript"!
Re:WebAssembly: A New Hope by agumonkey on Wednesday August 09, 2017 @04:11PM (#14973119)
My latest laptop is from 2009 and I very very very rarely complain about pdf.js performance.
Re:WebAssembly: A New Hope by jamesXswift on Wednesday August 09, 2017 @01:44PM (#14971715)
If anyone has any questions I'll try and answer if I can.
Re:WebAssembly: A New Hope by greenhouse_gas on Wednesday August 09, 2017 @02:03PM (#14971910)
Did you show it to Mozilla or Google? It seems that it can replace PDF.JS and whatever closed-source PDF reader chrome uses.
Re:WebAssembly: A New Hope by moosingin3space on Wednesday August 09, 2017 @02:05PM (#14971935)
Chrome's PDF reader is actually open-source: https://pdfium.googlesource.com/pdfium/
Re:WebAssembly: A New Hope by greenhouse_gas on Wednesday August 09, 2017 @02:10PM (#14972000)
Re:WebAssembly: A New Hope by mpweiher on Wednesday August 09, 2017 @04:01PM (#14973032)
And as far as I know it's the engine they're using.