Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

307
Views
Printing multiple pages PDF with footer at the end of the last page

I am trying to print a webpage in PDF. This PDF will be a few pages long and have a footer that should appear on the last page and stick to the bottom.

The issue is that I can both have the footer appear at the end of each pages or only the first one. But not only on the last one.

I think that I've tried all stackoverflow answers to similar questions but none of them worked.

For example this CSS rule make the footer stick to the bottom of the first page only :

@media print {
  .container {
    position: absolute;
    bottom: 0;
    page-break-inside: avoid;
  }
}

While this one make the footer appear at the bottom of each pages :

@media print {
  .container {
    position: fixed;
    bottom: 0;
    page-break-inside: avoid;
  }
}

I have also tried every position possible, none of them worked as I wanted. If it's not possible using only CSS, the other possibility that I've thought about is to place a div between the footer and the last div so that I can, using javascript, calculate the height needed for the footer to be at the bottom. Only problem with that is that I don't know how to it when printing.

PS: I am sorry if my English is a little bit hard to read, I am not really good.

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!