📜 ⬆️ ⬇️

Google docs viewer

Google docs viewer Google Docs Viewer is an online service running on the Google Docs platform that allows you to view documents supported by Google Docs directly in a web browser and without authorization, such as Adobe PDF, Microsoft Word or Microsoft PowerPoint.

The advantage of this option is the ability to view documents in many formats without downloading to a local disk. Another advantage is security - not all PDF and DOC documents are safe to view through Adobe Reader and MS Word.


Where and how is used


There are many ways to use this service "corporations evil." To view documents through Google Docs Viewer, you can generate a link on the docs.google.com/viewer service page. The service also generates html-code for embedding into a third-party pages of a simplified viewing application via an iframe (more details about such links below).
')
Google Docs Viewer Embedded

Google Docs Viewer is also used in Google Search, offering the user a link to quickly view found files that are supported by Google Docs. Many browsers have already acquired the extensions of fast document viewing implemented via the Google Docs Viewer service: Google Chrome , Mozilla FireFox , Safari .

GET link options


To get various kinds of materials from Google Docs Viewer GET-parameters are used. Here is the main, but not all, list of parameters:

Supported formats and restrictions


Google Docs Viewer supports more file formats than documented. Some formats that are not supported with the GET parameter & a = v are supported with other parameter values ​​(gt / bi). There is also a limit on the file size: up to 22MB (detected by an experimental method). No page limit was found.

Table of supported formats:

Document FormatsWith parameter
& a = v
With parameters
& a = gt or & a = bi
image Text documents
doc, docx, odt, pdf, pages, xps++
rtf, sxw, sdw 5.0, txt, html (generate OpenOffice 3)-+
dotx, ott, psw, prn, stw, vor, uot, xml--
image Tabular documents
xls 97/2000 / XP, xlsx++
sdc 5.0-+
csv, chm, dbf, dif, djvu, hlp, ods, ots, pxl, sdc 3.0 / 4.0, stc, sxc, slk, uos, xlt, xls 5.0 / 95, xlsm--
image Presentations
ppt, pptx++
sdd 5.0, sxi (text only)-+
odg, odp, otp, pot, pptm, ppsx, sdd 3.0 / 4.0, sda, sti, uop--
image Images
dfx, eps, psd, ps, svg, tif, ttf++
ai 9.0+-+
ai 3.0 / 8.0, bpm, dwg, emf, eot, fxg, gif, jpg, met, otf, pbm, pct, pgm, png, ppm, pwp, ras,
svm, swf, sxd, svgz, jpf, psb, raw, sct, woff
--

It is possible to work other formats not listed in the table. Only those formats that participated in personal experiments are indicated.

What is the result


There are, obviously, other services offering similar functionality. For example, the extension for browsers OpenITOnline , service ViewDocsOnline.com and others. But the main difference and advantage of Google Docs Viewer is that it is not limited to just a browser extension or a web application for viewing text or graphic documents. This service provides a very flexible and user-friendly interface for both users and application developers.

With the help of the service, it is easy to obtain texts from various sources, which can later be used when searching through documents or for other purposes. It is also easy to get a preview of the images of these documents. The provided interface via the HTTP protocol will make it possible to work with documents even in scripting languages ​​(JS, etc.).

I hope the useful service will be even more useful thanks to this article.

upd-1 (01/12/2011):
Completed the table of supported formats with formats of MS Office 2007 (see comment ). Thanks for the hint MaximKat .
upd-2 (02.21.2011):
Completed the table of supported formats with Apple Pages formats (.pages), Autodesk AutoCad (.DXF), PostScript (.ps), TrueType (.TTF), XML Paper Specification (.XPS) (inspired by habrotopikom-translation ). And also expanded the experiment with the following formats: djvu, eot, otf, woff, chm, hlp.

Source: https://habr.com/ru/post/111647/


All Articles