Use paged.js to generate a separate footer on the last page
P粉785957729
P粉785957729 2023-09-01 10:54:58
0
1
609
<p>I'm trying to use <strong>paged.js</strong> to generate a separate footer for the last page. The total number of pages is dynamic. </p> <p>I've tried the named page approach without success as it generates an extra blank page at the end, although it gives the correct final footer at the end. </p> <p>Can anyone help me? </p>
P粉785957729
P粉785957729

reply all(1)
P粉810050669

Currently, Paged.js does not have a selector like :last to select the last page.

Based on your question, I understand that you want to target the part of the last page that has content. The named page approach you mentioned doesn't work because named pages rely on the class they are called from, and that class has to be added on an element or section that might be on a different page layout. You need to manually see how long the text is on the last page and put it into a div with a named page class for this to work.

I suspect the only other way at the moment is to generate the book, manually see how many pages there are, and enter the number of pages in the

@page :nth() pseudo-class.

Context: I tried setting up the rule using @page :nth(counter(pages)), but the counter only seems to work inside curly braces . This causes paged.js to fail.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template