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/

@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