javascript - Jquery print preview not showing full page -
i'm using tool make print preview of page.
i have table in page. when draw preview after pageload, it' not showing full page in firefox.
but in chrome same page working perfectly, showing full preview.
codes.
<link rel="stylesheet" href="{{ asset('bundles/joy/css/print.css') }}" type="text/css" /> <link rel="stylesheet" href="{{ asset('bundles/joy/print/css/print-preview.css') }}" type="text/css" /> <link rel="stylesheet" href="{{ asset('bundles/joy/css/print.css') }}" type="text/css" media="print"/>
this print.css made me.it's not plugin example.
$('body').printpreview(); $.printpreview.loadprintpreview();
am missing something? how can see full preview in both firefox , chrome??
problem in iframe height. if adjust iframe height based on total page height, works correctly.
the demo example contain problem in firefox of 10-02-14(downloaded demo code). footer or copyright notice cuts half in print preview example.
so here did. in jquery.print-preview,js
file, replaced instances of
print_frame.height($('body', print_frame.contents())[0].scrollheight);
with
heights=math.max($(document).height(), $(window).height())+30; print_frame.height(parseint(heights));
this set iframe height actual document height.
Comments
Post a Comment