I shared the link to the file on Google Drive with anyone who has the link, and for some reason my PDF doesn't show up. It works for someone else's Google Drive link but not for my link.
I've tried sharing it with the whole internet on the UI in Google Drive but nothing changed. Just a blank page.
<!-- simple.html -->
<!DOCTYPE html>
<html>
<head>
<title>Google Drive not Working for Me</title>
</head>
<body>
<object data="https://drive.google.com/file/d/10IcEechL2QV5enxoec-B5jhfCaJ9xkzU/view?usp=sharing" width="600" height="750">
<embed src="https://drive.google.com/file/d/10IcEechL2QV5enxoec-B5jhfCaJ9xkzU/view?usp=sharing" width="600px" height="750px" />
<p>This browser does not support PDFs. Please download the PDF to view it: View the PDF.</p>
</embed>
</object>
</body>
</html>
I want to see my PDF, but all I see is a blank page.
Here's My Page not working.
Here's Someone else's Google Drive Link Working
Use the URL with /preview rather than /view as in your example;
https://drive.google.com/file/d/{fileId}/preview
Related
I trying to display my ppt for long time where the screen should run continuously in web page without using Google Docs or Skype Drive where the ppt file and html page is in my local folder but it is not showing in web page. The code is below :
<!DOCTYPE html>
<html>
<body>
<iframe src="lp.ppt" width="800px" heigt="600px" name="iframe_a"></iframe>
</body>
</html>
can anyone help to display ppt in html page.
I'd recommend the official View Office documents online
For embedding you can simply use code like below:
<iframe src='https://view.officeapps.live.com/op/embed.aspx?src={urlencode(site-to-ppt)}' width='962px' height='565px' frameborder='0'></iframe>
I trying to display my ppt with long time where the screen should run continuously in web page where the file is in my local folder but it is not showing in web page. The code is below :
<!DOCTYPE html>
<html>
<body>
<iframe src="lp.ppt" width="800px" heigt="600px" name="iframe_a"></iframe>
</body>
</html>
can anyone help to display ppt in html page.
You can use Google Docs to serve as your document viewer. You just need to upload your file and use the share link as the iframe src.
You can get the embed code by uploading your file and opening it in google docs (in this case, Google Slides) then click the file tab and click the Publish to the Web. From there you can copy the embed code. Make sure that the file is public! :)
<iframe src="https://docs.google.com/presentation/d/17nlO95lz91-shRep16UiJl-3EAxv-MnOFH718ku2gtw/embed?start=false&loop=false&delayms=3000" frameborder="0" width="960" height="749" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"></iframe>
<iframe src="https://docs.google.com/presentation/d/17nlO95lz91-shRep16UiJl-3EAxv-MnOFH718ku2gtw/embed?start=false&loop=false&delayms=3000" frameborder="0" width="960" height="749" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true"></iframe>
Hope this helps!
I am trying to open an image in a new tab using this simple code.
window.open(file.url);
The file is a .jpg file and my browser is Chrome. Instead of showing the image in a new tab it triggers the download window and asks me to download it to my PC.
Is this a javascript issue? Or is it a default Chrome setting? I have googled this for a while and some people are suggesting it could be a MIME type problem but I have no control over the image coming from the server.
Any advice would be appreciated.
As suggested by #Lachlan Walls in the comments, you can open a blank tab and write a simple html with an img tag:
const image_window = window.open("", "_blank")
image_window.document.write(`
<html>
<head>
</head>
<body>
<img src="https://upload.wikimedia.org/wikipedia/commons/8/84/Example.svg" alt="Example" height="100%" width="100%">
</body>
</html>
`);
Hello I'm trying to implement a jwplayer on a website when i tested it local with a single html page everything worked great and here is the working test code:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>JWPlayer test</title>
<script src="http://tms.localhost/NSwQRmZDEeOchiIACmOLpg.js"></script>
</head>
<body>
<div id='playeriybxxXWkOtaN'></div>
<script type='text/javascript'>
jwplayer('playeriybxxXWkOtaN').setup({
file: 'http://tms.localhost/video.flv',
image: 'http://tms.localhost/image.jpg',
title: 'Razer',
width: '100%',
aspectratio: '16:9',
fallback: 'false'
});
</script>
</body>
</html>
However when i tried to use it through a cms specifically liferay it didn't work. I uploaded a video through the cms control panel and the generated link for the video was:
http://localhost:8080/documents/10180/0/test-video/a3690397-1d28-4225-9a5c-7d13dba7c789
I assume it has to do something with the link? but when i try it on my browser the video downloads perfectly fine.
What am I doing wrong here ?
check this
http://www.longtailvideo.com/support/jw-player/28836/media-format-support
the page says:
"The JW Player tries to recognize a file format by its extension (e.g. .mp4 for MP4 videos). If the extension of your files is not recognized, the player will display an error. However, if you know your file is in a supported format, you can use the type playlist option to force the player to recognize the file as being of that format."
In your case the generated link for the video has no extension, so JW Player doesn't know how to play it.
When i try to use the following code to load facebook or you youtube into iframe tags nothing is happened. page isn't loaded into iframe tag
this problem occurs with multiple sites such as youtube, stackoverflow and facebook
code:
<head>
<title>HTML Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>Below is an iframe.</p>
<iframe src="http://www.youtube.com/" width="400" height="150">
<p>iframes are not supported by your browser.</p>
</iframe>
</body>
</html>
any help please
I tried it
http://jsfiddle.net/KPk6n/1
And looking at the console, I get
Display forbidden by X-Frame-Options
So I think those sites disallow framing, there probably is a workaround to this, but I'd say you should respect them and not frame them
The sites you speak of probably disable access from iFrames.
My site works just fine in this example: http://jsfiddle.net/3vxvm/