2013-12-23 56 views
0

我有web应用程序执行报告打印。 我的代码看起来像这样&它正常工作。IE 10打印似乎被缩小了

HTML

<table> 
    <thead> 
     <tr> 
      <th> 
       Header part 
      </th> 
     </tr> 
    </thead> 
    <tbody> 
     <tr> 
      <td> 
       <div id="reportView"> 
        <div class="head centerPosition noPrint"> 
         Report header 
        </div> 
        <div class="content" style="margin: 0px;"> 
         <div id="report" style="margin-top: 10px;"> 
          report content 
         </div> 
        </div> 
        <div class="foot noPrint"> 
         Report footer 
        </div> 
       </div> 
      </td> 
     </tr> 
    </tbody>  
</table> 

CSS

<style media="print"> 
    body 
    { 
     background-color:#FFFFFF; 
     margin: 0px; /* this affects the margin on the content before sending to printer */ 
     width: 100%; 
    } 


    #site_header, #site_footer, .noPrint 
    { 
     visibility: hidden; 
     display: none; 
     height: 0px !important; 
     overflow: hidden !important; 
    } 


    #report .content 
    { 
     width: 100%; margin: 0px; float: none; 
     background: transparent; 
    } 

    #report { 
     background-color: white; 
     width: 100%; 
    } 
</style> 

我打印任何报告后,该报告是缩小在纸上。 如果有人有一个想法如何解决这个问题,请帮助我。我试图搜索谷歌,但没有任何建议是工作。

在此先感谢... Ptinted report look like this

+0

强制性问题:你意外地缩小了吗? –

+0

你有一个实时页面来测试吗? – Godinall

+0

这个项目是活的,对不起,但不公开 – Kishor

回答

0

我的猜测(因为我现在不能测试)是你还需要上述#report .content在每个容器的声明width:100%(从您的HTML提供,它看起来像#reportViewtabletd包含它所有,但可能会有更多)。否则,它将折叠为内容宽度,这是表格单元格的默认行为。