php - How to view the print preview faster in google chrome using codeigniter -
i want solution printing 100 database values using code-igniter , mysql application. in single print preview faster 2 sec loaded 50 data takes around 5 6 minutes in chrome browser.
sample code
var is_chrome = boolean(window.chrome); function printpage() { $(".draggable").css('margin-top','<?=$top_align?>px'); $(".draggable").css('margin-left','<?=$top_align?>px'); $(".draggable").draggable({ containment: $('#printdiv'), cursor: "move", grid: [ 1, 1 ], scroll: false }); $('.printdiv img').css('visibility','hidden'); var divcontents = $("#printdiv").html(); var printwindow = window.open('', ''); printwindow.document.write('<html><head><title>marksheet</title><link rel="stylesheet" href="<?=base_url('css/hindi_style.css')?>"/>'); printwindow.document.write('</head><body>'); printwindow.document.write(divcontents); printwindow.document.write('</body></html>'); printwindow.document.close(); if (is_chrome) { printwindow.onload = function () { printwindow.print(); // change window winprint printwindow.close();// change window winprint }; } else { printwindow.print(); printwindow.close(); } };
if 1 know solution kindly share code
Comments
Post a Comment