Stop Invoice Lines Starting on a New Page

If you have an Invoice, Quote or Purchase with a first Line Item that extends to the second page, you will likely find the entire Line Item has been moved to the second page leaving the first page without a table body.

This is due to the design of PDF Themes ensuring the second Line Item onwards does not have breaks inserted in the middle of the description to enable a better reading experience across multiple pages, Line Items, and Comments. You can negate this for the first Line Item by amending the CSS of the PDF Theme, however, as the default Classic and Clean Themes have protected sheets to amend this code you will need to create your own PDF Theme, more information on this can be found here.

To amend CSS you will first need to navigate to:
Settings > PDF Themes > [Click on your PDF Theme] > HTML &  CSS > DOCUMENT.CSS

At the bottom of this sheet (or anywhere else you deem appropriate) add the following selectors, property and values:


.invoice #pdfdoc #document-lines tbody tr:first-child td { page-break-inside: auto !important; }
.quote #pdfdoc #document-lines tbody tr:first-child td { page-break-inside: auto !important; }
.purchaseOrder #pdfdoc #document-lines tbody tr:first-child td { page-break-inside: auto !important; }

You can also define a Page Break to be inserted in any Line with an extended Comment or Description by inserting this code in the stead of the above:


.invoice #pdfdoc #document-lines tbody tr td { page-break-inside: auto !important; }
.quote #pdfdoc #document-lines tbody tr td { page-break-inside: auto !important; }
.purchaseOrder #pdfdoc #document-lines tbody tr td { page-break-inside: auto !important; }

This will specify that any document with an extended Description in any of the first, or any lines will have a page-break inserted where appropriate, and upon clicking “Save & Preview” you can test this on the document types of Invoice, Quote and Purchase.

See how IRIS KashFlow works with your business and your books