What I want is to have a different footer for left and right facing pages starting from the first content page. And the first content page is always left.
My pdf structure:
1 cover page
1-n pages of TOC
n pages of actual content
in HTML:
At first I tried the following css, but because I do not know the number of TOC pages, the first content page might be right facing.
test-1.pdf
Then I tried the following CSS, but the right footer only appears once. All the other pages had the left footer.
test-2.pdf
Finally, I tried the following CSS, but the left/right footers only work inside div.item. If div.item has an odd amount of pdf pages, meaning that the last page has a left footer, the next .item starts with a left footer resulting in two pages with left footer next to each other.
test-3.pdf
How should I change my approach to achieve a different footer for every other page, starting from the first content page?
My pdf structure:
1 cover page
1-n pages of TOC
n pages of actual content
in HTML:
<div id="cover"></div>
<div id="toc"></div>
<div id="content">
<div class="item">This item has enough content for 2 pdf pages</div>
<div class="item">This item has enough content for only 1 page</div>
<div class="item">This item has enough content for 2 pdf pages</div>
</div>
At first I tried the following css, but because I do not know the number of TOC pages, the first content page might be right facing.
@page:left {
@bottom {
content: "Left footer";
}
}
@page:right {
@bottom {
content: "Right footer";
}
}
test-1.pdf
Then I tried the following CSS, but the right footer only appears once. All the other pages had the left footer.
@page content {
@bottom {
content: "Left footer";
}
}
@page content:nth(2) {
@bottom {
content: "Right footer";
}
}
---
#content {
page: content;
prince-page-group: start;
}
test-2.pdf
Finally, I tried the following CSS, but the left/right footers only work inside div.item. If div.item has an odd amount of pdf pages, meaning that the last page has a left footer, the next .item starts with a left footer resulting in two pages with left footer next to each other.
@page content {
@bottom {
content: "Left footer";
}
}
@page content:nth(2) {
@bottom {
content: "Right footer";
}
}
---
#content .item {
page: content;
prince-page-group: start;
}
test-3.pdf
How should I change my approach to achieve a different footer for every other page, starting from the first content page?