Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The title is a little confusing. I'll elaborate.

As far as I can tell, the Google Docs Viewer tool accepts a link to a raw document file (e.g. .doc, .pdf, et. al.), and renders its contents in the browser. For example, this url to a pdf when passed to Viewer, returns this link:

What I'm trying to achieve is, use the Viewer to view a document already hosted in Google Docs (i.e. no longer a raw document file). When passing a link to a Google Docs document to the Viewer, the result is not as expected. It renders the link's HTML source instead of the document's contents.

The reason I want to do this is that I want to be able to use the "embed" feature of Viewer to view Google Docs documents. Does Google Docs have a "link to embeddable view" feature?

P.S. Here is a sample snippet to an embedded document. This is what I want, but pointing to an existing Google Docs document.

<iframe src="" width="600" height="780" style="border: none;"></iframe>
share|improve this question

Maybe I've found a workaround.

Firstly be sure to have set the document sharing to anyone with the link.

Then, in the list view of Google Docs/Drive, select your document and click More > Download... and choose whatever format you want (e.g. PDF). The URL that appears for a second when you finally click Download is the URL you need (the one that works with Google Viewer).

For text documents you can get the same URL by taking the document editing URL, e.g.: [alphanumeric code] /edit

And change it like that: [alphanumeric code] /export?format=pdf

For other document types it's a bit different. Presentation: [alphanumeric code] /edit [alphanumeric code] /export/pdf

Spreadsheet: [alphanumeric code] [alphanumeric code] &fmcmd=12

I don't have tried with uploaded files or other formats, but hope it helps.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .