trim document