PDA

View Full Version : سوال: پرینت از صفحه بدون نمایش پرینتر ها ؟؟؟؟؟؟؟؟؟؟؟؟



malihehshajari
شنبه 19 بهمن 1392, 12:51 عصر
سلام
من میخوام از صفحه پرینت بگیرم و مستقیم صفحه رو بفرستم روی پرینتر بدون اینکه کاربر صفحه انتخاب پرینتر ها رو ببینه

کد زیر رو نوشتم :





<script type="text/javascript">


function m(elem)

{


Popup($(elem).html());



}

function Popup(data)
{
var mywindow = window.open('', 'my div', 'height=400,width=600');
mywindow.document.write('<html><head><title>my div</title>');
/*optional stylesheet*/ //mywindow.document.write('<link rel="stylesheet" href="main.css" type="text/css" />');
mywindow.document.write('</head><body >');
mywindow.document.write(data);
mywindow.document.write('</body></html>');

mywindow.print();
mywindow.close();

return true;
}

</script>




ولی این صفحه پرینتر ها رو نشون میده

یک سوال دیگه چطور میتونم از داخل برنامه پرینتر رو انتخاب کنم ؟؟؟؟؟؟؟؟؟؟؟؟؟

با تشکر

malihehshajari
شنبه 19 بهمن 1392, 14:35 عصر
برای ست کردن پرینتر پیش فرض import win32print باید استفاده کنم ؟؟؟؟؟؟؟؟؟؟؟؟؟
ولی خطا میده :

No module named win32print

هر چی میگردم چیزی پیدا نمیکنم که این رو نصبش کنم
میشه کمک کنید ؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟؟

n.nowroozi
پنج شنبه 24 بهمن 1392, 17:50 عصر
از قرار داخل یک پکیجی به اسم python for win32 extensions قرار داره
http://starship.python.net/~skippy/win32/Downloads.html (http://starship.python.net/%7Eskippy/win32/Downloads.html)
http://timgolden.me.uk/pywin32-docs/win32print.html