html printing with page-break-inside:avoid

78 Views Asked by At

I have a lot of divs on a page with variable amounts of content in them. I have set page-break-inside: avoid; for these divs. Now the question is how I can reorder this divs to print efficiently.

For example:

div1 - content occupies half paper page
div2 - content occupies full paper page
div3 - content occupies half paper page

When printing these out - they will use 3 pages. Is it possible to reorder them like so:

div1
div3
div2

This way they will only use 2 pages of paper.

Is there a way to re-organize the div elements to efficiently print?

1

There are 1 best solutions below

0
On

I would say that if you have specific sizes, a start would be to set your width, height in px knowing that 100px = 2.645833333cm and play accordingly