API for Google Docs Viewer

6,997 views
Skip to first unread message

Jags

unread,
Mar 17, 2012, 3:18:42 AM3/17/12
to google-docum...@googlegroups.com
Hi,

Can someone help me in figuring out if there is an API available to use Google Docs Viewer where I want to upload a document and it should give me a Google Docs View Url for the document so that I can embed it in our website. Currently in Docs Viewer, the only option I find is viewing a publicly available document by passing the url for it as a param as in http://docs.google.com/viewer?url=xxxxxxxxxx. Is this the only way that I can view in Google Docs. Please someone assist if I missing something.
      If this isn't possible by Docs Viewer is it supported in Google Docs where I'll upload it to user's google account and thereafter even the author of the document should have just a VIEW only option for the document.

TIA,
Jagadeesh

Ali Afshar

unread,
Mar 27, 2012, 10:59:29 AM3/27/12
to google-docum...@googlegroups.com
Hi Jags,

Sorry, there is no real API there as such to do what you want to achieve. You should probably export it as a format that you can embed in your page.

Regards
--
Ali Afshar | www.googplus.org/ali | Google Developer Relations

Ali Afshar

unread,
Mar 28, 2012, 9:35:11 AM3/28/12
to google-docum...@googlegroups.com
Hi again Jags,

Sorry, I missed one thing, you might be able to use the embed link, i.e. that link with rel http://schemas.google.com/docs/2007#embed. That will give you a link to embed the resource.

Regards

Jags

unread,
Mar 28, 2012, 9:50:27 AM3/28/12
to google-docum...@googlegroups.com
Hi Ali,

Will that give a view-only kind of embed link?

Regards,
Jagadeesh

Ali Afshar

unread,
Mar 28, 2012, 11:15:34 AM3/28/12
to google-docum...@googlegroups.com
Hi Jags,

Yes, that is correct.

Regards

Jags

unread,
Mar 30, 2012, 4:45:08 AM3/30/12
to google-docum...@googlegroups.com
Hi Ali,

Can you please provide me a Java sample code to set the 'xmlns' as 'http://schemas.google.com/docs/2007#embed' to the document entry. I am getting an InvalidEntryException
com.google.gdata.util.InvalidEntryException: Invalid request URI
<errors xmlns='http://schemas.google.com/g/2005'><error><domain>GData</domain><code>invalidRequestUri</code><internalReason>Invalid request URI</internalReason></error></errors>
So please suggest me a possible solution to resolve this.

Regards,
Jagadeesh 

Jags

unread,
Apr 4, 2012, 12:19:09 PM4/4/12
to google-docum...@googlegroups.com
Hi,

Can someone please provide a solution(or provide me an example to use http://schemas.google.com/docs/2007#embed in java) for this?

Regards,
Jagadeesh
Reply all
Reply to author
Forward
0 new messages