Edinburgh-Genome-Foundry / pdf_reports

:closed_book: Python library and CSS theme to generate PDF reports from HTML/Pug
https://edinburgh-genome-foundry.github.io/pdf_reports/
MIT License
225 stars 40 forks source link

Turn off/remove "Page x/X" footer. #7

Closed JoshuaC3 closed 4 years ago

JoshuaC3 commented 5 years ago

Fairly self explanatory, I'd like the option to turn off the Page 1 of 1 footer etc, at the bottom of the PDF.

Is there currently a way of doing this? Thanks!

Zulko commented 5 years ago

I believe you can remove this using the (S)CSS styles:

@page {
  margin: 1cm 0 2cm 0cm;
  @bottom-center {
    content: "";
  }
}

PDF reports uses Weasyprint, so anything that works with Weasyprint should work with PDF reports.

Let me know if that works for you.

SouzaBB commented 4 years ago

Hi @Zulko

It didn't work form me! Got the following error:

Exception: unexpected token "indent" in file example_template.pug on line 88

Zulko commented 4 years ago

To be clear, the snippet above should be in a CSS file. It can also be in the pug file, but in a "style" tag like this:

style(lang="scss").
  @page {
    margin: 1cm 0 2cm 0cm;
    @bottom-center {
      content: "";
    }
  }