News for hackers. Stuff that matters.
Re:PDF Reader in JavaScript by rdamico on Wednesday June 15, 2011 @02:23PM (#2658396)
At Crocodoc we tested out a similar approach using the Canvas element to render pages, but ultimately opted to go the @font-face route for a number of reasons, including:

- Near-instant client-side rendering (albeit a one-time ~5 second wait during server-side processing)

- Native font rendering (Canvas rasterizes all text and doesn't benefit from technologies like ClearType)

- Native text selection (which is important for overall UX and our annotation tools such as highlighting)

- Better performance on mobile devices (this is an ongoing project)

Here's a comparison of the test file micheljansen links to (thanks!) compared with the same PDF in Crocodoc:

- Canvas rendering: http://bit.ly/kU0mlW

- Crocodoc rendering: http://bit.ly/je2wcv

Edit: By the way, we're really impressed by this canvas implementation :-)

Re:PDF Reader in JavaScript by swah on Wednesday June 15, 2011 @03:01PM (#2658548)
I had never heard of crocodoc and was very impressed with this rendering. What browsers do you guys support?
Re:PDF Reader in JavaScript by peterlai on Wednesday June 15, 2011 @03:04PM (#2658554)
IE7 - IE9, Firefox, Chrome, and Safari
Re:PDF Reader in JavaScript by swah on Wednesday June 15, 2011 @03:08PM (#2658569)
So why hasn't Google bought them?
Re:PDF Reader in JavaScript by tomp on Wednesday June 15, 2011 @05:18PM (#2659062)
Wow, I'm impressed at how well it renders math. Great job guys!

http://crocodoc.com/EfqW081

Re:PDF Reader in JavaScript by pbreit on Wednesday June 15, 2011 @02:27PM (#2658414)
The only reason this project is interesting is because it does not use any server side processing (beyond serving).
Re:PDF Reader in JavaScript by bfirsh on Wednesday June 15, 2011 @02:48PM (#2658499)
I expect PDFs could be rendered client-side with @font-face by using data URIs.
Re:PDF Reader in JavaScript by fbnt on Thursday June 16, 2011 @04:04AM (#2660460)
Crocodoc looks great! Just out of curiosity: do you have a set of fonts ready to deliver to the client in order to make the font-face approach work? What do you do if the PDF if using some obscure font type? Are you using Poppler for server side processing?
Re:PDF Reader in JavaScript by swah on Wednesday June 15, 2011 @05:23PM (#2659083)
Do you guys also (plan to) build directly from LaTex?
Re:PDF Reader in JavaScript by lordlarm on Wednesday June 15, 2011 @03:10PM (#2658581)
Any plans on supporting Opera? The rendering on 11.11 is a little off, and canvas rendering does not work.