Gap between header, body and footer in custom print format (header-html / footer-html)

Hi everyone,

I’m working on a custom print format in Frappe where I am using:

  • Custom Letter Head

  • header-html

  • footer-html

My goal is to repeat the header and footer on every page.


:red_exclamation_mark: Issue

I am facing an issue where there is unexpected gap/space:

  • Between header and body

  • Between body and footer

Even though my HTML does not have extra margin/padding.


:light_bulb: Expected Result

Header and footer should align tightly with the content without extra spacing.


Any help or working example would be appreciated!

Thanks in advance :folded_hands: