http://www.fcsoft.com.cn/eprint/index.htm

解决方案 »

  1.   

    可以通过JS控制,也可能要求客户端用户更改本机的IE打印
    <OBJECT id=WebBrowser classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 width=0 VIEWASTEXT></OBJECT>
    <script language="VBScript"> 
    dim hkey_root,hkey_path,hkey_key 
    hkey_root="HKEY_CURRENT_USER" 
    hkey_path="\Software\Microsoft\Internet Explorer\PageSetup" 
    '设置网页打印的页眉页脚为空 
    function pagesetup_null()
    on error resume next
    Set RegWsh = CreateObject("WScript.Shell")
    hkey_key="\header"
    RegWsh.RegWrite hkey_root+hkey_path+hkey_key,""
    hkey_key="\footer"
    RegWsh.RegWrite hkey_root+hkey_path+hkey_key,""
    'rem 上边页边距
    hkey_key="\margin_top"
    RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"0.36929"
    'rem 底边页边距
    hkey_key="\margin_bottom"
    RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"0.68425"
    'rem 左边页边距
    hkey_key="\margin_left"
    RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"0.14016"
    rem 右边页边距
    hkey_key="\margin_right"
    RegWsh.RegWrite hkey_root+hkey_path+hkey_key,"0.14016" 
    end function
    pagesetup_null()
    </script>