How can I determine the status of a printer connected to a parallel port (typically LPT1 or LPT2) as to if the printer is actually there, is turned on, is on line, and has paper in it?

Thanks!