Hy Every body
I am try to use page break before when I want to convert html to pdf report by webkit but it doesn't work .
So I need To any one can help me to solve this issue
This is my script but the bage break is not work
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('table.basic_table').each(function(i, tabela){
var per_page = 5;
var pages = Math.ceil($('tbody tr').length / per_page);
if (pages == 1)
return;
var ultimo = $(tabela);
for(var p = 1; p <= pages; p++) {
var copy = ultimo.clone();
$('tbody tr', ultimo).each(function(i, tr){
if (i >= per_page) {
$(tr).remove();
}
});
$('tbody tr', copy).each(function(i, tr){
if (i < per_page) {
$(tr).remove();
}
});
if (p < pages)
copy.insertAfter(ultimo);
copy.css('page-break-before', 'always');
ultimo = copy;
}
});
});
</script>
Thanks Alot