print page function