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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Ricoh Aficio 1022 Keycode 3 60
Open BIOS. Win 10 3 55
How to scan the entire subnet and get the Printers IP address ? 6 121
RDS Re-Directing LaserJet Not Working? 6 99
This seems to be a very common error related to the Samsung printer driver. First, this is the error we're talking about: Log: System Type: Error Event: 7000 Agent Time: 3:37:24 am 22-Apr-09 Event Time: 6:07:24 pm 21-Apr-09 UTC Source: Se…
Causes of paper jams:The following are the main causes of paper jams. Guides:If the guides for the paper are not set correctly they may cause the paper to enter at an angle. You should ensure that the guides are set correctly for the paper type a…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

815 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now