Forum How do I...?

How to use position absolute to reorganize items

danilovaz
I don't know if what I'm talking about is possible, I've seen some threads in the forum about Position Absolute and even the part of the documentation that says about what happens with my PDF today:

Why is all the document's content displayed on one page, while I was expecting it to take several pages?

Typically a document displays on only one page, even though it should be much longer, because:

it is wrapped up in an absolutely positioned element, or
in a floated block element, or
in a single inline-block element, or
in an element with fixed height, or
in an element with overflow: hidden,
which Prince cannot split over several pages.

But I really need to use Absolute as it is used to rearrange the order in which items will appear (and they can appear on the screen in a different order from the document flow, including side by side).

Is there any way to be able to use Absolute without the content being cut off on the first page and the other pages being empty?

I have attached an example of how it looks.

Thank you very much.
  1. doc-216708462 (1).pdf57.7 kB
  2. doc-216712909.pdf61.7 kB
pjrm
Flexbox is the most obvious way of reordering content visually if you need tagged PDF and need the structure tree to remain in its original order: https://www.w3.org/TR/css-flexbox-1/#flow-order

Earlier versions of Prince had limitations on paginating flex items, but I've tested just now that current Prince correctly splits flex items across pages whether flex-direction is row, column, row-reverse or column-reverse; and that the 'order' property works as expected; and that the text order in tagged pdf is that of the input document.
  1. reordering.html11.3 kB
  2. reordering.pdf52.4 kB