How to precisely measure pipe inner diameter using digital Vernier caliper?
A few approaches:


Place a piece of paper or aluminum foil over the end and tape it in place so it doesn't move.  Press around the edge with your finger to emboss the inside edge into the paper/foil.  It should create a sharp edge.  Remove the paper/foil, and you have something you can easily measure by normal means.

Variation on the theme: make a "cushion" of compressible material (e.g., sheet of closed-cell foam or "felt", styrofoam, or even many layers of paper towel), and put the paper or foil on top.  Press the end of the tube onto the paper/foil, and it will leave an embossed ring that you can measure. 
Use the end of the pipe like a big rubber stamp.  Apply slow-drying ink, like stamp pad ink, to the edge and press it against a sheet of paper.  It will leave an ink ring you can measure.  Variation: if you can still find carbon paper (as used eons ago with typewriters), put it face down on a piece of paper and press the end of the pipe against it.  It will leave a ring you can measure. 
Measure the inside diameter roughly with a ruler.  Use a slightly larger hole saw to drill out an oversized plug, which will also have a hole in the center.  Use the hole to mount the plug to a shaft that you insert into a drill, drill press, or lathe, depending on what you have available.  With the disk spinning, sand it down until it just fits into the pipe.  That gives you a solid object to measure by normal means.

An alternative is to use a sheet of similar plastic material as your 3D printer filament.  Once you have a good fitting plug, just use it.  Fasten, weld, or bond it to your 3D part.


To ensure you're measuring the diameter by any of these methods, place the paper with the circle on a piece of wood or some layers of cardboard.  Stick a pin through the circle line at any point.  Align a ruler with the circle inside edge at that point at a major division on the ruler.  Swing the ruler across the circle until you find the maximum dimension on the other side of the circle.  That will be the diameter.  If you are concerned that the pipe might not be perfectly symmetrical, repeat the process roughly 90 degrees from the first point.