Ripping a Candy Wrapper on Shabbos

Can you open a candy wrapper or bag of potato chips on Shabbos if it will cause you to rip the letters? The Rama says that eating a cookie with writing on it is erasing. The Noda B'Yehuda says the Rama is not referring to breaking the cookie just to eat it (e.g. for segula purposes). How do we apply this to snack bags, is the wrapper different than the food itself?

Ripping between the letters on Shabbos and attaching letters to a surface on Shabbos.