2020. 2. 23. 09:05ㆍ카테고리 없음
Google Docs Pdf Viewer
When I upload PDF to Google Docs (using Python's gdata library), I get link to the document: e.GetAlternateLink.hrefOut14: 'id=&hl=en'Unfortunately using that link in IFRAME is not working for me because PDF viewer is redirecting to itself, breaking out of IFRAME.Looking for the solution, I've found this: - which looks very nice, but I can't find a way to use it with document uploaded to Google Docs. Does somebody know how to do it/if it's at all possible? Just for the record - I haven't found any way to force 'internal' google google pdf viewer to not go out of the iframe. And as I mentioned in the question, I found this nice standalone viewer:, that can be used like this: - but in order to use it you have to publish your PDF to the outside world. This wouldn't be a bad solution, because published document has unique id that is probably harder to guess than a password to google docs account.
Unfortunately, even with hottest Google Docs API version 3 API, there seems to be no way of publishing PDF programatically.In the end, I went for a mix of: standalone PDF viewer from google and some other web service that allows to programatically upload and publish PDF. A bit half-baked solution, but it works well so far.