danfickle / danfickle/openhtmltopdf

Unexplained gap between table body and bottom running footer with paginated table

Open
#824 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.2k
Forks
423
PR merge metrics
No merged PRs in 30d

Description

With the following HTML (viewed in the sandbox) there is a gap on the first page between the table body and the running footer at the bottom of the page. There is enough space to fit more table rows in the table body before the page break. Maybe there is something I can do to eliminate this, but the CSS does not contain anything (that I can see) that would cause this.

(The following html is not copying correctly using the copy link from this page. The opening and closing html tags are getting dropped. They need added back in on the sandbox page.) [https://sandbox.openhtmltopdf.com/](url)

`


table.mainTable {
width: 100%;
font-size: 16px;
border-collapse: collapse;

/* The magical table pagination property. */
-fs-table-paginate: paginate;

/* Recommended to avoid leaving thead on a page by itself. */
-fs-page-break-min-height: 1.5cm;
}

tr.mainTable ,
thead.mainTable ,
tfoot.mainTable {
page-break-inside: avoid;
}

td.mainTable ,
th.mainTable {
padding: 6px;
border: none;
<!-- border: 1px solid gray;
-->

}

tfoot.mainTable td {
background-color: aqua;
}

thead.mainTable th {
background-color: coral;
}

.label-font {
font-size: 18px;
letter-spacing: 3.6px;
word-spacing: 2.2px;
color: #000000;
font-weight: 700;
font-style: normal;
text-transform: none;
}

.companySection {
margin-top: 10px;
width: 100%;
/* display: flex;*/
justify-content: space-between;
}

.logoBusinessDetails {
flex-grow: 1;
}

.headerBusinessFont {
font-size: 32px;
letter-spacing: 3.6px;
word-spacing: 2.2px;
color: #000000;
font-weight: 700;
text-decoration: overline solid rgb(68, 68, 68);
font-style: normal;
font-variant: small-caps;
text-transform: none;
}

.billTo {
border-left: 15px solid #808080;
/*flex-grow: 1;*/
}

.shipTo {
border-left: 15px solid #808080;
/*flex-grow: 1;*/
}

.documentDetails {
/*border-left: 15px solid #667FFF;*/
/*flex-grow: 1;*/
}

.message {
/*flex-basis: 65%*/
}

.totals {
/*flex-basis: 35%;*/
}

/* Total labels column*/
table.totalLabels {
border-width: 0px 1px 0px 2px;
border-style: solid;
border-color: #000000;
width: 100%;
text-align: right;
border-collapse: collapse;
}

table.totalLabels td,
table.totalLabels th {
border: 1px solid #000000;
padding: 5px 4px;
}

table.totalLabels tbody td {
font-size: 13px;
}

table.totalLabels tfoot {
font-size: 14px;
font-weight: bold;
color: #000000;
border-top: 3px solid #000000;
}

table.totalLabels tfoot td {
font-size: 14px;
}

/* Amounts Column*/
table.totalAmounts {
border-width: 0px 2px 0px 1px;
border-style: solid;
border-color: #000000;
width: 100%;
text-align: right;
border-collapse: collapse;
}

table.totalAmounts td,
table.totalAmounts th {
border: 1px solid #000000;
padding: 5px 4px;
}

table.totalAmounts tbody td {
font-size: 13px;
}

table.totalAmounts tfoot {
font-size: 14px;
font-weight: bold;
color: #000000;
border-top: 3px solid #000000;
}

table.totalAmounts tfoot td {
font-size: 14px;
}

table.documentInfo {
width: 100%;
text-align: right;
}

table.documentInfo td,
table.documentInfo th {
}

.mainTable {
border: 1px solid;
border-collapse: collapse;

}
.mainTable tr,td {
border: 1px solid;
border-collapse: collapse;

}

.invoiceItemsHeading {
border: 1px solid;
border-collapse: collapse;
padding: 0;
height:100%;
width: 100%;
}

@page {
size: letter;
orientation: landscape;
margin: 10px 10px 230px 10px;
@bottom-center {
content: element(testFooter);
}
}

.testFooter {
position: running(testFooter);
}

/* padding: 0;
height:100%;
width: 100%;*/







The 13-letter motto was suggested in 1776 by Pierre Eugene du Simitiere to the
committee responsible for
developing the seal. At the time of the American Revolution, the phrase appeared
regularly on the title page
of the London-based Gentleman's Magazine, founded in 1731,[10][11] which collected
articles from many
sources into one periodical. This usage in turn can be traced back to the
London-based Huguenot Peter
Anthony Motteux, who had employed the adage for his The Gentleman's Journal, or the
Monthly Miscellany
(1692-1694). The phrase is similar to a Latin translation of a variation of
Heraclitus's tenth fragment,
"The one is made up of all things, and all things issue from the one".








Item Total


Discounts


Taxable1


Taxable2


Tax1


Tax2


Payments


Amount Due








232.97


0.00


232.97


0.00


16.31


0.00


0.00


249.28























Bill To:
Data Virtue
Sean Anderson
1711 Sanborn Dr

Cincinnati OH 45215



Ship To:
Data Virtue
Sean Anderson
1711 Sanborn Dr

Cincinnati OH 45215







Invoice Number
I2204031552259


Invoice Date:
2022-03-12


Due Date
2022-03-12


Tax Id
D288658797










Quantity
Code
Description
Unit Price
Tax1
Tax2
Line Total






1

015692731899

Gaming Keyboard
199.99
yes
no
199.99


1

015692731899

Gaming Keyboard
199.99
yes
no
199.99


1

015692731899

Gaming Keyboard
199.99
yes
no
199.99


1

015692731899

Gaming Keyboard
199.99
yes
no
199.99


1

015692731899

Gaming Keyboard
199.99
yes
no
199.99


1

015692731899

Gaming Keyboard
199.99
yes
no
199.99


1

015692731899

Gaming Keyboard
199.99
yes
no
199.99


1

015692731899

Gaming Keyboard
199.99
yes
no
199.99


1

015692731899

Gaming Keyboard
199.99
yes
no
199.99


1

045892797824

Star Wars
17.99
yes
no
17.99


1

045892797824

Star Wars
17.99
yes
no
17.99


1

045892797824

Star Wars
17.99
yes
no
17.99


1

045892797824

Star Wars
17.99
yes
no
17.99


1

045892797824

Star Wars
17.99
yes
no
17.99


1

045892797824

Star Wars
17.99
yes
no
17.99


1

045892797824

Star Wars
17.99
yes
no
17.99


1

045892797824

Star Wars
17.99
yes
no
17.99


1

045892797824

Star Wars
17.99
yes
no
17.99


1

025192792823

Battlestar Galactica: Miniseries
14.99
yes
no
14.99


1

025192792823

Battlestar Galactica: Miniseries
14.99
yes
no
14.99


1

025192792823

Battlestar Galactica: Miniseries
14.99
yes
no
14.99


1

025192792823

Battlestar Galactica: Miniseries
14.99
yes
no
14.99


1

025192792823

Battlestar Galactica: Miniseries
14.99
yes
no
14.99


1

025192792823

Battlestar Galactica: Miniseries
14.99
yes
no
14.99


1

025192792823

Battlestar Galactica: Miniseries
14.99
yes
no
14.99


1

025192792823

Battlestar Galactica: Miniseries
14.99
yes
no
14.99


1

025192792823

Battlestar Galactica: Miniseries
14.99
yes
no
14.99

`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.