Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to skip headers and/or footers on some pages? #484

Closed
rohithpr opened this issue Jul 5, 2017 · 2 comments
Closed

Is there a way to skip headers and/or footers on some pages? #484

rohithpr opened this issue Jul 5, 2017 · 2 comments
Labels
CSS Questions about how to do something with CSS

Comments

@rohithpr
Copy link

rohithpr commented Jul 5, 2017

I'm adding common headers and footers to all pages at the moment. If I don't want it to show up on some pages (the first page, for example) I'm generating a separate PDF for that and merging it with the rest of the document.

Is there a better way to skip headers and footers on some pages?

@liZe liZe added the CSS Questions about how to do something with CSS label Jul 5, 2017
@chvonrohr
Copy link

I guess this question is asked every few issues here ;)

how I did it was overriding the header for the first page..

@page {
  @top-center {
      background: url('logo.svg') no-repeat 0 0;
      background-size: 10%;
  }
}
@page :first {
  @top-center {
    background: none;
  }
}

This is not possible with :last page or any other than the first page. Therefore, it would be awesome to have distinct classes to target pages. But, I guess there is no "CSS standard" for that and thus it's not integrated in the core...

@liZe
Copy link
Member

liZe commented Jul 6, 2017

Some of these problems could be solved with named pages, see #57.

@rohithpr rohithpr closed this as completed Jul 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS Questions about how to do something with CSS
Projects
None yet
Development

No branches or pull requests

3 participants