0
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?

Ashan
  • 31
  • 7

1 Answers1

0

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.

Yunnosch
  • 26,130
  • 9
  • 42
  • 54
Amith Mihiranga
  • 281
  • 2
  • 8