Saturday, October 1, 2011

Document/Attachment Reader - Google


Hi,

In this post I will discuss about document reader I had to use in one of my project. The files that we upload, their contents can be easily viewed using this reader. This is a product of Google. This is how it looks like:


Code:

Implementation of the Google document reader is extremely simple. Here is what you need to acheive it.



<iframe src="http://docs.google.com/viewer?url=<?php echo urlencode(<URL_OF_THE_DOCUMENT>); ?>&amp;embedded=true" width="710" height="500" style="border: none;"></iframe>

This code will allow the document to be viewed in the reader. The only problem with this is, the file you want to show in the reader must be hosted in a Live IP.

Cheers!

No comments:

Post a Comment