Send raw commands to a printer?

  • Thread starter Thread starter Steve Hiner
  • Start date Start date
S

Steve Hiner

We already have printing working great on our project but it now turns out
that I need to be able to send some raw strings to the printer to have it
print on a special area of the media. I've seen the KB article 322090 and
322091 but they are designed for doing the entire print job as a raw data
stream - I need to do it during a normal .NET print.

I know the article indicates that you can't mix the two but I'm wondering if
that's really true. Anyone tried to mix raw printing and .NET printing?

This will be a serious blow to our project if I can't do this - I'm guessing
that my boss will regret doing it in .NET and I'm afraid he will be
reluctant to undertake new projects in .NET. Several times over the course
of the project we've thought .NET was the wrong choice but I've always found
a way around whatever problem we were having - this time I'm not so sure.

I essentially just need to be able to make sure the printer gets an ASCII
string exactly like I encode it. It doesn't have to be positioned in any
way, it just needs to get the string and it knows what to do with it. Since
..NET printing is all through the graphics object I'm sure doing a
DrawString() isn't going to send the actual text to the printer.

Steve
 
Steve,

Do you need to send this at the same time as printing a report, for example
to place additional text on a report, or are you looking to create a printer
job that uses only the special text that you specifify, for example sending
all print commands directly to the printer?

I have some code that allows you to send raw command directly to the
printer; I use it for controlling thermal label printers but it requires
that the entire print job be via the commands and does not mix with standard
..NET output.

Martin.
 
Martin,

Thanks for the reply.

Unfortunately, I need to intermix the printing commands. I have a printer
with a special encoder in it. I need to be able to print all the text and
graphics using .NET but send a string to the printer directly to let it know
what to do with the encoder.

Steve
 
Back
Top