calling function to the pdf&print plugin