Solved

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

Posted on 1998-11-16
5
308 Views
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:
 {ESC}%-12345X@PJL DEFAULT ECONOMODE=ON
 {Esc}%-12345X

Is there some way I can prevent this blank page from printing?
0
Comment
Question by:MinnEE
  • 3
  • 2
5 Comments
 
LVL 12

Accepted Solution

by:
mark2150 earned 50 total points
Comment Utility
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
 
LVL 1

Author Comment

by:MinnEE
Comment Utility
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
 
LVL 12

Expert Comment

by:mark2150
Comment Utility
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
 
LVL 1

Author Comment

by:MinnEE
Comment Utility
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
 
LVL 12

Expert Comment

by:mark2150
Comment Utility
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 Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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 …
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 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

16 Experts available now in Live!

Get 1:1 Help Now