Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Print Density Settings

Print Density Settings

Print Density Settings

I have acquired a HP LaserJet 1200 series printer and am attempting to set the factory print setting of 3 to 5.

HP have given their PCL codes to achieve this and I have had a 'program' .prn file written for this but am unable to send it to the printer. I have however written a routine in Foxbase+ for modifying the pitch of the printer using: ??CHR(27)+"&k2S" which is succesfull with a Do command.

I would like to know if there is a code that I could use to set the Density of the print.

[Not a techie and am not a programmer]

In anticipation and thanks

RE: Print Density Settings

There is no PCL command to set the density. There is a PJL command to do so, but I am not sure that it will write to NVRAM.

Anyway, try creating this file where Ec represents the escape character chr(27) in your example...


Copy that file to your printer and see if it helps.

All of my printers have a display whereby you can set all of those things at the printer. If your printer doesn't have a display, there is probably a utility of some kind for the printer for such settings.

Perhaps DansDad can contribute to this.

Jim Asman

RE: Print Density Settings

Thanks for your post.

I should have entered 'PJL' [not PCL!]

However I have two prn files written for me [on HP Community forum] that I downloaded to my computer but was unable to 'post' them to my printer and then went down the route of writing a routine within Foxbase+ with


that modified the print settings to 16.67 cpi with the Do command.
And now am looking for modifying Density in a similar way.

I do not know how what you have given can be 'sent' to my printer as I have said I was unable to send this to my printer in XP via: Start -> All Programs -> Accesories -> Command Prompt and entering the Dos command " copy/b PJL_default_density_5.prn LPT1: [And got the response 'Windows cannot find "copy/b]

And please note I am NOT a programmer just a [retired] Accountant who has been using Foxbase+ to create Reports and prepare Accounts for a Charity.

RE: Print Density Settings

You need a space between copy and /b. So ...

copy /b PJL_file.prn LPT1:

will do it.

Are you really looking for boldface rather that plus density? If so,
there are all kinds of font select commands for typeface variations.
You may not find that there is much difference visually between a
density of 3 vs 5. The Ec&k2S is a VERY OLD command and should be
replaced by relevant pitch and typeface commands.

If your print is really light, maybe the printer is set to draft mode where the printer saves on toner.

Jim Asman

RE: Print Density Settings

Thanks for your reply and advising me why my " copy /b PJL etc" command was ineffective.

However I am comfortable with the command within Foxbase as it is only when I am in that Directory [in Dos] that I need to have compressed printing in order to print the financial Reports generated in Foxbase.
In other cases I use Wordstar or Wordstar for Windows and in those programs the pitch is set within the document itself. [And I use Foxbase to prepare Accounts for a [small] Charity once year...say a week]

As I said I am NOT a programmer and there may be various font select commands but these need to be spelt out in detail so that I can use them.

And, yes, I am not necessarily looking for Density and the factory settings in the HPJL1200 printer is I think in draft mode and I think to get a better finish that amending Density to 5 would sort it unless you can show otherwise.


RE: Print Density Settings

I have told you how to set he density.

To turn off Economode, assuming it is on at the moment, send the following to the printer ...


ChrisH on the HP forum gave you all the advice that you need
and for whatever reason you are ignoring it; consequently there is little I can add. Appreciate that we have no visual reference to base any advice on.

Jim Asman

RE: Print Density Settings


If you read the thread in HP Business Community forum you will note that I was not ignoring his advice but had problems following the advice with sending the prn files to the printer.

However will attempt to send the Density.prn file via the copy / b command again and see what happens.

And how would I write the Economode Off file? Using [say] Wordstar in Non Document mode? Or saving it as a Prn file?

Did inform Chris that I was a bit of a dumbo ....


RE: Print Density Settings


I attempted to post/print the prn files in various ways-

Start -> cmd -> COPY/ B pjl_default_density etc
and got 'The system cannot find the file specified'

Start -> All Programs -> Accessories -> Command Prompt etc
and got 'Windows cannot find copy'

Then using a utility downloaded from the Internet: PrnPrint and sent the prn files to the printer.

Each time I tested the printer and found at 'one point' [which!!!] that I got compressed printing but cannot pinpoint it to a specific 'posting'. I then lost the compressed printing mode and have not been able to trace it to which method.

However the prints are much darker and satisfactory... hope I don't lose the settings but will have to turn the printer off/on when I work in Foxbase+ and print reports...

