ESC character and PCL

P

pbdev

I am trying to upload 3 fonts to a HP Laserjet 4100 and continue to
have problems. I am using a .bat file to load the fonts. The problem
I believe is that the printer is not reading the ESC character I have
in my pcl files.

I understand that <27> = ESC I was using (Cntl [ |) but that didnt
work. Then I had a pcl file with ESC characters already in it - so I
copied the ESC character and used it in my pcl files. That worked
once and now it wont work again. I have turned the printer off and
unplugged it.

I believe the problem with my file is that the printer is not
recognizing my ESC character. How do you insert an ESC character into
a .pcl file? I am using the following code below.

echo downloading Ar080bpn.sfp Softfont
copy /b font9.pcl lpt1: -- > code *c9D
copy /b Ar080bpn.sfp lpt1:
copy /b perm.pcl lpt1: -- > code *c5F

echo downloading Co060rpn Softfont
copy /b font10.pcl lpt1: -- > code *c10D
copy /b Co060rpn.sfp lpt1:
copy /b perm.pcl lpt1: -- > code *c5F

echo downloading He120bpn.sfp Softfont
copy /b font11.pcl lpt1: -- > code *c11D
copy /b He120bpn.sfp lpt1:
copy /b perm.pcl lpt1: -- > code *c5F

echo All Forms Downloaded

Thanks
 
P

pbdev

I got some feedback from an HP rep. and he indicated that I use the
DOS editor to create the ESC character. Does anyone know about how to
do this?
Thanks in advance.
 
A

Alan

I am trying to upload 3 fonts to a HP Laserjet 4100 and continue to
have problems. I am using a .bat file to load the fonts. The problem
I believe is that the printer is not reading the ESC character I have
in my pcl files.

I found this way: a tiny file called esc.com that outputs an escape
character.
Here it is encoded as I found it:

======
esc.com: sends an ESC (char 27) to std output, followed by its
arguments.
Useful for making PCL print commands.

Use ESC % 1 B >prn or ESC %0B > prn.
In Bat files one has to double percent signs (like ESC %% 1B >prn)

section 1 of uuencode 4.02 of file esc.com by R.E.M.


sum -r/size 63004/84 section (from "begin" to "end")
sum -r/size 41677/41 entire input file
=====end

-- copy the text between the == lines, save to a file "esc.uu" then
decode -- Aladdin Expander works, probably Winzip. It should create
"esc.com".

Now you can use this to make batch files to send PCL.
Eg: to send the PCL
<ESC>&l1057.32259J
to the printer, use the single-line batch:

esc.com &l1057.32259J>prn
 
D

Dick Wisan

pbdev (e-mail address removed) says...
I got some feedback from an HP rep. and he indicated that I use the
DOS editor to create the ESC character. Does anyone know about how to
do this?

It's easy if your DOS editor has a "literal" character. WordStar-ish
editors like the Borland programming editors use ^P that way. So,
^P followed by an Esc leaves just an Esc char in the file. Various
editors, for example, Eric Meyer's VDE.COM cab do this. So can the old
EDIT.COM editor that came with DOS.
 
B

birch999

I got some feedback from an HP rep. and he indicated that I use the
DOS editor to create the ESC character. Does anyone know about how to
do this?

While holding down the ALT key, type 027 on the key pad.
 
P

pbdev

Thanks for the replys,

OS - operating system was the problem.

I was working on an XP PRO system - Did not work no matter what.

I tried it on an WinNT 4.0 box and wha-la. It worked and worked
consistenly and multiple times. I dont have to be concerned with the
XP box and since it works on an WinNT box - Problem solved.

If you find a solution for the XP box, I will give you 10 Points :)

Thanks again for all your help.


I am trying to upload 3 fonts to a HP Laserjet 4100 and continue to
have problems. I am using a .bat file to load the fonts. The problem
I believe is that the printer is not reading the ESC character I have
in my pcl files.

I found this way: a tiny file called esc.com that outputs an escape
character.
Here it is encoded as I found it:

======
esc.com: sends an ESC (char 27) to std output, followed by its
arguments.
Useful for making PCL print commands.

Use ESC % 1 B >prn or ESC %0B > prn.
In Bat files one has to double percent signs (like ESC %% 1B >prn)

section 1 of uuencode 4.02 of file esc.com by R.E.M.

begin 644 esc.com
ILANT`LTA,<F*#H``XQJ^@0#\LR"L/")U`X#S(#C8=`:(PK0"S2'B[,/B4
``
end
sum -r/size 63004/84 section (from "begin" to "end")
sum -r/size 41677/41 entire input file
=====end

-- copy the text between the == lines, save to a file "esc.uu" then
decode -- Aladdin Expander works, probably Winzip. It should create
"esc.com".

Now you can use this to make batch files to send PCL.
Eg: to send the PCL
<ESC>&l1057.32259J
to the printer, use the single-line batch:

esc.com &l1057.32259J>prn
 
P

pbdev

OS - operating system was the problem.

I was working on an XP PRO system - Did not work no matter what.

I tried it on an WinNT 4.0 box and wha-la. It worked and worked
consistenly and multiple times. I dont have to be concerned with the
XP box and since it works on an WinNT box - Problem solved.

If you find a solution for the XP box, I will give you 10 Points :)

Thanks again for all your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top