print pages to files