writemonkey / wm3

165 stars 5 forks source link

How to add page numbers in PDF export? #349

Closed jweickm closed 4 years ago

jweickm commented 4 years ago

I have tried to adjust the output CSS to include page numbers with

@page {
  @bottom {
    content: "Page " counter(page) " of " counter(pages);
  }
}

but to no avail. Is there a way to print page numbers on PDF documents directly?

jweickm commented 4 years ago

In Writemonkey 2 we had "print from preview". Maybe something similar would be great. Although I never really liked the page numbers being pushed so far into the corner of the page.

writemonkey commented 4 years ago

Hi, print from preview is available in ver3 too, but as a plugin available to donors. @page rule is very limited and won't do what you want. i.

jweickm commented 4 years ago

Hi, thank you for your quick reply! Is this (see screenshots) what you meant? As a donor I also have access to the plugins, but the 'print from preview' window looks quite different than the one in wm2. Sorry for the Japanese language, but it should be visible that there is no option to select the header and footer in wm3, whereas it existed in wm2.

Is there any chance that printing page numbers will come to the next update? Or how does everybody add page numbers?

print from preview wm3 printer dialog wm3 print from preview wm2

writemonkey commented 4 years ago

I see, choose Open in browser and then print from browser, where you can set headers and footers. Iztok

jweickm commented 4 years ago

Alright, that makes sense. I just thought I had missed something as it was possible to do that directly from the print menu in wm2. Thanks for the quick responses! Jakob