Reputation: 41
const handlePrint = useReactToPrint({
content: () => currentRef,
pageStyle: `
@page {
size: auto;
margin: 11mm 17mm 17mm 17mm;
@top-right-corner {
content: "Page " counter(page);
}
}`,
documentTitle: "Statement"
});
This is my code and how can i show page number in my print pdf page? many times i try but it doesn't work some one can help me?
Upvotes: 1
Views: 3705
Reputation: 311
Seems like the selector you have used is the issue here.
I recommend using the @top-right
selector or @bottom-right
selector instead of @top-right-corner
selector.
Upvotes: 0