I have some iframe content having page-break classes. But it does break the pages while printing. Here is the html and js codes:
<html>
<head>
<script src="js/jquery.min.js"></script>
<script>
$(document).ready(function(){
$(".testprint").on('click', function(){
document.getElementById('test').contentWindow.print();
return false;
});
});
</script></head>
<body>
<iframe id="test" width="800px" height="500px" src="printjobs.php?day=2014-06-13&drivers=1,2,49,24&maps=&directions="></iframe>
<a class="testprint" href="#">Print</a>
</body>
</html>
and css is :
div.page-break { page-break-after:always !important;}
It works fine in firefox. But it creates problem in chrome. Page is not breaking as expected. If I open the src of iframe in new tab it prints beautifully in both the browsers. Not sure what's wrong wit iframe?