i want to print HTML and java script doc. but when i print the page it give me waste page that is my content is 10 to 15 line but whole page comes out of the printer as i m printing using window.document.print. the page cut after leave a lot of space and my more a\than half page is wasted .
how can i
auto cut my page when my content gets over so my page will not be wasted.
i m using Epson TM u220 roll printer.
i am using following code
var display_setting="toolbar=yes,location=no,directories=yes,menubar=yes,";
display_setting+="scrollbars=yes,width=300,height=400, left=100, top=25";
var content_innerhtml = document.getElementById("displaybill").innerHTML;
var document_print=window.open("","",display_setting);
var str='<html><body><div style="overflow:auto; width:210px;"> <center style="font-size:18px;">Test bill</center>';
document_print.document.write(str);
document_print.document.write('<hr/>');
document_print.document.write('<div style="width:210px;font-size:18px;">Date : '+myvariable+'</div>');
document_print.document.write('<hr/>');
document_print.document.write('<table style="width:200px;font-size:18px;" ><tr ><td width="50%" ><b>Item Name</b></td> <td width="20%" style="text-align:right;font-size:18px;"><b>Qty.</b></td> <td width="30%" style="font-size:18px;text-align:right;"><b>Rs.</b></td></tr>');
document_print.document.write('<tr><td>my detail </td><td>my detail </td><td>my detail </td></tr>');
document_print.document.write('<tr><td>my detail </td><td>my detail </td><td>my detail </td></tr>');
document_print.document.write('<tr><td>my detail </td><td>my detail </td><td>my detail </td></tr>');
document_print.document.write('<tr><td>my detail </td><td>my detail </td><td>my detail </td></tr>');
document_print.document.write('</table>');
document_print.document.write('<hr/>');
document_print.print();
document_print.close();
i want the auto cut after above lines are printed without leaving page blank.