Line Printer (Printronix, Epson) in C#

  • Thread starter Thread starter Muhammad Tariq
  • Start date Start date
M

Muhammad Tariq

Hi

I want to know how to I use Line Print in C# with maximum speed that it
prints in Console bases applications (like Cobol, FoxPro)

Here no graphics invole in the report

Kindly tell me how the data should be represented (Like Datasets, Custom
object collection) and how I use that


Thanks,
 
Hello Muhammad,
Hi

I want to know how to I use Line Print in C# with maximum speed that
it prints in Console bases applications (like Cobol, FoxPro)

Here no graphics invole in the report

Kindly tell me how the data should be represented (Like Datasets,
Custom object collection) and how I use that

If the Lineprinter is connected to your workstation using a parallel port,
you can open a stream to it using a P/Invoke call and then wrap a StreamWriter
around that.

That in turn allows you to print strings directly to the printer. Not formatting
or anything supported though. Just RAW data.

For more info see this post:
http://bytes.com/groups/net/408137-how-can-i-communicate-parallel-port-c

And see pinvoke.net for the exact signiature for this function:
http://www.pinvoke.net/default.aspx/kernel32/CreateFile.html
 
Hi

I want to know how to I use Line Print in C# with maximum speed that it
prints in Console bases applications (like Cobol, FoxPro)

The speed is based on the port, all you have to do is open the port
(either parallel or serial) and write the raw data
Here no graphics invole in the report

Kindly tell me how the data should be represented (Like Datasets, Custom
object collection) and how I use that

It's up to you, you need to feed the printed with, well lines of
text :)
the content of each line is up to you.
yo might need to format it nicely, for example to create columns you
might need to insert a calculated unmber of spaces
 
Back
Top