You could use a simple transistor based circuit - the 12V would drive the base of an NPN transistor whose collector is connected to 5V via a resistor and whose emitter is connected to a common ground. The parallel port pin is then connected to the resistor / collector junction. Google for 'transistor switch'.
An alternative idea is to use an optocoupler, same principle of operation but using an isolated input, which would be superior. Google optocoupler or optoisolator for details.
Even simpler is a straightforward mechanical relay circuit.
Be aware though that both transistor approaches would invert the signal you're measuring, unless you use two transistors.