• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 344
  • Last Modified:

PJL Commands on HP 4L in Win 98 print blank sheet

My HP Laser jet 4L worked fine with DOS 6.2 when I sent various PJL commands under DOS to change the symbol set, font size. orientation, etc.  I connected it to my new HP Pavilion with Windows 98. Printing under windows works fine. But if I, go to DOS (under Windows) and copy these PJL commands to the printer, the action is taken OK, but I get a blank page printed with the left pointing arrow (The Escape character #27) printed at the top left of the page.

An example of one my calling bat files is:
 @ echo off
 rem set HP printer Econ mode on
 copy c:\bats\econon.esc prn > nul

And the file c:\bats\econon.esc sent to the printer is:
 {ESC}%-12345X@PJL DEFAULT ECONOMODE=ON
 {Esc}%-12345X

Is there some way I can prevent this blank page from printing?
0
MinnEE
Asked:
MinnEE
  • 3
  • 2
1 Solution
 
mark2150Commented:
You have to understand that printing from DOS under windows is *NOT* the same as printing in straight DOS. When you DOS child task prints (even with a copy ... prn) the data is *NOT* sent directly to the printer, rather it is handled by the windows shell and spooled out via the windows print drivers. What you're trying will *NOT* work.

Now, you can play games with the printer at the windows level and set your various modes. One technique is to define multiple copies of the same printer, one set for econo, one for final, etc. Then you check your default printer immediately prior to firing your DOS child and all print will have the appropriate mode.

Alternatively if you have VB or some other windows complaint language handy, you can set the printers characteristics from code and then spawn your child task. This automates the printer selection process.

But, the days of the simple COPY ... PRN are over.

M

0
 
MinnEEAuthor Commented:
Thanks for the quick response (and bad news).  I do write some programs in VB. I will also post another question about possibly restarting in DOS mode and the posibility of using the printer there.
0
 
mark2150Commented:
If you come up in DOS mode (change BOOTGUI=0 in MSDOS.SYS) then you're on a straight DOS box like we've all known and loved. All will be as it was in DOS 3.11 (grin)

M

0
 
MinnEEAuthor Commented:
Yes, I discovered I can restart my system in the MSDOS mode (an option from the Shut Down command).  Originally, I could not print from here however. After some phone help from the system manufacturer (HP), we found out my BIOS setting were such that DOS was not recogonizing the LPT1 port. Two changes here and every things now works fine. Normal DOS printing and also sending PJL commands to the printer. In fact this is the only way I know to get the PC8 Symbol set (the one I prefer for ASCII characters > 127).
0
 
mark2150Commented:
You know you can preset the HP's to PC8 character set? That way you don't have to initialize it in software...

Depends on the model, check the manual, but you can lock in PC8 instead of ROMAN8 so you'll always have the little form drawing symbols instead of those funnies when you <PrtSc>...

M

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now