1

I'm converting this html into a pdf using wkhtmltopdf 0.12.2.4 64-bit on Windows. I need to have a page break after every table as the next table will appear on the next page. This will be used for label printing so accuracy is key.

This is the resulting PDF

The first two pages are perfect but then it starts going south for inexplicable reasons.

I've tried the options presented in this thread and subsequent hyperlinked threads but nothing helped, I've yet to see an affect with page-break-inside: avoid !important;.

halfer
  • 19,824
  • 17
  • 99
  • 186
BelgoCanadian
  • 893
  • 1
  • 11
  • 31

1 Answers1

0

I'm using this css style for page break and it work fine.

<div class="page-break"></div>

Use this div in your html view, in your case after table. and add style in your css.

<style type="text/css">
    .page-break { display:block; clear:both; page-break-after:always; }
</style>
abhi-axis
  • 149
  • 1
  • 12