Module - Embedded Google Docs Viewer
OverviewThe Embedded Google Docs Viewer module adds a new formatter to the File field using the Field API. This formatter displays PDFs, Microsft Word documents, Powerpoint presentations, or Excel spreadsheets directly within a Drupal node.
RequirementsThe Embedded Google Docs Viewer is a custom formatter for the Core "Field" module - therefore the "Field" module must be enabled.
Any files to be formatted/rendered by this module must be accessible on the open web - Google needs to be able to access them in order for Google Docs to be able to format them - so your Drupal system must not be behind a firewall, must be reachable by normal web users, and your system must store the files as "public:".
TutorialsTo use this module and add embedded documents to your Drupal nodes, add a "File" field to one of your site's Content Types. Under the "Manage Fields" tab, add appropriate "Allowed file extensions," i.e. one or more of pdf, doc, docx, xls, xlsx, ppt, or pptx. Then under the "Manage Display" tab, select "Embedded Google Docs Viewer" as the field formatter. From then on you will be able to upload/add and display pdfs, etc. to the content type to which you added the new field.
When displaying a page containing an Embedded Google Docs field, the formatter builds an iframe within the current node using the url of the file to construct a larger url for Google's embeddable Google Docs viewer. That combined Google url is the source for the iframe's content. The iframe is stylable (as much as any iframe is) using the CSS selector ".gdoc-field". The default values for .gdoc-field are included in the project's file "gdoc_field.css."
For Drupal 6 -
Use Iframe module and this google service https://docs.google.com/viewer