Hi,
You said, in response to Colin's question, that you wanted to send it to lpt1 port on the server. Now you're saying that it is to be sent to the lpt1 port on the client?
This would not be possible via HTTP, the server cannot take control of the client. The best you could achieve (IMHO) is to render the text file to the browser, and use JavaScript to open the browser's print dialogue.
If this is a Ruby question rather than a Rails question, then you would need to write a server and a client application with the client requesting the file from the server using a standard (or your own proprietary) protocol, once the received it [the client] could open the port and send the received text file to it.
I hope that this helps.
All the best,
Steve