The only parts that can't be 3d printed would be the barrel, ejector, firing pin and the springs needed (Perhaps a few others depending on the build). The following thoughts are done at your own risk, and for 9mm or smaller.
Barrel, hi pressure hydraulic piping, Easly rifled with the proper plug, and springs are easy to bend. Most other components made from 1 or 2mm metal and steel or drill rod.
Just a couple of thoughts
Hope this helps