Hii Nannu
Thanks, I meant the same with solution.
1. When you use Placeholders it makes proper spacing for the items / container. So, I suggested to control content height in the last comment.
2. When the content is control, footer part started to display on all pages. We can do that with CSS as well but that is not a good option for Document View
3. Using Placeholder is also a best practice for this.
Finally, you have done this! Great :)