Digital yearbooks are a great way to raise funds. Physical, printed yearbooks can be costly and, as you said, ads can really only defray some of those costs.
Digital yearbooks, however, can be made for relatively cheap and sold at a much higher profit margin. Selling a $1 CD or DVD for $20 is a heck of a lot better way to raise funds than selling a $14 yearbook for that same $20.
I've also seen some schools that cut down their printed yearbook to a manageable, affordable size and pair it with a digital yearbook that can obviously hold much more information.
Yearbook Alive
is the only company that I've dealt with and I've found them to be great. It's easy to use and it's relatively cheap. I don't know of any other companies offering this service, but I'm sure there are others.