使用jqueryprint.js打印时,firefox浏览器在内容前显示额外的1页

使用jqueryprint.js打印时,firefox浏览器在内容前显示额外的1页,jquery,css,html,printing,Jquery,Css,Html,Printing,我正试图用php打印一个包含动态内容的HTML页面的一部分,其中有一个大的空格作为标题,因为在打印后打印其他内容时,该部分应该是空的。经过这么多的尝试,我得到了完美的结果铬,但火不是打印像铬 为什么firefox之前要添加一个额外的页面?没有内容就可以了。但是,如果我为div或margin添加了任何内容或高度,则只需打印页眉即可添加额外的页面 用于打印的HTML代码结构是 <section class="panel" id="payablePrint"> <tab

我正试图用php打印一个包含动态内容的HTML页面的一部分,其中有一个大的空格作为标题,因为在打印后打印其他内容时,该部分应该是空的。经过这么多的尝试,我得到了完美的结果铬,但火不是打印像铬

为什么firefox之前要添加一个额外的页面?没有内容就可以了。但是,如果我为div或margin添加了任何内容或高度,则只需打印页眉即可添加额外的页面

用于打印的HTML代码结构是

    <section class="panel" id="payablePrint">
   <table>
    <thead >
      <tr>
        <th style="width:100%">
           <div id="print_header"style="opacity: 0.001;">
              Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
              Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
              Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s.
           </div>
        </th>
     </tr>
  </thead>
  <tbody>
     <tr>
        <td>
          <table style="width:100%">
            <tr>
               <th>Firstname</th>
               <th>Lastname</th> 
               <th>Age</th>
           </tr>
           <tr>
              <td>Jill</td>
              <td>Smith</td> 
              <td>50</td>
           </tr>
           <tr>
              <td>Eve</td>
              <td>Jackson</td> 
              <td>94</td>
           </tr>
    </table>
       </td>
     </tr>
    </tbody>
  <tfoot>
  <tr>
        <td>
           footer here....,.
        </td>
     </tr>
    </tfoot>
   </table>
   </section>
   <div class="row">
   <div class="col-lg-12 text-right">
     <button id="" onclick="printDiv('payablePrint')"  class="btn btn-shadow btn-primary jdIconButton"><i class="fa fa-print"></i> Print Agreement</button>
   </div>
</div>
为什么firefox之前要添加一个额外的页面?没有内容就可以了。但是,如果我为div或margin添加任何内容或高度,则只添加标题的额外页面。
任何形式的帮助都会很好

根据需要使用colspan和rowspan。删除主表中的子表。请检查下面的代码


Lorem Ipsum只是印刷和排版行业的虚拟文本。自16世纪以来,Lorem Ipsum一直是行业标准的虚拟文本,当时一位不知名的印刷商拿起一个打印工具,将其拼凑成一本打印样本书。它不仅存活了五个世纪,而且还跨越到电子排版,基本上保持不变。它在20世纪60年代随着包含Lorem Ipsum段落的Letraset表单的发布而流行,最近随着Aldus PageMaker等桌面出版软件的发布,包括Lorem Ipsum版本。
Lorem Ipsum只是印刷和排版行业的虚拟文本。自16世纪以来,Lorem Ipsum一直是行业标准的虚拟文本,当时一位不知名的印刷商拿起一个打印工具,将其拼凑成一本打印样本书。它不仅存活了五个世纪,而且还跨越到电子排版,基本上保持不变。它在20世纪60年代随着包含Lorem Ipsum段落的Letraset表单的发布而流行,最近随着Aldus PageMaker等桌面出版软件的发布,包括Lorem Ipsum版本。
Lorem Ipsum只是印刷和排版行业的虚拟文本。自16世纪以来,Lorem Ipsum一直是行业标准的虚拟文本。
内容在这里。。。。。。
页脚在这里。。。。,。
打印协议
 @media print{

 #print_header{
   display: block;
  }
  #Footer{
  display: none !important;
  margin-bottom: 0px;
  margin-top: 0px;
  }
  #printFooter {
  display: block;
  position: fixed; 
  bottom: 0px;
  left: 154px;
  }
 .panel-footer{
  border-top: none !important;
 }
 /* *************** */
 thead { display: block; page-break-after: avoid;page-break-before: avoid;}
 table { page-break-after:auto; }
 tr    { page-break-inside:avoid; page-break-after:auto; }
 td    { page-break-inside:avoid; page-break-after:auto; }
 thead { display:table-header-group; page-break-before: avoid;}
 tboby { display: table-row-group;page-break-after: avoid;page-break-before: avoid;}
 tfoot { display:table-footer-group;}
/* *************** */

 #footer {
  display: block; 
  position: fixed; 
  bottom: 0;
}
#companyName{
  margin-top: -10px !important; 
}
.panel-body{ 
  margin: -1mm 0mm 10mm 0mm !important;

}

.agreement_title{
  margin-top: -15px !important;
}
.margin_top{
  margin-top: -6px !important;
}

}