I am curious to know how the Google Docs PDF viewer works? It’s not a flash like scribd.com; it looks like pure HTML. Any idea how do they did it?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Google is simply serving up an an image (right click -> save as), with an overlay to highlight text.
You should check out this SO question where others go into more detail.
You should also look through the source of your PDF link, it would appear Google are passing the PDF link through to be converted into an image.
Example:
Edit
Also if you were to view the PDF viewer in Firefox with Firebug, you will notice that when you ‘highlight’ text it’s really only enabling a load of divs, I’m guessing Google scans the document using OCR, detects where the text is and provides a matrix of coordinates on which to base the div placement on, when you click and drag it introgates the mouse pointer location to determine which divs to display.