Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

counter(page) is invalid #1

Open
Kujo-Jotaro-AAAAA opened this issue Feb 18, 2022 · 0 comments
Open

counter(page) is invalid #1

Kujo-Jotaro-AAAAA opened this issue Feb 18, 2022 · 0 comments

Comments

@Kujo-Jotaro-AAAAA
Copy link

hello ~
why counter(page) is invalid , Always 0 ?

`

<title>Document</title>

Clients report

Annual Report of our Company

Client

<p>Name: ${client.fields.title}</p>
<p>Summary: ${client.fields.summary}</p>
`

`body {
font: 12pt Georgia, "Times New Roman", Times, serif;
line-height: 1.3;
}

@page {
/* switch to landscape /
size: A4;
/
set page margins /
margin: 0.5cm;
/
Default footers */
@bottom-left {
content: "Department of Strategy";
}
@bottom-right {
content: counter(page) " of " counter(pages);
}
}

/* footer, header - position: fixed */
#header {
position: fixed;
width: 100%;
top: 0;
left: 0;
right: 0;
}

#footer {
position: fixed;
width: 100%;
bottom: 0;
left: 0;
right: 0;
}

/* Fix overflow of headers and content */
body {
padding-top: 50px;
}
.custom-page-start {
margin-top: 50px;
}

.custom-footer-page-number:after {
content: counter(page) counter(pages);
}
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant