Hello guys 😊
The PDF displays a watch list in a very long table (90 pages).
The table header is repeated at the top of each page.
We have collections. Collections have models and models have variations (sometimes a lot).
If a page starts by a variation, it’s bad, because we need to look at the previous page to know the model of this variation.
If a page starts by a collection or a model, it’s OK, I don’t want to do anything.
So I want to detect the first element of each page.
If it’s a variation (and only in this case), I want to clone the previous model (<tr class=”model”>) and add it as the first element of the page (just before the variation).
The complex thing is that a model can start at any point of the page, the number of variations for each model varies a lot, and the height of each variation (multi languages) varies a lot.
The document is a big table like this:
(page 1)
<tr class=”collection 1”>
<tr class=”model 1”> // model
<tr class=”variation”>
<tr class=”variation”>
<tr class=”variation”>
<tr class=”variation”>
<tr class=”model 2”> // model to be cloned
<tr class=”variation”>
<tr class=”variation”>
(page 2)
<tr class=”variation”> ==> first item of the page is a variation ==> I want to insert a "model 2" clone here before the variation
<tr class=”variation”>
<tr class=”variation”>
Thank you 😊
The PDF displays a watch list in a very long table (90 pages).
The table header is repeated at the top of each page.
We have collections. Collections have models and models have variations (sometimes a lot).
If a page starts by a variation, it’s bad, because we need to look at the previous page to know the model of this variation.
If a page starts by a collection or a model, it’s OK, I don’t want to do anything.
So I want to detect the first element of each page.
If it’s a variation (and only in this case), I want to clone the previous model (<tr class=”model”>) and add it as the first element of the page (just before the variation).
The complex thing is that a model can start at any point of the page, the number of variations for each model varies a lot, and the height of each variation (multi languages) varies a lot.
The document is a big table like this:
(page 1)
<tr class=”collection 1”>
<tr class=”model 1”> // model
<tr class=”variation”>
<tr class=”variation”>
<tr class=”variation”>
<tr class=”variation”>
<tr class=”model 2”> // model to be cloned
<tr class=”variation”>
<tr class=”variation”>
(page 2)
<tr class=”variation”> ==> first item of the page is a variation ==> I want to insert a "model 2" clone here before the variation
<tr class=”variation”>
<tr class=”variation”>
Thank you 😊