4

I have a page that contains PDF File in it. Luckily, it works in IE. But when I run it in chrome, it gives me this error : enter image description here

I googled it and it seems like chrome isn't already allowing us to view PDF's now. Here is the code for embedding PFD :

<div id="pdf" style="width: 100%; height: 100%;"> <iframe src="C:\Users\jmanaban\Downloads\Programming Handbook.pdf" style="width: 100%; height: 100%;" frameborder="0" scrolling="no"> <p>It appears your web browser doesn't support iframes.</p> </iframe> </div> 

So the question is, is there still a way or alternatives to embed PDF files in chrome without using any extensions or plugins just like IE? How am I gonna do it? Thanks in advance.

I still didn't this one appear

<p>It appears your web browser doesn't support iframes.</p> 

so I think there's still hope.

1

1 Answer 1

1

Write the src as relative path. Put both Programming Handbook.pdf and the HTML file in same folder and change src to:

src="Programming Handbook.pdf" 
Sign up to request clarification or add additional context in comments.

3 Comments

yes. gladly it worked. do you know the reason why it didn't show up when I im not using a relative path?
Using local path to files on your computer is not allowed as it'll allow web pages to access any file on your computer

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.