Oh well. I can always (?) rely on the Foxbase prg file in Dos to get compressed mode.

RE: Print Density Settings

Attached are links to two files, density-5.pjl and econo-off.pjl

These are the complete files you need to send to your printer to change the settings. Assuming you are sitting in the directory where the files reside at the command prompt ...

copy /b density-5.pjl LPT1:

copy /b econo-off.pjl LPT1:

If you get an error, you have typed something wrong.

Jim Asman

RE: Print Density Settings

Note that when you link to the file, it will display NOT showing the chr(27) required, but those characters ARE in the file and if you save the files to your computer and copy them to your printer port as shown above, you should be good.

Jim Asman

RE: Print Density Settings

>> ... using a utility downloaded from the Internet: PrnPrint and sent the prn files to the printer ...

This utility packages up the 'copy' mechanism for you (not necessarily using the copy command - it depends on how the printer is connected).

>> ... Each time I tested the printer and found at 'one point' [which!!!] that I got compressed printing but cannot pinpoint it to a specific 'posting'.
>> ... I then lost the compressed printing mode and have not been able to trace it to which method ...

The (obsolete) PCL escape sequence <Esc>&k2S (meaning set "Pitch Mode: Compressed (16.67 cpi)" will only affect the current print job; it is not a persistent command, and does not set any default on the device.

>> ... However the prints are much darker and satisfactory... hope I don't lose the settings ...

This perhaps implies that the PJL job (sent using PrnPrint ?) to set the default print density was successful.

This is the HP forum thread referred to above where I posted (as Chris H) advice and sample print files similar to those posted above by Jim.

Look in the FAQs section of this forum for links to PCL and PJL documentation.

RE: Print Density Settings

Thanks for your post Jim

Will download and use PrnPrint to post the files that you have compiled. The advantage of using PrnPrint is that one does not have to select the port: In WsWin the port selected is DOT4_001 for the HPLJ1200 while in Dos there is only one port available viz LPT1. [And no way of installing the HPLJ1200 printer/driver [as far as I am aware].

At present the printer is printing in 'dark' mode and quite satisfactory.. if or when I turn the machine off it will revert to the original settings.

Thanks again for your assistance.


RE: Print Density Settings

Dan or is it Chris!!!

Am gobsmacked. Why all these [non] pseudonyms? Why not stick to Dan OR Chris.

I posted on the HP Community site as Cahoon because I had problems with logging in as Kahawn and the HP site would not accept my accepted logged in details on another HP site. [May have posted an explanation in the first post on the second HP site].

Was Baptised Cahen which is an Irish name and the Gaelic equivalent 'Kahawn'.. However my parents felt it was confused with Cohen and I therefore became Ken -> Kenneth.

And double thanks for your input on both forums [or is it fora!]

RE: Print Density Settings


>> ... Why not stick to Dan OR Chris ...

When I signed up (nearly 12 years ago) to this forum, I used the pseudonym DansDadUK (I'm Dan's father, and I live in the UK) since I was a bit wary of signing up using actual names.

A few years later, I signed up with HP, but (for some reason I can't now remember) the (then HP ITRC) forum wouldn't allow use of that name so I used 'Chris H'; since then, the ITRC has become the HP Enterprise forum, but there is also an equivalent HP Consumer forum, which I joined more recently (but that wouldn't let me use Chris H, so I reverted to DansDadUK for that one!).

Anyway, glad that I and Jim have been of help with your problems.

>> ... forums [or is it fora!] ...

Probably depends on whether you are viewing this from a Latin, or contemporary English perspective.


RE: Print Density Settings


I have hit a snag in the Dos 6.2 section with Wordstar.

I substituted the HPlllp printer with HP Laserjet in Wordstar and as a result found that the pitch available were only TWO viz 10 and 16.67 cpi. I need 12 cpi to print address labels and therefore substituted the Laserjet with HPLLLP and then deleted Laser.PDF from the Wordstar or Windows directory.

However I find that every time I go to print I get Laser as the printer.

Is there any way of 'fixing' the changes and set up HPLLLP as the printer. [There is a facility in Wordstar wschange to make alterations and this I have done selecting HPLLLP as default printer].


RE: Print Density Settings

That is all a Wordstar issue, and I have no knowledge. I would think that there would be a mechanism in Wordstar to enter specialty codes.
The best thing would probably try to find a Wordstar forum.

Jim Asman

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close