Easily Embed PDF in HTML

preview_player
Показать описание
Use the Google Docs Viewer Iframe to embed PDF in HTML. No need for any JS libraries.

Code Used:

* note you have to replace < and > with left and right brackets as youtube doesnt allow to display in description
Рекомендации по теме
Комментарии
Автор

hello sir how can i get the pdf scroll position in javascript or jquery when pdf inside the Iframe or embed

shashikantvaidya
Автор

this is probably a dumb question where what program do you have to use to even get that in to the code

showspotter
Автор

it works only desktop

how can display on mobile

ChandKhan-kfue
Автор

Hi. I saved it as a pdf in google drive...
I also opened the pdf in google docs. Which link should i use?

1. The gdrive pdf link wont open when embeded as iframe
2. The gdocs work but it totally opens the whole document as can be edited. Evem shows my profile.

What should i do?

Thanks for the vid btw. Hope you can help me

karessacamillesuelan
Автор

Hello sir, any idea how it can be used in Edge?

shamshaque
Автор

Can you show what have you done in Google? I have uploaded my file to Google Drive and got the share link. However, it is still saying content restricted something like that. Then I realised you said Google Docs. Coz Im using a pdf, so I dragged it to google doc which gives me a local link with and added it to the ifram still don't work?!!

To be honest, what I wanted to do is to embed a pdf in a website where people can't download it....

jenlam
Автор

How do i get that link of pdf tho? i am struggling with that

epycperson
Автор

you went too fast, what do you mean by google doc iframe?

bexbuzzie
Автор

That is not embedding, embedding is when its displaying inside a page, it doesnt need to open a new tab and use an addon like you have.

cpmerchant