Skip to content

Instantly share code, notes, and snippets.

@izazueta
Last active July 20, 2023 09:32
Show Gist options
  • Save izazueta/4961650 to your computer and use it in GitHub Desktop.
Save izazueta/4961650 to your computer and use it in GitHub Desktop.
Google Docs Viewer & Office Web Apps Viewer

Google Docs Viewer

Only files under 25 MB can be previewed with the Google Drive viewer.

Google Drive viewer helps you preview over 16 different file types, listed below:

  • Image files (.JPEG, .PNG, .GIF, .TIFF, .BMP)
  • Video files (WebM, .MPEG4, .3GPP, .MOV, .AVI, .MPEGPS, .WMV, .FLV)
  • Text files (.TXT)
  • Markup/Code (.CSS, .HTML, .PHP, .C, .CPP, .H, .HPP, .JS)
  • Microsoft Word (.DOC and .DOCX)
  • Microsoft Excel (.XLS and .XLSX)
  • Microsoft PowerPoint (.PPT and .PPTX)
  • Adobe Portable Document Format (.PDF)
  • Apple Pages (.PAGES)
  • Adobe Illustrator (.AI)
  • Adobe Photoshop (.PSD)
  • Tagged Image File Format (.TIFF)
  • Autodesk AutoCad (.DXF)
  • Scalable Vector Graphics (.SVG)
  • PostScript (.EPS, .PS)
  • TrueType (.TTF)
  • XML Paper Specification (.XPS)
  • Archive file types (.ZIP and .RAR)

Google Docs Viewer (Apps)

https://docs.google.com/a/[DOMINIO]/viewer?url=[FILE_URL]

Google Docs Viewer

https://docs.google.com/a/[DOMINIO]/viewer?url=[FILE_URL]

##Office Web Apps Viewer ('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

Pantalla completa

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

Incrustado dentro de un 'iframe'

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

Info: http://www.labnol.org/internet/google-docs-viewer-alternative/

@NileshMoradiya
Copy link

Is there any way to increase limit of 25 MB ?

@dshivprasad
Copy link

Is it authentic way, as I do not see mention of this service on any of Google site

@BraPan
Copy link

BraPan commented May 15, 2016

Hello, is there any possibility to change the view of the Office Web Apps Viewer, for example I only want to "print as PDF" and not to download the whole document.
Thank you.

@aamironline
Copy link

How to view private documents?

@rai-vikas
Copy link

when i open an excel file using 'Office Web Apps Viewer ' first time it open correctly but when i made some changes in the file then pass the same url it does not show the changes .
plz some one give me solution for the same.

@Marlicreative
Copy link

Does the plugin have a limit of pages?
When i try to upload some PDF it says: there is no preview available
My file size is 15 mb with 140 pages.

Thanks!

@kangdzuy
Copy link

I have some hard-files (paper) then I use scanner machine scan these hard files to Pdf file.
Google Doc viewer and Office Web Apps Viewer don't support to view online.
I wish to view that Pdf file online. How can I do it?

Thanks

@shafqatalix
Copy link

@enniosousa
Copy link

Thanks! You did help me so much. :)

@jitendra310
Copy link

it's really nice....
can we disable "download option", "share option" from slide views. please tell me.
Thanks..

@AnirudhLoya
Copy link

Their is problem with when load images, it is showing There was Problem displaying this image, same msg for multiple types of image which have size under 200kb

@alesshosry
Copy link

Thank you !

@kingsleyudenewu
Copy link

Hi please the google doc FIle viewer https://docs.google.com/a/[DOMINIO]/viewer?url=[FILE_URL] what do i replace the DOMINIO with.

@code-knight
Copy link

Does this Google app viewer can be used for "csv" files? Or can you please suggest something for the conversion of similar not listed file formats.

@mtx-z
Copy link

mtx-z commented Jun 16, 2017

Image file are not working anymore. Someone succeed to make it work ?

@thomasfauchet
Copy link

Thank you very much !!

@hnarun
Copy link

hnarun commented Jul 28, 2017

how can I view document from website that use iframe?
I tested with https://docs.google.com/viewer?url, but instead of viewing my file it viewed my html code.
What wrong with that?

@udara86
Copy link

udara86 commented Aug 9, 2017

Samething happened to me..I tested with https://docs.google.com/viewer?url, but instead of viewing my file it viewed my html code.
What wrong with that?

@surajmsakhare
Copy link

When user will scroll down to bottom of the page then how do I give any alert message.
Currently, I am using an iframe to show google docs viewer on my website, but I have to apply some javascript event after a complete reading of the document.

@StarWar
Copy link

StarWar commented Jan 3, 2018

Is there any bandwidth limit, if I use google drive this way?

@akira32chen
Copy link

I tried the pdf in my office unsuccessfully. The pdf is in the webserver of 192.168.1.1 shared by IIS. But I use the URL as below, the google chrome appear the error message "No preview available"。Does somebody know how to solve this problem?

https://docs.google.com/a/192.168.1.1/viewer?url=http://192.168.1.1/mypdf/aaa/pdf

@Aarbel
Copy link

Aarbel commented Feb 19, 2018

Hi ! Do you know alternatives to provide a .docx or .xlsx viewer (and maybe editor) on our own interfaces ? Like opensource libraries and editors, thanks !

@stephanebruckert
Copy link

@akira32chen you are using a local IP address which is unknown to Google

@martinhayon
Copy link

Hello, what about security? If the documents are private of a client. What happens when we put them in a web folder, so that the Google service has access.

@Tarak1246
Copy link

If i give local url, it shows no preview available...why?

@imraanparker
Copy link

Local URL's will not work as docs.google.com's servers must be able to access the document over the internet.

@zqdevelopment
Copy link

zqdevelopment commented May 24, 2021

hello, I use this API but it is don't work for this formats:
.TTF (no)
.XPS (no)
.ZIP (no)
.RAR (no)
.PNG (no)
.GIF (no)
.WebM (no)
.MPEG4 (no)
.3GPP (no)
.MOV (no)
.AVI (no)
.WMV (no)
.FLV (no)
I will be grateful for any recommendation, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment