'How to print the full content of an overflowing iframe?
I created a tool to be used on multiple website. They all open it in a iFrame. (I have no control over this)
I have been asked to add a "print" button.
The issue is, when I try to print, it print the iframe content, but only what is currently shown. The iframe content is overflowing verticaly, so I'm missing half the content. The print will only show what is currently visible.
As I have 0 control over the iframe itself, is there a way for me to print the full iframe content?
I thought about opening a new window, but they don't want the users to see the url of my tool.
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
<style >
.iframe_print {
position: absolute;
top: 0;
left: 0;
width: 600px;
height: 400px;
border: 0;
}
</style>
</head>
<body>
<iframe src="https://alkegen.com/"
class="iframe_print"
>
</iframe>
</body>
</html>
Here is an example of the issue. It is not my tool, I took a random webpage that let me connect to it in iframe. Can't show it in codepen because the issue isn't clear with the 4 windows of codepen.
Thank you!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
