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

How can I add a footer & header to each page? #292

Open
aclowkey opened this issue Apr 19, 2023 · 6 comments
Open

How can I add a footer & header to each page? #292

aclowkey opened this issue Apr 19, 2023 · 6 comments

Comments

@aclowkey
Copy link

I want some static content to appear at every page's header, and page number on the footer with static text.
I tried

  1. Calculating page height/ and using it to determine page size - way to cumbersome
  2. Using head style sheet with @page CSS rule - doesn't work

Any ideas?

I thought adding paddings to the android native version and then use the backend to stamp the documents within the header dimensions. I saw there is margin support there.

@Pranav2992
Copy link

You can add header and footer by using css like below
MicrosoftTeams-image (6)

@austincparker
Copy link

You can add header and footer by using css like below MicrosoftTeams-image (6)

@Pranav2992 this does work to put them on the page, but it will overlap everything else. I tried adding margin-top and margin-bottom on the pages by doing

@page {
margin-top: 100px;
margin-bottom: 100px
}

but this also moved the header down and the footer up on each page. Were you able to figure that part out?

Copy link

stale bot commented Mar 13, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 13, 2024
@rushg171
Copy link

@austincparker I'm facing the same issue. How did you solve it?

@stale stale bot removed the stale label Aug 27, 2024
@prox2
Copy link

prox2 commented Jan 9, 2025

Did you find a way to deal with this ? @austincparker

@ZGBX
Copy link

ZGBX commented Jan 10, 2025

Have you solved this problem? The situation I'm facing now is that I can only add a header to the first page, and I can't add headers to the subsequent pages. I also can't add a footer. @austincparker

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

6 participants