printing from a batch file

Zebra technologies Lp 2844-z direct ther...
October 8, 2009 at 09:15:32
Specs: Windows XP
I'm using Windows XP as my operating system. I have a Zebra LP2844 printer attached to LPT1 by a parallel port. I have a text file made with notepad and a batch file that has print.label.txt. When I run the batch file it will print, however in font 3pt or smaller. If I open notepad and print it will also print, however in font 10pt. I want my batch file to print in 10 pt font.

See More: printing from a batch file

Report •

#1
October 8, 2009 at 10:32:12
Not a DOS issue, but if we assume that it's a conforming printer [it's hooked to LPT1 YIKES!] try sending the control code to set the font.

Do a search for Epson FX80 control codes.


=====================================
Helping others achieve escape felicity

M2


Report •

#2
October 8, 2009 at 11:10:38

Report •

#3
October 8, 2009 at 12:08:03
Thanks for the help. The printer is programmable,but the tech help said that the problem does not have to due with their product. Any help trouble shooting the XP part is definetly needed and appreciated.

Report •

Related Solutions

#4
October 8, 2009 at 13:27:21
You need to figure out the control codes, maybe from Pater's links.

Then send the code(s) to LPT1.


=====================================
Helping others achieve escape felicity

M2


Report •

#5
October 8, 2009 at 14:30:08
http://www.comptechdoc.org/os/windo...

Read the section regards NTVDM and why MS-DOS based Software can not always run in XP....

Just for completeness MS-DOS Software like Word Processors included Printer Drivers.

Therefore in a nutshell you need to write an XP Compatable Program to send the correct codes to allow one to use the parameters which can be changed on the printer itself. The XP print driver has no idea which defaults have been set on the printer.................


Report •

#6
October 9, 2009 at 00:02:56
Since this is xp and not dos, this may give some alternative ideas.

http://www.robvanderwoude.com/print...


Batch Variable how to


Report •

#7
October 9, 2009 at 08:40:01
Thanks Judago,
I changed my .txt file to a .reg file and added the NOTEPAD /P like the link said to do and it worked great.
Thanks for the help, I was working on this for 2 weeks.
Thanks again

Report •

#8
October 9, 2009 at 16:11:35
I think you missed the point, you don't have to change the file extension, just specify it, as long as it contains plaintext.

NOTEPAD /P "yourfile.txt"

I wouldn't recommend using the .reg extension, it normally denotes a plain text export of registry entries.


Batch Variable how to


Report •

#9
October 12, 2009 at 00:29:45
Note: following documentation assumes all strings preceded by ESC (1B)
See notes at bottom about dif.s between LQ2550 and MSP printers.
(st=std e=expnd c=compres ce=comp+exp hs=high-spd) st e c ce hs
P 50 pica pitch (default)=10 cpi 10 5 17 8.5 12
M 4D elite pitch=12 cpi 12 6 20 10 24
g 67 15 pitch=15 cpi 15 7.5
W1 57 31 expanded print on (W0 turns off)
0E expanded print on till line feed (one line only)
0F compressed print on (hex 12 to turn off)
~81 7E 38 31 high-speed on (~80 turns off)
~11 7E 31 31 vertically enlarged print on (~10 turns off)
w1 77 31 vertically enlarged print on (w0 turns off) LQ570+
x1 78 31 NLQ on (x0 turns off)
p1 70 31 proportional print on (p0 turns off)
20 n variable spacing: n = dots per space
E 45 emphasized on F = 46 off
G 47 double-strike on H = 48 = off
4 34 italics on 5 = 35 = off
-1 2D 31 underline on -0 turns off
~21 7E 32 31 reverse-print (negative) on (~20 turns off)
S0 53 30 superscript on T = 54 = off
S1 53 31 subscript on T = 54 = off
ln 6C nn set left margin to n
an 61 nn justify-line: 0:set left,1:center,2:right,3:flush both margins
a 61 01 center the line
a 61 02 right-justify line
a 61 03 flush to both margins
An 41 nn set line spacing (vertical pitch) to nn 72nds inch
~0 7E 30 nn vertical pitch to nn 144ths inches
3n 33 nn vertical pitch to nn 216ths inches (n 180ths lq570+, 1-byte)
@ 40 complete reset to power-on defaults
Master command: ESC ! prefix bit map: (1=turn feature on, 0=off)
0 0/1 pica/elite
1 proportional
2 compressed
3 emphasized
4 dblstrike
5 expanded
6 italics
7 underscore
Notes on dif.s between MSP (above) & LQ2550:
The MSP "microprint" (ie: superscript font) is only about 3/4 as tall
as the LQ2550's version (about 3 dots), although they look to be the
same horizontal pitch (17.5 cpi). This means that the LQ can get away
with setting vertical pitch to 8 lpi and still look good (line gap
proportional to character height), while the citizen looks somewhat too
"spacey". In printing applications, such as labels and forms, where
exact fractional inch denominations are necessary, 8 lpi should be used
on both. However, the MSP looks much better at 7/72ths when printing
microprint, so use that when printing free-form. It won't work on any
standard inch-based labels with out de-selecting and backing the
roller about 2 dots every other inch. The MSP variable-line-spacing
increments are 72nds, 144ths, and 216ths, while the LQ's are 60ths,
180ths, and 360ths. The LQ's commands are esc A, 3, and + for these
respectively, followed by the quantity. Most of the other commands
are consistant, but any further differences will be noted in ESC.LQ,
which will start out as a copy of this, and be modified as differences
are encountered.

Report •

#10
March 1, 2010 at 23:24:39
I am trying to set up a batch file to print PDF's to a network printer. I can accomplish this in command prompt however I can reproduce similar results in a .bat file. If you enter the code line by line in command prompt it works just fine. However the bat file will just loop constantly while never hiting the exit command. Any ideas?
________________

Report •

#11
March 2, 2010 at 03:43:37
"Any ideas?"

Start a thread in the appropriate forum and in it put the script you're having problems with.


=====================================
Helping others achieve escape felicity

M2


Report •

#12
March 8, 2010 at 02:53:42
How do I print the time (in ms) in a Windows batch file?

try programming forum

- moderator


Report •

Ask Question