add the print function to the view page