Can a paternity test be done before birth?

Q: Is there a way to get a sample of the baby’s blood to do the test before the baby is actually born? Just curious, you know.

A: Yeah there is, but it can be extremely dangerous and painful for you and baby. There are now pregnancy tests that can tell you when you got pregnant maybe that might help?