Reduce the count of pages via swap the blocks of text

I finished the macro before few minutes, but I used own new algorithm and I write the documentation. There are some unexpected insidiousnesses in LibreOffice, so I also add the descriptions of ones to documentation. But unfortunately I have backache, so I need more days to finish it.

The blocks can be rearranged so that minimum pages will be required to print.

Uufff! It was hard work. Run macro ReducePages from menu TREEPACKING or module TreePacking. It will open the FilePicker to select the reduced file. Selected file will be copied to new one with suffix -REDUCED.
treepacking-macro-and-documentation.odt (91.6 kB)

Tested file:
tested-file.odt (35.4 kB)

The worst case could occur is MISSING TABLES
missing-tables
that meas not all blocks were pasted to new file.
I hope it will not occur, but I’m not sure I discovered all insidiousnesses.

2 Likes

This is so elegant that it’s almost genius! I sincerely admire the work done!

I hope your health is better now?

:slight_smile: . And yes, health is better and I prepare my webpages. Probably in a few days I will finish it.