timeout function for print page