Printing question

M

Mika M

Hi!

I have barcode printer attached to the printing server's COM1-port, and this
printer is shared in path like \\MyServer\Intermec

I have text-file containing barcode script in file barcode.txt, and I can
print it using DOS-window from XP like ...

copy barcode.txt \\MyServer\Intermec ... and it's working fine.

I have also made earlier PHP-script for printing same script to the same
shared barcode printer. It contains only few lines of code like this way ...

function print_labels($script)
{
$handle = printer_open("\\\\MyServer\\Intermec");
printer_write($handle, $script);
printer_close($handle);
}

Finally my question: How to print this barcode script string directly to
this same shared barcode printer path using VB.NET, and just pressing
"Print"-button without PrintDialogs (because I planned to put printer path
into the app.config-file) ?
 
H

Herfried K. Wagner [MVP]

* "Mika M said:
I have barcode printer attached to the printing server's COM1-port, and this
printer is shared in path like \\MyServer\Intermec
[...]
Finally my question: How to print this barcode script string directly to
this same shared barcode printer path using VB.NET, and just pressing
"Print"-button without PrintDialogs (because I planned to put printer path
into the app.config-file) ?

HOW TO: Send Raw Data to a Printer by Using Visual Basic .NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;322090>
 
M

Mika M

Thanks Herfried!

Yes I got it and noticed your answer already yesterday, but was little
astonished how long strange looking Class code is needed for such a simple
task as sending a string to the printer with .NET after using PHP - oh
boys!!! How "awerage programmers" can "guess" such a code >:)


Herfried K. Wagner said:
* "Mika M said:
I have barcode printer attached to the printing server's COM1-port, and
this
printer is shared in path like \\MyServer\Intermec
[...]
Finally my question: How to print this barcode script string directly to
this same shared barcode printer path using VB.NET, and just pressing
"Print"-button without PrintDialogs (because I planned to put printer
path
into the app.config-file) ?

HOW TO: Send Raw Data to a Printer by Using Visual Basic .NET
<URL:http://support.microsoft.com/?scid=kb;EN-US;322090>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top