The safest way to measure is on the frame of the field-stripped pistol, although some firearms will require that they be cocked to get an accurate measurement. Clear the chamber and then, since the gun is only "unloaded" in a Schrödinger's Cat sort of way, ensure that the muzzle remains pointed at something that you would not mind putting a hole through when you put the tape into the trigger guard.
Basically, you're looping around the trigger and the backstrap to come up with a number that is more relevant to "trigger reach" than simply measuring the straight-line distance between the two points, since it takes the girth of the pistol into account as well. A single-stack pistol and double-stack pistol could have the same distance from trigger to backstrap as measured by calipers, yet the fatter gun would be harder for the small of hand to get a good firing grip on.
- Smith & Wesson M&P 9 (with CTC Lasergrip mounted): 7"
- Walther PPX: 7"
- FNH FNS9: 7¼"
- Glock 19 (Gen 3): 7½"
- Springfield Armory PC9111 "Professional" (VZ Gator Backs): just a hair over 6¾"
- Smith & Wesson K-22 Combat Masterpiece (Spegel stocks): ~7½"