added print the heading (optional part ) to the beginner easy to copy paste general printDocument method and variables

Signed-off-by: fallenangelX <http://infinity.3utilities.com/>