On Windows, Lazarus has by default no immediate console support, because a GUI application does not usually need it.
If you define {$apptype console} at the top of the lpr file it probably works. Note it takes some more work to hide the console window until it is needed and hide it again after the external program is finished.
But actually that is quite easy.