Christian Bautista
2012-Jan-06 03:04 UTC
How to send a ASCII escape sequence to a Dot Matrix Printer
Help RoR Masters, I need to print a report that has a escape sequence but every time I try The Dot matrix printer also prints the escape sequence. example *escape sequence here* + ''!'' +*escape sequence here* Hello World + ''!'' + Again The hard copy output should be like this Hello World! Again but it outputs : Hello World + ''!'' + Again Help me pls.. or If there is such way to just print a report in a dot matrix printer where you can control the style, example the font size and etc. -- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Matt Jones
2012-Jan-07 15:44 UTC
Re: How to send a ASCII escape sequence to a Dot Matrix Printer
On Jan 5, 10:04 pm, Christian Bautista <christianbautista.i...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Help RoR Masters, > > I need to print a report that has a escape sequence but every time I > try The Dot matrix printer also prints the escape sequence. > > example > > *escape sequence here* + ''!'' +*escape sequence here* Hello World + ''!'' > + Again > > The hard copy output should be like this > > Hello World! Again > > but it outputs : > > Hello World + ''!'' + AgainIf the + characters are actually appearing in the output, I''d suspect there''s some unmatched quotes and/or an incorrectly formatted interpolation involved. Can you post the actual code? As for the control codes, that''s going to be heavily dependent on the environment you''re using to print. I''m not even entirely sure if a web browser *can* send raw text like you''re intending... --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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Christian Bautista
2012-Jan-09 01:00 UTC
Re: How to send a ASCII escape sequence to a Dot Matrix Printer
Hello, I dont have any code yet for it. I dont know how to do it because I need first to know how to send ascii to a dot matrix printer. I''ve tried this typical printing code so far. <%=link_to_function("Print this Page", "javascript:print()") %> On 7 Ene, 23:44, Matt Jones <al2o...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Jan 5, 10:04 pm, Christian Bautista > > > > > > > > > > <christianbautista.i...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Help RoR Masters, > > > I need to print a report that has a escape sequence but every time I > > try The Dot matrix printer also prints the escape sequence. > > > example > > > *escape sequence here* + ''!'' +*escape sequence here* Hello World + ''!'' > > + Again > > > The hard copy output should be like this > > > Hello World! Again > > > but it outputs : > > > Hello World + ''!'' + Again > > If the + characters are actually appearing in the output, I''d suspect > there''s some unmatched quotes and/or an incorrectly formatted > interpolation involved. Can you post the actual code? > > As for the control codes, that''s going to be heavily dependent on the > environment you''re using to print. I''m not even entirely sure if a web > browser *can* send raw text like you''re intending... > > --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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Matt Jones
2012-Jan-09 12:01 UTC
Re: How to send a ASCII escape sequence to a Dot Matrix Printer
On Jan 8, 8:00 pm, Christian Bautista <christianbautista.i...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello, > I dont have any code yet for it. I dont know how to do it because I > need first to know how to send ascii to a dot matrix printer. > I''ve tried this typical printing code so far. > > <%=link_to_function("Print this Page", "javascript:print()") %>This is almost certainly not going to work - the browser is going to format the document before sending it to the printer. For experimentation, it''s probably easiest to start with a static text/ plain file and get *that* printing. However. after doing some more digging, it looks like what you''re looking for is nearly-impossible; I did find this: http://www.meadroid.com/scriptx/docs/printdoc.asp#rawprinting which sounds like it would do EXACTLY what you''re looking for. Unfortunately it''s IE-only, ActiveX, and $500... --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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Greg Akins
2012-Jan-09 14:41 UTC
Re: Re: How to send a ASCII escape sequence to a Dot Matrix Printer
On Mon, Jan 9, 2012 at 4:01 AM, Matt Jones <al2o3cr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:>> >> <%=link_to_function("Print this Page", "javascript:print()") %> >I''m not sure I understand the point of sending raw ascii here. Despite being a dot matrix printer, doesn''t it handle print jobs send just like any other printer? Can you format your output as a PDF and just print that? -- Greg Akins http://twitter.com/akinsgre -- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Christian Bautista
2012-Jan-10 00:50 UTC
Re: Re: How to send a ASCII escape sequence to a Dot Matrix Printer
Thanks for all your responds.. We finally did it.. we used jzebra On Mon, Jan 9, 2012 at 10:41 PM, Greg Akins <angrygreg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Mon, Jan 9, 2012 at 4:01 AM, Matt Jones <al2o3cr-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > >> > >> <%=link_to_function("Print this Page", "javascript:print()") %> > > > > I''m not sure I understand the point of sending raw ascii here. > > Despite being a dot matrix printer, doesn''t it handle print jobs send > just like any other printer? Can you format your output as a PDF and > just print that? > > -- > Greg Akins > http://twitter.com/akinsgre > > -- > 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 this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Greg Akins
2012-Jan-10 01:33 UTC
Re: Re: How to send a ASCII escape sequence to a Dot Matrix Printer
On Mon, Jan 9, 2012 at 7:50 PM, Christian Bautista <christianbautista.info-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thanks for all your responds.. > > We finally did it.. we used jzebra >Thanks.. I honestly didn''t know why you''d want to do this; reading a bit about JZebra indicated some use cases I wasn''t thinking about. Good knowledge for the future. -- Greg Akins http://twitter.com/akinsgre -- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
KlausG
2012-Jan-10 22:33 UTC
Re: How to send a ASCII escape sequence to a Dot Matrix Printer
Hi Christian, could you please be so kind and share your knowledge HOW you did it? Best regards Klaus On 10 Jan., 01:50, Christian Bautista <christianbautista.i...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thanks for all your responds.. > > We finally did it.. we used jzebra > > > On Mon, Jan 9, 2012 at 10:41 PM, Greg Akins <angryg...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On Mon, Jan 9, 2012 at 4:01 AM, Matt Jones <al2o...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > >> <%=link_to_function("Print this Page", "javascript:print()") %> > > > I''m not sure I understand the point of sending raw ascii here. > > > Despite being a dot matrix printer, doesn''t it handle print jobs send > > just like any other printer? Can you format your output as a PDF and > > just print that? > > > -- > > Greg Akins > >http://twitter.com/akinsgre > > > -- > > 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 this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en.-- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.