1

I'm using the Google docs viewer:

<div class="embed-r embed-responsive-a">
  <iframe class="embed-responsive-it" src="https://docs.google.com/viewer?embedded=true&amp;url=http://LINK.PDF"></iframe>
</div>

Many times, though, when I load the page, I just see a big blank space, instead of the file. You need to refresh the page one or more times in order to see it.

Any help?

jacefarm
  • 6,747
  • 6
  • 36
  • 46
Dave
  • 11
  • 1
  • 2
  • 1
    Welcome to StackOverflow. Can you please provide the shortest code necessary to reproduce your issue, within the question itself? Without this, your question is not useful to other readers, and those who might help you. For help, see “[How to create a Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve)”. – jacefarm Nov 02 '16 at 17:27
  • @jacefarm Hi. I have no more code to provide. The CSS is just position and padding-bottom, border, and display:block. – Dave Nov 02 '16 at 17:32
  • The more information and code you provide within your question (not in comments), the more likely someone will be able to help you. The less you provide, the less likely someone is to answer. Also, you could create a working example on [Codepen.io](http://codepen.io/), for instance, and share a link to that in your question as well. – jacefarm Nov 02 '16 at 17:35
  • I'm running into the same issue and posted a similar question: http://stackoverflow.com/questions/40414039/google-docs-viewer-returning-204-responses-no-longer-working-alternatives There's a link on that page referencing a Google discussion where it appears they've phased it out. So incredibly irritating! – Art Geigel Nov 04 '16 at 01:54

1 Answers1

0

I'm having exactly the same problem, but I stumbled across this whilst researching this particular issue.

https://productforums.google.com/forum/#!topic/drive/tLVhGbITFMk

It suggests that there is a 'partial sign out issue' with a Google Account. Having read the doc above and tested being signed in and signed out of my google account, it seems to have solved the problem.

It's an imperfect solution I grant, but as no definitive error code is thrown due to the security constraints of clickjacking, I get it.

It may continue to present problems to your end users, but as mine are local and limited to a maximum of 3, it isn't a huge issue to overcome with a little polite coercion.

-- FURTHER Information --

It looks like the 'solution' was a fluke and it has since been confirmed by Google that this feature is actively being discontinued. (thanks to: @omniasoft (twitter) for posing the question to Google.

Google Docs viewer returning 204 responses, no longer working, alternatives?

https://productforums.google.com/forum/#!msg/docs/hmj39HMDP1M/X6a8xJwLBQAJ

Sorry for any false hope!

Community
  • 1
  • 1
B Wake
  • 11
  • 3
  • Could you please try to expand some more on what the linked doc says is the problem and what workaround/solution it recommends? – Ortund Nov 03 '16 at 15:28
  • The linked document suggests that if a user is partially logged in, i.e no active Google login session and is being presented with 'Login to your account screen', it causes the Google Docs Embed viewer to throw an error which, ultimately is not displayed to the user, who just receives a blank screen. – B Wake Nov 03 '16 at 15:55
  • The 'solution', and I use that loosely, is simply to either forcefully log a user out of their google account (Which I don't recommend) or to force a login (this is probably the preferred behaviour for most). As I say, it's a perfect solution, but one that I can confirm is working for me at the moment. – B Wake Nov 03 '16 at 15:57
  • See here [link]http://stackoverflow.com/questions/40414039/google-docs-viewer-returning-204-responses-no-longer-working-alternatives/40430439#40430439 for more information and my own workaround. – B Wake Nov 04 '16 at 19:33