Google doc no preview available error

I used a google document to display a pdf file in a web browser. It used to work well. Now it does not give a preview. Most of the time it gives a blank screen without previewing, but sometime it opens a pdf. However, I noticed that if the PDF size is small, it works fine, but if the size is slightly larger with 10-100 or more pages, a preview is displayed.

link:

https://docs.google.com/gview?embedded=true&url=http://trafficpolice.gov.np/traffic/uploadfiles/56a0e8156d4ea.pdf 

the code:

 WebBrowser view = new WebBrowser(); view.setURL("https://docs.google.com/gview?embedded=true&url=http://trafficpolice.gov.np/traffic/uploadfiles/56a0e8156d4ea.pdf"); 
+9
google-docs google-docs-api codenameone
source share
4 answers

I had the same problem, in my case I included api for google and added a key attribute to my iframe:

 WebBrowser view = new WebBrowser(); view.setURL("https://docs.google.com/gview?key=YOUR_API_KEY&embedded=true&url=http://trafficpolice.gov.np/traffic/uploadfiles/56a0e8156d4ea.pdf"); 

problem resolved in 1 day

+1
source share

Opening the url on the desktop is chrome: enter image description here

0
source share

In my case, the pdf file name contained the character '&'. After I removed the ampersand char, the problem is resolved.

Hope this helps someone.

0
source share

A few things that can cause this:

  • The browser that you use to download these files.
  • The size of the uploaded file.
  • Password / permission files for personal .

Quick fix:

It has been noticed that most users who encounter this use Firefox (in particular, 3.6.6). Try downloading files using IE8 and clear your cache.

This issue has been further discussed here .

-one
source share

All Articles