Cut footer in different file formats