Transfer text file to lpt1 port

Hello,

I’m new ruby developer, any idea about : send text file to lpt1 port
where i have installed an intermec printer?

On 3 September 2012 19:11, ahmed el attar [email protected] wrote:

Hello,

I’m new ruby developer, any idea about : send text file to lpt1 port
where i have installed an intermec printer?

Are you trying to do this on the client PC or on the server? If on
the server you can call out to the OS using system() so presumably you
could do it that way.

Colin

Colin L. wrote in post #1074484:

On 3 September 2012 19:11, ahmed el attar [email protected] wrote:

Hello,

I’m new ruby developer, any idea about : send text file to lpt1 port
where i have installed an intermec printer?

Are you trying to do this on the client PC or on the server? If on
the server you can call out to the OS using system() so presumably you
could do it that way.

Colin

Thanks Colin, yes i try on the server, but you can help me please about
this command ?

Ahmed

On 4 September 2012 10:25, ahmed el attar [email protected] wrote:

Colin

Thanks Colin, yes i try on the server, but you can help me please about
this command ?

Did you try looking at the ruby documentation? This for example

Colin

Thanks, but i want send text file from server to client (lpt1 port),
it’s possible?

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

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?

You never said that, I misread it - lol, sorry.

Steve

On Tuesday, 4 September 2012 07:15:28 UTC-4, Ruby-Forum.com User wrote:

Thanks, but i want send text file from server to client (lpt1 port),
it’s possible?

This seems to come up every couple months - check out this thread from
January for some discussion:

https://groups.google.com/d/topic/rubyonrails-talk/fUMJxKOIaE8/discussion

Not sure if the final method there (using jzebra) will work for your
app,
but it seems like a good start.

–Matt J.