Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print Directly to a Line Printer (Dot Matrix)

Status
Not open for further replies.

mattyboy2000

Programmer
Jul 31, 2002
129
GB
Hi, I have a string that I need to write to a dotmatrix printer. I need to use the font set on the dotmatrix printer.

Is there a way for me to print a line directly to the printer without setting the font??

I've seen the Printing.PrintDocument() object, but this dosen't seem to do the job

Thanks

Matt
 
This is ugly but works
you can write a File with
FileOpen(3, filename, OpenMode.Output, OpenAccess.Write, OpenShare.LockWrite)
Print(3,Variable)
Fileclose(3)
then with Shell
type filename > \\computer\printername
 
can't you set the font to the one that's on the printer? Also, I've found that if I try to assign a font that's not on the printer, it will assign one anyway. Try it and see what happens.

Scott
Programmer Analyst
<{{><
 
I've used the following code to run the print script:

System.Diagnostics.Process.Start(&quot;C:\Temp\eM1\Ticket.txt > \\stevespc\hplaserj&quot;)

This doesn't work. Any ideas why not??

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top