Use paged.js to generate a separate footer on the last page
P粉785957729
P粉785957729 2023-09-01 10:54:58
0
1
533

I'm trying to use paged.js to generate a separate footer for the last page. The total number of pages is dynamic.

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.

Can anyone help me?

P粉785957729
P粉785957729

reply all (1)
P粉810050669

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

Based on your question, I understand that you want to target thepart 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 adivwith 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
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!