3

I have a website where I embedded a Google docs iframe displaying a pdf.

When connecting with a desktop computer, the iframe works fine and displays the embeddded pdf.

When conncetion with an android browser, the pdf is downloaded locally and the iframe stays empty. Any idea how to display the pdf in the browser?

Here is the iframe:

<iframe style="position: relative; width: 100%; height: 450px" src="/1420-3049/19/6/8691/pdf?view=inline" type="application/pdf"> 

Thank you in advance.

1
  • 1
    This works fine for me with Chrome on Android 4.4 KitKat after replacing your relative URL with one that I can test such as this one: docs.google.com/… What version of Android are you trying this with? What is exact Google Docs Viewer URL? What kind of redirect do you use to get the Docs Viewer URL? Commented Jun 29, 2014 at 10:26

2 Answers 2

2
+100

Try fixing the height and width of your iframe. I read that it has a lot of issues with scrolling iframes. So try fitting the iframe inside the screen.

Take a look at this.

Sign up to request clarification or add additional context in comments.

2 Comments

The answer is not appropriate with my question. I wrote: "I have a website where I embedded a Google docs iframe displaying a pdf.", there is no android app there. I am only using the android built in browser to open my website.
Sounds better as an answer. Thank you. I will test it an come back with the results.
-1

Try use another browser for determine issue. For example, Opera (not mini), set User-Agent inside browser to Desktop. If this is will work fine, issue is on server side (server determine your user-agent as mobile and return empty iframe body).

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.