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

Posted on 1998-11-16
Last Modified: 2010-04-12
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:

Is there some way I can prevent this blank page from printing?
Question by:MinnEE
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 12

Accepted Solution

mark2150 earned 50 total points
ID: 2013301
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.



Author Comment

ID: 2013302
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.
LVL 12

Expert Comment

ID: 2013303
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)



Author Comment

ID: 2013304
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).
LVL 12

Expert Comment

ID: 2013305
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>...



Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you use a Brother DCP 130C or similar Brother printer, at some point you might encounter the following problem: after you change the ink cartridge, the printer displays an "ink empty" message. Sometimes you just need to follow the instructions…
Printers have changed substantially in the last 30 or so years, not just in technical capabilities but in cost and usage as well.  Printers were originally used for interfacing with the operator, not necessarily for printing copy or pictures. In …
In an interesting question ( here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question