Edinburgh-Genome-Foundry / pdf_reports

:closed_book: Python library and CSS theme to generate PDF reports from HTML/Pug

Home Page:https://edinburgh-genome-foundry.github.io/pdf_reports/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

JoshuaC3 opened this issue · comments

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!

commented

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.

Hi @Zulko

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

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

commented

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: "";
    }
  }