3D printing pills? That'd be as dumb as 3D printing butter or a soda can.
It's called compounding: taking the active ingredients and smashing them into 1 pill is trivial. Manual tablet presses have existed for hundreds of years, and automatic tablet presses have existed for 70.