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.


*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.

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

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:

which sounds like it would do EXACTLY what you're looking for.
Unfortunately it's IE-only, ActiveX, and $500...

--Matt Jones

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?

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.

Hi Christian,

could you please be so kind and share your knowledge HOW you did it?

Best regards