Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


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

Posted on 1998-11-16
Medium Priority
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 150 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

When I recently replaced my image transfer kit on my office HP color laserjet 5550dn printer, I had a slight problem.  The left bracket that holds the transfer kit got stuck in the upright locked position instead of being at a 45 degree angle facing…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) 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…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

618 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