Google Docs Viewer Api

Google Docs Viewer Api Average ratng: 6,5/10 8815 votes

Join the DZone community and get the full member experience.

  1. Google Docs Pdf Viewer Api
Viewer

Google Drive Viewer: Non-PDF files (fileviewer URL) To view Google Drive docs from fileviewer links, use the file ID as the srcid attribute in the iframe. The file ID for your PDF (one that is already in Google Drive) can be found in the PDFs web address.

Join For Free

Here's a short example of the usage of the Google Viewer and Google Docs embeds (see here). If you want to embed a view of any file on Google Drive/Docs you can do this by putting a pdf preview (the file could be in any format, see first example, which is a Google text document) in an iframe or, in the case of spreadsheets, the speradsheet itself into an iframe.
The second embed below shows the latest outcome of an online questionnaire and in the speradsheet that holds the result the new answers to the questoinnaire are updated every 5 minutes after refreshing the view. So, you can, i.e., make an online questoinnaire with a Google form and display the results like below. With a little tweaking of the parameters, which I obviously haven't done yet, the result would of course be more visually appealing.
If you try for one of your files you just need to replace the id/key in the URL:

Viewer

Like This Article? Read More From DZone

Published at DZone with permission of Kay Cichini , DZone MVB. See the original article here.

Google Docs Pdf Viewer Api

Opinions expressed by DZone contributors are their own.

Comments are closed.