ورود

View Full Version : سوال: مشکل در راستچین کردن توسط کد زیر



mohsen.nsb44
چهارشنبه 16 اردیبهشت 1394, 15:08 عصر
سلام من از کد زیر برای چاپ در asp.net استفاده میکنم اما با فارسی مشکل داره و برعکس چاپ میکنه چطور باید فارسیش کنم؟



<script type = "text/javascript">
function PrintPanel() {
var panel = document.getElementById("<%=pnlContents.ClientID %>");
var printWindow = window.open('', '', 'height=400,width=800');
printWindow.document.write('<html><head><title>DIV Contents</title>');
printWindow.document.write('</head><body >');
printWindow.document.write(panel.innerHTML);
printWindow.document.write('</body></html>');
printWindow.document.close();
setTimeout(function () {
printWindow.print();
}, 500);
return false;
}

mohsen.nsb44
شنبه 26 اردیبهشت 1394, 12:01 عصر
بین اینهمه اعضا کسی نمیدومه چطور میشه مشکلشو با فارسی حل کرد؟

alireza_s_84
شنبه 26 اردیبهشت 1394, 13:16 عصر
سلام من از کد زیر برای چاپ در asp.net استفاده میکنم اما با فارسی مشکل داره و برعکس چاپ میکنه چطور باید فارسیش کنم؟



<script type = "text/javascript">
function PrintPanel() {
var panel = document.getElementById("<%=pnlContents.ClientID %>");
var printWindow = window.open('', '', 'height=400,width=800');
printWindow.document.write('<html><head><title>DIV Contents</title>');
printWindow.document.write('</head><body >');
printWindow.document.write(panel.innerHTML);
printWindow.document.write('</body></html>');
printWindow.document.close();
setTimeout(function () {
printWindow.print();
}, 500);
return false;
}



function PrintPanel() {
var panel = document.getElementById("<%=pnlContents.ClientID %>");
var printWindow = window.open('', '', 'height=400,width=800');
printWindow.document.write('<html><head><title>DIV Contents</title>');
printWindow.document.write('</head><body >');
printWindow.document.write('<div style="dir: rtl;">');
printWindow.document.write(panel.innerHTML);
printWindow.document.write('</div >');
printWindow.document.write('</body></html>');
printWindow.document.close();
setTimeout(function () {
printWindow.print();
}, 500);
return false;
}

mohsen.nsb44
شنبه 26 اردیبهشت 1394, 18:02 عصر
دوست عزیز متاسفانه باز موقع پرینت همون مشکل پا برجاست