View Single Post
Old 11-02-2011, 06:49 AM   #33
user_none
Sigil & calibre developer
user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.user_none ought to be getting tired of karma fortunes by now.
 
user_none's Avatar
 
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
Quote:
Originally Posted by MrWarper View Post
Supposedly, the FireFox thingy will be different from the current Chrome PDF engine. Even so, a very common use for PDFs is as containers for a bunch of images. If that's the case, no conversion can be done, period. OTOH, rendering text as an image... shame on Google.
I'm not talking about Chrome's PDF engine. I posted the link to the demo of PDF.js that will run in any HTML5 capable browser (Chrome, Firefox, Safari...). The demo demonstrates what will be included in Firefox. I mentioned that I was using Chrome in the off chance that PDF.js has special handling for Firefox for selectable and copyable text.


Quote:
Originally Posted by MrWarper View Post
HTML5 is HTML. If the application extracts the PDF contents and shows them on screen the right way (not as images), it is converting PDF to HTML in the best possible way: to be displayed on the browser, which is nothing but an HTML viewer on steroids.
HTML5 is much more than HTML. and PDF.js is not converting the PDF to HTML then inserting the new elements into the DOM. It is using a Canvas element which:

Quote:
Originally Posted by wikipedia
The canvas element is part of HTML5 and allows for dynamic, scriptable rendering of 2D shapes and bitmap images. It is a low level, procedural model that updates a bitmap and does not have a built-in scene graph.
HTML is not produced by a canvas based system. It just just rendered much the same way say Acrobat or Foxit Reader render a PDF. This is smilar to how HTML5 games are written. They are not written by pushing out <p> elements. Javascript is used to manipulate drawing on a canvas.

Quote:
Originally Posted by MrWarper View Post
Whether you can use directly that HTML or not, for example saving the file as HTML, is a wholly different kettle of fish. Since it is open source, you can always get the code and use it to make a straight converter.
There is no HTML to use. It does produce HTML then insert it into the DOM. It renders. Again PDF.js is not useful here because it does not convert to HTML it renders using a series of drawing commands.
user_none is offline   Reply With Quote