public TableBody getTableFooter() {
return tableFooter;
}
+
+ /** @return true if the table-header should be omitted at breaks */
+ public boolean omitHeaderAtBreak() {
+ return (this.tableOmitHeaderAtBreak == EN_TRUE);
+ }
+
+ /** @return true if the table-footer should be omitted at breaks */
+ public boolean omitFooterAtBreak() {
+ return (this.tableOmitFooterAtBreak == EN_TRUE);
+ }
/**
* @return the "inline-progression-dimension" property.
private List bodyBreaks = new java.util.ArrayList();
private BreakPoss headerBreak;
private BreakPoss footerBreak;
+ private boolean firstRowHandled = false;
private int referenceIPD;
private boolean autoLayout = true;
//Calculate the headers and footers only when needed
MinOptMax headerSize = null;
if (getTable().getTableHeader() != null) {
- Body tableHeader = new Body(getTable().getTableHeader());
- tableHeader.setParent(this);
- headerBreak = getHeight(tableHeader, context);
- headerSize = headerBreak.getStackingSize();
- stackSize.add(headerSize);
+ if (!getTable().omitHeaderAtBreak() || !firstRowHandled) {
+ Body tableHeader = new Body(getTable().getTableHeader());
+ tableHeader.setParent(this);
+ headerBreak = getHeight(tableHeader, context);
+ headerSize = headerBreak.getStackingSize();
+ stackSize.add(headerSize);
+ }
}
+ //TODO Implement table-omit-footer-at-break once the page breaking
+ //is improved, so we don't have to do this twice
MinOptMax footerSize = null;
if (getTable().getTableFooter() != null) {
Body tableFooter = new Body(getTable().getTableFooter());
stackSize.add(bp.getStackingSize());
lastPos = bp;
bodyBreaks.add(bp);
+ firstRowHandled = true;
if (bp.nextBreakOverflows()) {
over = true;