I want to remove that download icon that is in the PDF viewer, but I can't. I'm opening the pdf through an iframe. Here is an example of my code below:
<html>
<head>
<title>Disable Context Menu</title>
</head>
<body oncontextmenu="return false">
<iframe id="pdfFrame" width="500px" height="600px" src="png.pdf"></iframe>
</body>
</html>
First I tried to apply a style inside the page opened by the iframe, but I couldn't succeed in that.
Change:
<iframe id="pdfFrame" width="500px" height="600px" src="png.pdf"></iframe>
In:
<iframe id="pdfFrame" width="500px" height="600px" src="png.pdf#toolbar=0"></iframe>
Hope that helped!
You cannot simply change the view of a PDF when you placed it in the Distributed Network System (WorldWideWeb) it became just the same as EVERY item in the Public Domain an embedded object for download and view.
You can make suggestions as to how those dis-positions may be handled (see how I suggested via a fragment the second frame could be #toolbar=0) but once you publish html objects they are no longer yours to control.
Most browsers will come with their own editors to remove that just as easy as you can add it.
There are ways google can make it more difficult to extract the source PDF copy but if the client can view it a copy has already been gifted (dis-possessed) to them.
<html>
<head>
<title>Disable Context Menu</title>
</head>
<body oncontextmenu="return false">
<iframe id="pdfFrame" width="500px" height="600px" src="https://docs.google.com/viewerng/viewer?url=http://infolab.stanford.edu/pub/papers/google.pdf&embedded=true"></iframe>
</body>
</html>
Related
For example, I want to make an iframe to this url: http://example.com/game.swf
The problem is, users who are on different browsers/devices/settings have the issue where instead of running the swf, the browser is just downloading it.
Keep in mind, I don't have access to the code for http://example.com, or the fla file. I need to use the iframe hack because of some issues with the swf.
The iframe must load an HTML file, instead of directly loading some SWF file. So get around that rule by embedding SWF within the same html that the iFrame will be loading.
If iframe has code:
<iframe src="http://example.com/game.html"> </iframe>
Then in game.html have code:
<!DOCTYPE html>
<html>
<body>
<embed src="http://example.com/game.swf" width="800" height="600">
</body>
</html>
I'm trying to embed a 360 panorama tour into Adobe portfolio I brought this from visor but adobe portfolio just supports Iframe format :
<script src="/scripts/embed.js" data-vizorurl="https://patches.vizor.io/embed/mahmoudgfx/makarm_villa_a" ></script>
Could this above code to be converted into Iframe embed?
Regarding...
"...Adobe Portfolio just supports Iframe format"
If Portfolio accepts it, then just try making an Iframe like this :
<iframe src="https://patches.vizor.io/embed/mahmoudgfx/makarm_villa_a" width="800" height="600">
PS: A fully testable HTML code example (to confirm Iframe works naturally) :
<!DOCTYPE html>
<html>
<body>
<iframe src="https://patches.vizor.io/embed/mahmoudgfx/makarm_villa_a" width="800" height="600">
</body>
</html>
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 have what I think should be a simple thing to do but everything I've tried has been a bust.
I have an iframe in a mobile web page, looks nice, finger swipe scrolling in the major os's without any code. But I'd like the iframe to open the map.html to a specific coordinate, the map.html is just an image of a map, nothing else.
Code on the page embedding the iframe:
<iframe id="iframe2" width="292" height="350" frameborder="0" scrolling="yes" marginheight="0" marginwidth="0" src="map.html"></iframe>
Code for map.html
<html>
<head>
</head>
<body>
<div style="width:292px;height:350px;frameborder:1;marginheight:0;marginwidth:0;overflow:scroll;" >
<img src="images/map.png">
</div>
</body>
</html>
Is there some javascript that I could put on either the page holding the iframe or in the map.html that would scroll map.html to something like 50px,50px?
I think I'll give up on this idea... embedded the image in the page instead of iframing an HTML page, then set user-scalable=yes, (it's a mobile thing)... I was hoping for something more elegant, but this is eminently usable and simple to build.
Thanks anyways!
Maybe that was Shmiddty's point, one of those 'what is the sound of one hand clapping?' sort of questions/lessons!!!
I run a simple html file with an iframe and javascript working fine in IE Browser, but it is not working in other browsers like safari,firefox.
In safari the Iframe box is only displayed, but the content in that is not shown.
Please clarify why safari doesn't support it? what are the alternatives for iframe?
You can use <embed> tag ,which behaves like iframe
Here is example
<!doctype html >
<html >
<head>
<title>embed Tag </title>
</head>
<body>
<p><b>Example of embed tag in HTML5.</b></p>
<embed src="http://www.w3schools.com" height="300" width="300" />
</body>
</html>
While you can also use iframes on all browser
Here is example
<!DOCTYPE html>
<html>
<body>
<iframe src="http://www.w3schools.com">
<p>Your browser does not support iframes.</p>
</iframe>
</body>
</html>
Are you trying to do any different for iframe ?