Click here to Skip to main content
15,897,891 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a div that is rtl and content of the div is right to left. with the code below I print it but the result becomes left to right.
JavaScript
function CallPrint(strid) {
        var prtContent = document.getElementById(strid);
        var WinPrint = window.open('', '', 'letf=0,top=0,width=800,height=100,toolbar=0,scrollbars=0,status=0,dir=rtl');
        WinPrint.document.write(prtContent.innerHTML);
        WinPrint.document.dir = "rtl";
        WinPrint.document.close();        
        WinPrint.focus();
        WinPrint.print();
        WinPrint.close();
        prtContent.innerHTML = strOldOne;
    }

strid should be name of div.
How can i correct it to be printed in the right way?
Thanks in Advanced.
Posted
Comments
Prasad Khandekar 28-Apr-13 11:11am    
Why to do think it's a problem. The content is showing up correctly as expected (Right To Left). That's what you are setting using the dir attribute of the document.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900