New poppler demo

315 views
Skip to first unread message

王璐

unread,
Nov 24, 2013, 11:56:38 PM11/24/13
to emscripte...@googlegroups.com
Hi all,

   Recent I updated poppler in the emscripten repo, and managed to make it works: https://github.com/kripken/emscripten/pull/1854

   The old demo is down, as well as many demos on the same site, I wonder if they are still maintained. Anyway I'm interested in creating a new one myself on Github, and I'll post back once I make it running.

   I wonder if you have ever compared the old poppler demo with pdf.js:

   - Size: The old one was pretty big (12M), but now it has become much smaller, around 5M (probably thanks to closure compiler?). PDF.js seems to be around 3M without closure (but it does not support closure so far).
   - Features: I'd bet that poppler supports much more PDF features due to its long history and reception, but also I rarely see the messages showing that some PDF is not supported by PDF.js yet, so PDF.js should have also supported most useful features.
   - Speed: Might be an interesting comparison, but I cannot predict the result at all.

   Since I did not find anything with Google, I wonder if you guys have any discussion with PDF.js guys. I guess that it might be interesting to replace the PDF parsing code of PDF.js with a compiled poppler.

   What do you think?


    regards,
    - Lu Wang

Alon Zakai

unread,
Nov 25, 2013, 1:31:29 PM11/25/13
to emscripte...@googlegroups.com
I did discuss this with someone working on pdf.js once. I think overall, pdf.js will potentially be faster since it can render using the browser's hardware acceleration, while compiled poppler will use software rendering. But poppler will be more precise in rendering in some cases. Definitely the comparison would be interesting to do.

- Alon



--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

jacob.b...@gmail.com

unread,
May 28, 2014, 2:42:43 PM5/28/14
to emscripte...@googlegroups.com
I just found this email by googling "emscripten poppler", as it is a mystery to me why such a solution hasn't obsoleted pdf.js yet.

The "hardware acceleration" argument doesn't hold water. GPUs are no silver bullet here. Typical text rendering is hard to make to utilize GPUs in a meaningful way, so benefits here should be considered speculative. On the other hand, there is no question that a plain software renderer could be an magnitude faster than PDF.js, as PDF.js is slower on my core i7 than XPDF was on my Athlon 12 years ago. Emscripten'ing and using WebGL to present the resulting surface (or, when WebGL is not available, Canvas 2D) should thus handily beat PDF.js.

Benoit

Alon Zakai

unread,
May 28, 2014, 4:33:13 PM5/28/14
to emscripte...@googlegroups.com
Well, I think the main issue is no one has taken the time to do a proper port of Poppler that is complete enough to compare to pdf.js. I do agree with you that it seems possible such a solution would have better performance. But until it is tested we can't be sure.

- Alon


--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

cosinus...@gmail.com

unread,
Jun 15, 2014, 10:22:52 PM6/15/14
to emscripte...@googlegroups.com
PDF.js also seems to draw the page by repeatedly calling ctx.fillText one character at a time, which I assume isn't too good from a hardware acceleration point of view?

Thanks
Liam Wilson
Reply all
Reply to author
Forward
0 new messages