views:

71

answers:

2

Guys, Google Books Viewer and Docs Viewer are driving me crazy, do you know how they are working PLEASE?

For example: Google Docs Viewer: http://docs.google.com/viewer?url=http://labs.google.com/papers/bigtable-osdi06.pdf

It seems that books/docs are stored/being converted to IMAGES, you can know this by righting click a page and then choose "open image in a new tab" or you will discover this when you CTRL+S the page and see its downloaded files, or by your naked eye.

But how on earth they highlight the text on these images when you search the book/doc?! and in docs viewer you CAN even SELECT THE TEXT and CTRL+C to copy it!

Thank you very much.

A: 

Please take a look at this:

http://docs.google.com/viewer?url=http://labs.google.com/papers/bigtable-osdi06.pdf&docid=9f1cd921dbb6656c2c9e57f83f73d70e&a=bi&pagenumber=1&w=800

It is one of the images linked on the page. You see it is not a SVG. In SVG in Google Chrome you can select some text, then click on Inspect Element to see its HTML, but in Google Docs you can not see the HTML, you will find just an empty div.

Also in Google Books, you can not select the text to copy it! However, Google can highlight it!

Moutaz Shams
Maybe they put an SVG on the top of a normal PNG in Google Docs which lets you select and copy the text, but they just use a PNG in Google Books? But how do they highlight the text on Google Books?!
Moutaz Shams
You should edit your original post, not add an answer :P
Callum Rogers
I am sorry, I am lost here and do not have a login! I only have Link and Flag options on the original post!
Moutaz Shams
Also it works on IE, so it is not based on SVG!
Moutaz Shams
A: 

I believe they convert all document into PDF and extract those layout (text position & text). And then try generate a new PNG file with hidden DIV tag that contains text & positioned them in the original position.

james