<!DOCTYPE html>
<html>
<head>
	<title><?php echo $item_details->item_name?></title>
</head>
<body>
	<button type="button" class="print_code">PRINT</button>
	<div id="DivIdToPrint">
	<table width="594px">
		<?php for ($i=0; $i <= 9; $i++) { ?>
			<tr style="height:108.2px"> <?php // 84.2px ?>
				<td width="25%" style="font-size: 13px;" align="center"><img src="<?php echo barcode_url($item_details->item_no.'.jpg');?>" width="191px"><br/><?php echo $item_details->item_name?><br/><br/></td>
				<td width="25%" style="font-size: 13px;" align="center"><img src="<?php echo barcode_url($item_details->item_no.'.jpg');?>" width="191px"><br/><?php echo $item_details->item_name?><br/><br/></td>
				<td width="25%" style="font-size: 13px;" align="center"><img src="<?php echo barcode_url($item_details->item_no.'.jpg');?>" width="191px"><br/><?php echo $item_details->item_name?><br/><br/></td>
				<td width="25%" style="font-size: 13px;" align="center"><img src="<?php echo barcode_url($item_details->item_no.'.jpg');?>" width="191px"><br/><?php echo $item_details->item_name?><br/><br/></td>
			</tr>
		<?php }?>
	</table>
	</div>
	<script src="<?php echo js_url('jquery-2.1.1');?>"></script>
	<script type="text/javascript">
    $(document).ready(function(){
      $('.print_code').on('click',function(){
        var divToPrint=document.getElementById('DivIdToPrint');
        var newWin=window.open('','Print-Window');
        newWin.document.open();
        newWin.document.write('<html><body onload="window.print()">'+divToPrint.innerHTML+'</body></html>');
        newWin.document.close();
        setTimeout(function(){newWin.close();},10);
      });
    });
  </script>
</body>
</html>