Send hex commands to printer

dotkpay

New member
Local time
7:47 AM
Messages
3
Hello,

I have been trying to configure a receipt printer, model BTP-R880NP so as to have a center aligned receipt with small margins, but am informed I have to send hex commands to the printer.
How do I send these commands from a web page printing a receipt to the USB printer?

Thanks in advance
 

My Computer

OS
Windows 7 Ultimate 32bit

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Dwarf Dwf/11/2012 r09/2013
OS
Windows 8.1 Pro RTM x64
CPU
Intel Core-i5-3570K 4-core @ 3.4GHz (Ivy Bridge) (OC 4.4GHz)
Motherboard
ASRock Z77 Extreme4-M
Memory
4 x 4GB DDR3-1600 Corsair Vengeance CMZ8GX3M2A1600C9B (16GB)
Graphics Card(s)
MSI GeForce GTX770 Gaming OC 2GB
Sound Card
Realtek High Definition on board solution (ALC 898)
Monitor(s) Displays
ViewSonic VA1912w Widescreen (VGA)
Screen Resolution
1440x900
Hard Drives
OCZ Agility 3 SSD 120GB SATA III x2 (RAID 0)
Samsung HD501LJ 500GB SATA II x2
Hitachi HDS721010CLA332 1TB SATA II
Iomega 1.5TB Ext USB 2.0
WD 2.0TB Ext USB 3.0
PSU
XFX Pro Series 850W Semi-Modular
Case
Gigabyte IF233
Cooling
1 x 120mm Front Inlet 1 x 120mm Rear Exhaust
Keyboard
Microsoft Comfort Curve Keyboard 3000 (USB)
Mouse
Microsoft Comfort Mouse 3000 for Business (USB)
Internet Speed
NetGear DG834Gv3 ADSL Modem/Router (Ethernet) ~4.0 Mb/s (O2)
Antivirus
Avast! 8.0.1497
Browser
IE 11
Other Info
Optical Drive: HL-DT-ST BD-RE BH10LS30 SATA Bluray
Lexmark S305 Printer/Scanner/Copier (USB)
WEI Score: 8.1/8.1/8.5/8.5/8.25
Asus Eee PC 1011PX Netbook (Windows 7 x86 Starter)
Thanks Dwarf, I have looked through the pdf you linked to before together with the programming manual of the printer. But they don't specify where exactly I should insert the hex code.
For example the statement 1D 4C nL nH sets the left margin but how do I run it exactly.
 

My Computer

OS
Windows 7 Ultimate 32bit
Thanks Dwarf, I have looked through the pdf you linked to before together with the programming manual of the printer. But they don't specify where exactly I should insert the hex code.
For example the statement 1D 4C nL nH sets the left margin but how do I run it exactly.

Dotkpay, welcome to the windows 7 forum.

The best way to send Hex codes to a printer is to create a text file and then copy it to the printer port.
One way is to create from the keyboard the ascii codes by using the alt+number pad to create a file.

from the command prompt.

copy con code.txt
press the alt key and the numberical equivelant for the hex code
when you have finished create the file Press the function key 6 which sends
a control Z (end of file) to the new file you created and closes the file.

then all you have to do is to copy filename lpt1: or whatever the printer port
is.
I have send a page eject to the printer by the following.
copy con lpt1:
ALT+12 then control Z (or f6)
and the page ejects..

I hope this helps.

Rich
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba Laptop Qosimo X870
OS
Windows 7 Pro x64 SP1
CPU
Intel Core I7
Motherboard
Toshiba Qosmio
Memory
16 Gigs
Graphics Card(s)
NVIDIA GeForce GTX 670M
Monitor(s) Displays
17.7" laptop
Screen Resolution
1600 x 900
Hard Drives
256 Gig SanDisk SSD for C
256 Gig Intel SSD for D
Internet Speed
50/25 FIOS
Antivirus
Vipre (all you can eat for 10 machines)
Browser
IE and FF
Other Info
I have dos 6.22, wfwg 3.11, win98, 2000 and xp VHD's available for testing. MS's Virtual PC works great.
Back
Top