I suspect that it wouldn't kill agriculture or ranching right away, and we'd still see some for those people who prefer their meat not 3d printed. Although if replicators became widespread, the cost of real food will skyrocket.
I think that it would start as a technology for the rich, but it wouldn't be long before organizations like the Red Cross start using them to feed the hungry, and eventually someone will come up with a cheaper version that everyone can have in their kitchen.
No, starvation and disease would not disappear, sorry to say. First, you would have all the food growers pitching a fit because it would put them out of business. Then you'd have the religious whack jobs pitching a fit because we're "playing god and science is evil". And even if the baby fits from this group or that group for some reason didn't happen, it would only be available to the super rich anyway. Humans will NEVER change. We are just as screwed up now as we were thousands of years ago, and we will still be screwed up thousands of years from now. Sad but true.
There's no dork like an old school dork. You just can't beat experience.
As has been pointed out, it's not magic or energy to matter conversion. Farmers still have to farm crops, cows would still have to be ground into a pink paste (for a while anyway) and so on and so forth...
I think we'll end up using these though, mainly cause our current method of feeding ourselves is unsustainable. If you look at the inflation rates and (much higher) wage developement in the current low-wage countries (they're playing catch-up) it's pretty clear a time is coming where it'll be cheaper to produce iPhones back home rather than in the no-longer-low-wage countries that'll be wanting their own iPhones. And more importantly, their own steaks.
Our meat eating habit is the main problem, cause to get an X amount of energy's worth of meat out of an animal, you have to put in many times that in plant matter. That's presently done with soy. If more people want to cram cattle into sheds and feed them until death ensues; there's only so much land to grow soy on, even if we clear those last nasty patches of rainforest. Scarcity will drive up the prices, and long story short, the vegetarians will save a bundle. (Thought they were insufferable now? Just wait!) Unless we can get this vat-meat thing off the ground anyway. (Presently, at .25 million dollars a burger, it's a bit pricey still.)
And if everyone's going to overeat like we do in the west, we're probably going to have to learn to love algae. 70% of the planet's surface is perfectly arable water. Just add salt, sugar, food coloring and whatever else for flavor.
So algae and meatslush. Sounds like a match made for printing to me.
Yeah, this is an early prototype based off those plastic extruders. A choice between that and real food isn't very hard. I imagine the tech will improve a lot in the next decade, plastic molders have made great strides already, at least in terms of making better more detailed shapes.... not so much in making functional copies of objects....
Just to be clear, your questions in the OP are related to the 3D printer, and not the hypothetical food replicator, yes?
Assuming, yes, then I for one, would likely only eat the food if it could somehow be demonstrated as minimally processed. That or to avoid starvation. That pizza in the picture does not look like it fits that requirement. I've some medical conditions that were traced to my previous overly-processed food intake, and I'd prefer to avoid that.
Now one thing I did hear suggested for 3D food printing that I found intriguing was protein wafers made from powdered insects. I've long heard that many types of insects are actually a good food source, but I'm fully conditioned by my upbringing to avoid eating them. Yuck. But hand me an unidentifiable wafer, blend the contents to make it taste good, and I'll likely eat it. That increases our protein food sources significantly.
I'm not sure though, how a food printer will benefit starving villages the world over if the printer needs a cultivated source for the raw materials.
Now a Trek replicator, that is a different matter. There, you make multiple copies of a single original pattern, and you do so by converting energy to matter. Which means I don't have to grow those green beans anymore. I just have to hook my replicator battery up to a state-of-the-art solar power system, and the energy from the sunlight is converted into a duplicate copy of a pattern of green beans.
This has some far reaching implications. For example: farming would become a niche market, highly specialized to producing the highest quality product, not just mass production. The Picard winery was like that: highest quality done the old-fashioned way. There would be a rise in environmental, recycling, and energy jobs. We'd begin emptying our landfills. Energy is energy. The rubbish of our landfills would be converted to energy, and from there it could either power our homes, or convert from pure energy to food, via the replicator. We'd need more archeologist specializing in landfill archeology (don't laugh, its a real thing) sorting through what they could of the past before its destroyed in the matter to energy process. I suspect we'd see a rise in arts & crafts. Keeping with the food replicator, more would be willing to experiment in cooking if the replicator could provide all the ingredients, and would mercifully recycle failed and burned experiments quickly. The list goes a lot longer.
What I suspect would happen though, is that someone would find a way of metering it all, rather than it being free and open-sourced like Star Trek implies.
Given that e = m * c^2, even a kilogram of matter corresponds to the energy of a forty-megaton explosion, so I doubt that any "real" replicator would ever do it that way. However, assembling foodstuffs from raw atoms can work (hydrogen, oxygen, carbon, and nitrogen make 99% of food mass, and humans need about a dozen grams per day total of assorted minerals such as sodium, potassium, chlorine, phosphorus, calcium, iron, etc.), and would hypothetically cost maybe 2-4 times as much energy to assemble as would be released by burning the produced material.
But yes, as others have pointed out in this thread, the potential to end scarcity would upset our social order--too many people make their living from existing supply chains, plus scarcity itself is used as a means of social control (i.e. "obey or we'll cut your rations").
On the other hand, even WITH replicators, we will likely see food going from a "hardware" paradigm to a "software" paradigm--there will be "freeware" recipes available online for people to download, but there will also be plenty of "premium" recipes that must be purchased or temporarily leased, and that will be protected by copyright. Want a generic apple pie? Download the free version. Want an authentic brand-name style apple pie? Pay the fee.
How many Starfleet Engineers does it take to exchange an Anti-positronic Photon Emitter?