静态点分页

时间:2015-09-27 08:38:43

标签: javascript html html-table page-break

我有一个包含两个动态表的页面。

当我想要打印我的页面时,我的每个表格将被分开,一面在一页,另一面在其他页面。 (两个表都是动态的)

我想在任何672px

中制作静态分页符

我做了很多事,但我仍然没有得到回应。 反正对我来说?

我的HTML:

<table id="selectedTable" style="width: 100%; font-size: 12pt; margin-top: 2px; text-align: right; border-top: 4px solid #000000; border-right: 4px solid #000000;border-left: 4px solid #000000;">
   <tr>
      <td colspan="{{(TotalDetailsOfUsagesCurrent.length * 2) + 2}}TotalDetailsOfUsagesCurrent">Blah blah</td>
   </tr>
   <tr>
      <td width="53px">
         <div style="text-align: center;">Usage</div>
      </td>
      <td ng-repeat='TDUC in TotalDetailsOfUsagesCurrent track by $index' colspan="2">
         {{TDUC.UsageType}}
      </td>
      <td width="55px" style="border-bottom: 2px solid #000000; border-top: 2px solid #000000;  font-size: 12pt;text-align: center; ">
         <div>Total</div>
      </td>
   </tr>
   <tr id="selectedRow" ng-click="heightChecker(this)" ng-repeat='DFC in DetailsOfFloorsCurrent'>
      <td width=" 53px">
         <div dir="ltr"> {{getFloorName(DFC.FloorNo)}} </div>
      </td>
      <td ng-repeat-start="usage in DFC.Usages track by $index">{{usage.UnitNo}}</td>
      <td ng-repeat-end>{{usage.UnitArea}}</td>
      <td width="55px">
         {{DFC.TotalAreaCurrent.toFixed(2)}}
      </td>
   </tr>
   <tr>
      <td>
         <div>Total</div>
      </td>
      <td ng-repeat-start="TDFC in TotalDetailsOfUsagesCurrent">{{TDFC.UnitNo}}</td>
      <td ng-repeat-end>{{TDFC.UnitArea.toFixed(2)}}</td>
      <td>{{TotalAreaCurrent.toFixed(2)}}</td>
   </tr>
</table>

JS:

$scope.heightChecker = function (row) {
    selectedRow[row.$index].offsetTop; //it gives me my row distance from top of table. for getting the pixles. but its usless

}

0 个答案:

没有答案