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

Conditionally Render Page header and footer template #415

Closed
bharat619 opened this issue Oct 25, 2023 · 2 comments
Closed

Conditionally Render Page header and footer template #415

bharat619 opened this issue Oct 25, 2023 · 2 comments

Comments

@bharat619
Copy link

Hello,
We are using this gem to generate PDF from HTML.

We specify the header and footer template

browser.pdf(
        encoding: :binary,
        format: :A4,
        margin_bottom: 1,
        margin_left: 0.4,
        margin_right: 0.4,
        print_background: true,
        display_header_footer: true,
        footer_template: footer_template,
        header_template: header_template 
      )

But we want to control the header and footer template on few pages, i.e. on some pages we do not want headers and footers.
Is it possible to do that?

Is it possible to access the headers and footer with JavaScript somehow to manipulate / remove it?

@route
Copy link
Member

route commented Oct 27, 2023

I don't really understand your issue, you can open any page and call pdf method.

@route
Copy link
Member

route commented Nov 7, 2023

No answer, no issue.

@route route closed this as completed Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants