Hello, I''m new ruby developer, any idea about : send text file to lpt1 port where i have installed an intermec printer? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 3 September 2012 19:11, ahmed el attar <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> 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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Colin Law wrote in post #1074484:> On 3 September 2012 19:11, ahmed el attar <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> 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. > > ColinThanks Colin, yes i try on the server, but you can help me please about this command ? Ahmed -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
On 4 September 2012 10:25, ahmed el attar <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Colin Law wrote in post #1074484: >> On 3 September 2012 19:11, ahmed el attar <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> 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 ?Did you try looking at the ruby documentation? This for example http://ruby-doc.org/core-1.9.3/Kernel.html#method-i-system Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Thanks, but i want send text file from server to client (lpt1 port), it''s possible? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
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 On Tuesday, 4 September 2012 12:15:28 UTC+1, Ruby-Forum.com User wrote:> > Thanks, but i want send text file from server to client (lpt1 port), > it''s possible? > > -- > Posted via http://www.ruby-forum.com/. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/PJmeAse-xAQJ. For more options, visit https://groups.google.com/groups/opt_out.
>> You said, in response to Colin''s question, that you wanted to send it tolpt1 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 Wednesday, 5 September 2012 10:00:27 UTC+1, sjm wrote:> > 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 > > On Tuesday, 4 September 2012 12:15:28 UTC+1, Ruby-Forum.com User wrote: >> >> Thanks, but i want send text file from server to client (lpt1 port), >> it''s possible? >> >> -- >> Posted via http://www.ruby-forum.com/. >> >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/orIeRSP-G-YJ. For more options, visit https://groups.google.com/groups/opt_out.
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 Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/J-0V_f04tXUJ. For more options, visit https://groups.google.com/groups/opt_out.