Just for the record - I did not find a way to force the "internal" google google pdf viewer not to exit the iframe. And, as I mentioned in the question, I found this nice standalone viewer: http://googlesystem.blogspot.com/2009/09/embeddable-google-document-viewer.html , which can be used as follows:
<iframe src="http://docs.google.com/gview?url=http://infolab.stanford.edu/pub/papers/google.pdf&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>
- but to use it you must publish your PDF file in the outside world. This would not be a bad decision, because the published document has a unique identifier, which is probably harder to guess than the password for the google docs account. Unfortunately, even with the most popular API Docs API version 3, there seems to be no way to publish PDF programmatically.
In the end, I went for a combination: a standalone PDF viewer from Google and some other web services, which allows you to programmatically download and publish PDF. A bit baked solution, but it still works well.
source share