2

I have PDF Page with header, customer fields, products and footer. When I have 3 or more products on page my footer go on second page and it's not good. What I need is on the first page it will be header, customer fields, two products and footer. On second page header, one product and footer. My page contains divs, sometimes tables.

Maybe someone get same situation. Thanks for help.

Stopper
  • 411
  • 3
  • 13
  • If this is a page header/footer you can use [fixed-position elements](http://stackoverflow.com/questions/7484318/header-in-pdf-page-using-dompdf-in-php/7489564#7489564). If this is a table header/footer, well, footer support isn't yet supported. – BrianS Nov 25 '13 at 15:50

1 Answers1

0

Try to apply a page break after the 2nd product item using CSS page-break-before

Apparently DomPDF will handle it as expected. See related.

Community
  • 1
  • 1
marekful
  • 14,986
  • 6
  • 37
  • 59
  • Thanks for reply, but this css just transfer my products on second page. – Stopper Nov 22 '13 at 11:51
  • Read the post more carefully or Google the topic. You should add an empty div tag with `page-break-before` after the 2nd product. If products are listed in a table, the table must be closed after the 2nd product, the page breaker div inserted, and the table re-opened for further products. – marekful Nov 22 '13 at 12:01