title: Displaying a file created through Google Drive API with the Google Drive Viewer
body: <p>I am able to create a document through the google drive api.</p>
  
  <p>I get back some urls:</p>
  
  <ul>
  <li>alternateLink :</li>
  </ul>
  
  <blockquote>
    <p><a href="https://docs.google.com/document/d/xxxsome_idxxxxx/edit?usp=drivesdk" rel="nofollow">https://docs.google.com/document/d/xxxsome_idxxxxx/edit?usp=drivesdk</a></p>
  </blockquote>
  
  <ul>
  <li>embedLink</li>
  </ul>
  
  <blockquote>
    <p><a href="https://docs.google.com/document/d/xxxsome_idxxxxx/preview" rel="nofollow">https://docs.google.com/document/d/xxxsome_idxxxxx/preview</a></p>
  </blockquote>
  
  <p>I would like to display the created document thanks to the <a href="https://docs.google.com/viewer" rel="nofollow">google document viewer</a>, like it is done here : <a href="http://architects.dzone.com/articles/embedding-google-docs-and" rel="nofollow">http://architects.dzone.com/articles/embedding-google-docs-and</a></p>
  
  <p>The problem is that I can't have the document to open in the viewer with the above URLs.</p>
  
  <p>I also tried to publish the document directly from google drive (menu file > publish to the web...). The url is something like:</p>
  
  <ul>
  <li><a href="https://docs.google.com/document/d/xxx_some_id_xxx/pub" rel="nofollow">https://docs.google.com/document/d/xxx_some_id_xxx/pub</a></li>
  </ul>
  
  <p>Again the file cannot render in the viewer.</p>
  
  <p>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 ?</p>
  
  <p>Thanks!</p>