Is it permissible to eat a cake with verses printed on it? - Walla! Judaism. Rabbi Shai Tahan answers in detail the question.

And some allow, even if the Holy Names of the Most High are written, that any name written from the beginning other than for the sake of the holiness of God has no holiness in it. Some cakes print Gemara pages with everything written in it, for the joy of children at the beginning of their study of the Shas.