//factory.printing.portrait = false
factory.printing.portrait = true

解决方案 »

  1.   

    多谢孟大虾,再请教一下!
    我的页面是javascript程序生成的,如xWindow.document.writeln("xxxxxx……"),页面生成
    以后再打印,后面加上下面这段
       preDlg.location.reload();
       preDlg.document.writeln("<SCRIPT defer>");
       preDlg.document.writeln("function window.onload(){");
       preDlg.document.writeln("factory.printing.portrait=true;");
       preDlg.document.writeln("factory.printing.Print(false,self);"); 
       preDlg.document.writeln("}");
       preDlg.document.writeln("</SCRIPT defer>"); 
    结果没响应一样,该怎么处理好?
      

  2.   

    请问"ScriptX"是什么来 的 ?? 是"javascript"????
      

  3.   

    factory.printing.portrait = true;
    好像没用
      

  4.   

    烦请孟子E章兄再看看,欢迎各位有做过这个经验的大虾指点,也欢迎其他有兴趣的筒子参与
    再说一下我的需求,在某页面some.html,点一个button,弹出一个popup.html,不出现IE的printset对话框,直接实现横打
    在线等待,急!popup.html如下
    <html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>表 - 打印预览</title><link href="pagebreak.css" rel="stylesheet" type="text/css"></head><body bgcolor="#FFFFFF">
    <OBJECT id=factory viewastext style="DISPLAY: none" classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" codeBase="plugins/ScriptX.cab#Version=6,1,431,2"></OBJECT>
    <SCRIPT defer>
    function window.onload(){
    factory.printing.portrait=true;
    factory.printing.disableUI=true;
    }
    </SCRIPT defer>
    <table bgcolor="#A8A8A8" font="宋体" size="12" widhth="95%" align=center><tr height=50> <td   bgcolor="#FFFFFF" valign=top align=center>统计表</td>
    <tr height=541> <td   bgcolor="#FFFFFF" valign="top"><table cellspacing=0 bordercolordark="#000000" cellpadding=0  border=1 style="border-collapse: collapse" bordercolor="#111111">
    <tr>
    <td width=122 height="17" colspan=1>&nbsp;</td>
    <td colspan=1 width=100 align=right>0</td>
    <td colspan=1 width=50 align=right>0</td>
    <td colspan=1 width=100 align=right>0</td>
    <td colspan=1 width=50 align=right>0</td>
    </tr>
    <tr>
    <td colspan=1 width=122>1</td>
    <td colspan=1 width=100 align=right>0</td>
    <td colspan=1 width=50 align=right>0</td>
    <td colspan=1 width=100 align=right>0</td>
    <td colspan=1 width=50 align=right>0</td>
    </tr>
    <tr>
    <td colspan=1 width=122>2&nbsp;</td>
    <td colspan=1 width=100 align=right>0</td>
    <td colspan=1 width=50 align=right>0</td>
    <td colspan=1 width=100 align=right>0</td>
    <td colspan=1 width=50 align=right>0</td>
    </tr>
    <tr>
    <td colspan=1 width=122>3</td>
    <td colspan=1 width=100 align=right>0</td>
    <td colspan=1 width=50 align=right>0</td>
    <td colspan=1 width=100 align=right>0</td>
    <td colspan=1 width=50 align=right>0</td>
    </tr>
    <tr>
    <td colspan=1 width=122>4</td>
    <td colspan=1 width=100 align=right>0</td>
    <td colspan=1 width=50 align=right>0</td>
    <td colspan=1 width=100 align=right>0</td>
    <td colspan=1 width=50 align=right>0</td>
    </tr>
    </table>
    </td></tr></table>
    <SCRIPT defer>
    factory.printing.Print(false,self);
    </SCRIPT defer>
    </body></html>