0

div has has プロパティを印刷したいoverflow-x:auto;(いくつかのページ幅をラップします)。

Chrome では、ページが拡大縮小され、正しく表示されます。ただし、IE (8-10) では、div が画面に表示されている部分に切り捨てられます。

以下は私の機能です:

function print() {
            var printContent = document.getElementById("<%=printable.ClientID%>");
            var windowUrl = 'about:blank';
            var uniqueName = new Date();
            var windowName = 'Print' + uniqueName.getTime();
            var printWindow = window.open(windowUrl, windowName, 'left=5000,top=5000,width=0,height=0');

            printWindow.document.write("<html> ");
            printWindow.document.write("<head> ");
            printWindow.document.write("<link type=text/css rel=stylesheet href='/eBusinessStylesNew.css' /> ");
            printWindow.document.write("</head> ");
            printWindow.document.write("<body topmargin=0 leftmargin=0 bgcolor='#ffffff'> ");
            printWindow.document.write(printContent.innerHTML);
            printWindow.document.write("</body> ");
            printWindow.document.write("</html> ");
            printWindow.document.close();
            printWindow.focus();
            printWindow.print();
            printWindow.close();
            return false;
        }

私のdivを正しく印刷するために関数に追加できるものはありますか?

4

1 に答える 1