Copying the code twice worked for me just put a three line space between the two codes.
So basically i created two themes one for printing and other for PDF you can use Printing theme (One with Duplicte code) to print directly and your normal theme for PDF.
Note: Duplicate theme could also work on PDf but it shows bill once and takes a lot of time to generate.
Thanks everyone for your help.