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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tutorial for sending commands to okidata printer

Status
Not open for further replies.

dhazer

Programmer
Oct 20, 2006
48
I was wondering if any knew the process for how to send printer commands to a printer. In particular I'm working with a okidata microline 320 turbo (no letter after the turbo, just a turbo). I noticed online at okidata.com that there's a Microline Referrence Manual at In it are command, like a Reverse Line Feed which is:
ASCII: ESC j n
Dec: 27 106 n
Hex: 1B 6A n the re

where n is the number of lines,

but I don't know how to send it to my printer. I beleive I need to the use windows copy command with the /b (binary) switch when I send the file to the printer, but I don't know how to go about doing this. I'm sure it's simple.

Is there a anyone out there that know this?
 
You can automate this, up to a point, on Windows systems, by setting up an appropriate entry in the Send To menu, which is available via the right-click context menu.

Exactly how this is done depends on which flavour of Windows you are running, but the principle is the same in each case:

(1) Create a batch file containing the required command, but with '%1' instead of the filename.

For a parallel port device on LPT1 this would be
copy /b %1 LPT1:

For a network connected device this would be:
lpr -S<IP-address> -P<queue> %1
where <IP-address> and <queue> are appropriate to the target device.

For a USB connected device you'd need something like:
net use LPT1 \\servername\sharename
copy /b %1 LPT1:

(2) Save this batch file; the location is immaterial, but it might be an idea to create a special folder for 'SendTo' scripts.

(3) Create a shortcut to the batch file, and save it in the current SendTo folder; where this is depends on which version of windows you are using.

For Windows XP, this would be the C:\Documents and Settings\username\SendTo folder (where username represents your user name.
(For some reason I've yet to find, it doesn't work if placed in the folder for All Users).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top