I believe that you are asking to do something like cutting out the middle of the page, leaving the header and footer and removing the white space with the cut action, effectively combining the header and footer.
As far as I know, I do not believe in it. Even if you cut or delete, this space is still part of the image, even without content.
But you could select the top or bottom (or left or right) remaining space and drag it to align it on the other side. This is not ideal for repetitive tasks, but you need to go through if you need to do this several times.
source share