Reputation: 5010
I am able to create a document through the google drive api.
I get back some urls:
https://docs.google.com/document/d/xxxsome_idxxxxx/edit?usp=drivesdk
I would like to display the created document thanks to the google document viewer, like it is done here : http://architects.dzone.com/articles/embedding-google-docs-and
The problem is that I can't have the document to open in the viewer with the above URLs.
I also tried to publish the document directly from google drive (menu file > publish to the web...). The url is something like:
Again the file cannot render in the viewer.
Would someone know how to do this, i.e. having the viewer showing, in pdf mode, a document created in the drive from the api ?
Thanks!
Upvotes: 0
Views: 1901
Reputation: 2045
You can convert the document to pdf and then pass pdf url to google document viewer. In fact you won't have to do any hard work for that. With the file object google gives embed links, one of them will be of pdf. Just pass this pdf link to google viewer.
Upvotes: 1