• Setting the margins did help. But now I get one extra(Last) page in the pdf.

    It only shows header.

    How can i get rid of this?