I want to print the barcode from barcode printer, the size of barcode label is 2.5cm in height & width is 5cm that is from client side.
Here my problem is, when ever I try to customize the size of the barcode, the window size is customizing not the barcode size that is present in document in windows.print().
I have tried a lot but I couldn't, here in below coding I tried to adjust the document size in window but window is not appearing when I click Print button.
Pls help to bring the exact document size in window & make it to print the barcode...
<asp:Button ID="btnPrint" runat="server" ToolTip="Click Here to Print"
OnClientClick="ClientSidePrint('divprint');"
CssClass="add_btn" Text="Print" Height="25" />
function ClientSidePrint(divBarcodeLabel) {
var s = $find('MPE1');
s.show();
document.getElementById("subhead").style.display = "block";
var w = 378;
var h = 283;
var l = (window.screen.availWidth - w) / 2;
var t = (window.screen.availHeight - h) / 2;
var sOption = "toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,width=" + w + ",height=" + h + ",left=" + l + ",top=" + t;
var sDivText = window.document.getElementById(divBarcodeLabel).innerHTML;
var objWindow = window.open("", "Print", sOption);
objWindow.document.write(sDivText);
objWindow.document.close();
objWindow.print();
objWindow.close();
}