Computing.Net > Forums > Disk Operating System > printing from a batch file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

printing from a batch file

Reply to Message Icon

Comment:

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.



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: October 8, 2009 at 10:32:12 Pacific
Reply:

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


-1

Response Number 2
Name: Pater
Date: October 8, 2009 at 11:10:38 Pacific

Response Number 3
Name: adarnell
Date: October 8, 2009 at 12:08:03 Pacific
Reply:

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.


0

Response Number 4
Name: Mechanix2Go
Date: October 8, 2009 at 13:27:21 Pacific
Reply:

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


0

Response Number 5
Name: Pater
Date: October 8, 2009 at 14:30:08 Pacific
Reply:

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.................


0

Related Posts

See More



Response Number 6
Name: Judago
Date: October 9, 2009 at 00:02:56 Pacific
Reply:

Since this is xp and not dos, this may give some alternative ideas.

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


Batch Variable how to


0

Response Number 7
Name: adarnell
Date: October 9, 2009 at 08:40:01 Pacific
Reply:

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


0

Response Number 8
Name: Judago
Date: October 9, 2009 at 16:11:35 Pacific
Reply:

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


0

Response Number 9
Name: nbrane
Date: October 12, 2009 at 00:29:45 Pacific
Reply:

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.


0

Sponsored Link
Ads by Google
Reply to Message Icon





Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: printing from a batch file

reading a file from a batch file www.computing.net/answers/dos/reading-a-file-from-a-batch-file/765.html

Display date from a batch file www.computing.net/answers/dos/display-date-from-a-batch-file/2143.html

Detect directory from a batch file.. www.computing.net/answers/dos/detect-directory-from-a-batch-file/4010.html