Clean up pagenumber in various file formats