# The &kljettool; Handbook

Mike
McBride

    mpmcbride7@yahoo.com

Bernd Johannes
Wuebben

    wuebben@kde.org

Developer
Espen
Sand

    espen@kde.org

Developer
Lauri
Watts

    lauri@kde.org

Reviewer
2000
Mike McBride
&FDLNotice;
2000-10-21
1.01.00

&kljettool; is a program that lets you adjust your &Hewlett-Packard; Laserjet operating parameters.

KDE
KLJetTool
laserjet

## Introduction

&kljettool; is a program that lets you adjust your &Hewlett-Packard; Laserjet operating parameters. Some of &Hewlett-Packard;'s printers such as the 5L or the 6L do no longer have a hardware control panel and the printer is controlled completely by software. However this software is often available only for the &Windows; platform. &kljettool; seeks to fill the need for such software on the &UNIX; platform. It should work with any printer that understands &Hewlett-Packard;'s PJL ( Printer Job Language). However some features may have no effect on your particular model.

I hope you will enjoy this little tool.

Bernd Johannes Wuebben wuebben@kde.org

## Getting &kljettool; to work

Some &Linux; distributions have an overly eager printing subsystem that doesn't respect the PJL files generated by &kljettool;. The printing subsystem on these systems does not recognize a PJL file as such and tries to transform it using its filters. This will cause &kljettool; to malfunction.

This section describes the steps necessary to get LJetTool to work on pre 5.0 &RedHat; &Linux; systems (&kljettool; should work out of the box on &RedHat; &Linux; 5.0 based distributions ). I assume similar steps might be necessary on other systems. However, the steps which need to be undertaken are not difficult. All that needs to be done is to make sure that the printing subsystem sends PJL files unmodified to the printer.

A &RedHat; &Linux; system does not recognize PJL out of the box, and tries to do weird things with it rather then sending it unmodified to the printer, so we have to teach it how to deal with a PJL file. However before you make the changes suggested here to your system, be sure that &kljettool; really doesn't work on your system. &RedHat; and other distributions might well have updated its printing subsystem by the time you read this.

I assume other distributions with an equally sophisticated printer subsytem such as the &RedHat; system might also need to be taught how to deal with PJL ( Printer Job Language ) files that are send to the printer.

On a &RedHat; system the script `/var/spool/lpd/lp/filter` is invoked from `/etc/printcap`, each time something is printed using the command `lpr`. The filter runs the program `file` on the file to be printed and `file` will tell the `filter` script what sort of document we are dealing with. Then depending on the type of the document the right program is run to produce output in a format that the printer can understand. The program `file` uses the file `/etc/magic` to determine the type of the document to be printed (&eg; &PostScript;, &DVI;, text &etc;)

For example, if I print a &PostScript; document, `myfile.ps`, `file` tells the `filter` script that we are dealing with a &PostScript; file and `filter` will run `ghostscript` first to convert `myfile.ps` into pcl 5, a language my laserjet understands, before sending the file to the printer.

Unfortunately a &RedHat; system doesn't recognize a PJL file and tries to do wrong things with the PJL file rather than sending it out to the printer unmodified.

In order to get &kljettool; to work on a &RedHat; system we only need to do two things:

- Add a line to the `/etc/magic` file so that the program `file` will correctly recognize a PJL file as a PJL file.

  Simply add the following two lines to your `/etc/magic` file. Where in the file `/etc/magic` add these lines doesn't really matter.

      # HP Printer Job Language, Bernd Wuebben (wuebben@math.cornell.edu)
      0	string		\033%-12345X	 HP PJL printer commands

- Teach the `/var/spool/lpd/lp/filter` script what to do with PJL files. This can be done by adding the following two lines to the `filter` script

         *pjl* )
                                                   startpnt="INPUT-to-prdata";;

  If you have a look at the `filter` script it will be clear where to add it ( at about line 220 in the version I have ). These lines simply tell the script to leave a PJL file alone and to send it unmodified to the printer.

I have included a copy of my `filter` script as well as my `/etc/magic`. You can use them if you have trouble making the above outlined modifications. You should be able to find them in the same directory where you found &kljettool; documentation.

I would love to received instructions for what ( if anything ) needs to be done to get &kljettool; to work on other systems who use an elaborate printing filter subsystem.

## Usage

&kljettool; is very simply to use. In fact most of its functions should be self-explanatory.

### &kljettool; Screen

When you start &kljettool;, you are presented with a small window with 5 tabs labled: Printer, Paper, Operations, Fonts and About.

&kljettool; screenshot.
Screenshot

Along the bottom are 4 buttons:

Help

  This button opens this document in the help browser.

OK

  This button makes your changes permenant, and closes &kljettool;.

Apply

  This button makes your changes permenant, but it does not close &kljettool; so you can test your settings and adjust them some more.

Close

  Exits the program without saving the changes.

#### Printer tab

Mode

  You should choose between Economy Mode and Presentation Mode. Economy mode is suitable for everyday printing, and requires less toner. The Presentation Mode produces the highest quality output, but requires more toner.

Resolution

  Choose between 300dpi and 600dpi for your printer.

Printer

  You can choose from a list of printers. If your printer does not appear in the list provided, see the section on "Getting &kljettool; to work"

Density

  This will help determine how dark the print is on your final output.

Resolution Enhancement

  Determines the resolution enhancement mode.

#### Paper tab

Format

  This drop down box allows you to choose your paper size, from a variety of standard sizes.

Copies

  Choose how many copies of each page you should print.

  This will not override the settings of another application. This is in addition to the settings of all other applications.

  (You can think of the total number of copies as a multiplication problem)

  As an example:

  If you tell &kword; to print 2 copies of a letter, but you tell &kljettool; to print one copy of the letter, 2 copies will still be printed. (&kword; says print copy one of the letter. Now print copy 2 of the letter. (2 multiplied by 1 = 2 copies)

  On the other hand, if you tell &kword; to print 1 copy of a letter, and you tell &kljettool; to print 2 copies of the letter, 2 copies will still be printed. (in this case, &kword; says Print the letter. &kljettool; then says, OK, now I need to print 2 of everything, so you get 2 copies of the letter. (1 multiplied by 2 = 2 copies)

  Finally, if you tell &kword; to print 2 copies of the letter, and you tell &kljettool; to print 2 copies of the letter, you will get 4 copies of the letter. (2 multiplied by 2 = 4 copies.)

Lines

  This determines the number of printed lines on a page.

Orientation

  You can choose to have &kljettool; force a page to fit across (landscape) or up and down a page (portrait).

Miscellaneous

  Has two options:

  Manual feed

    Used to tell the printer to take paper from the manual feed slot, rather than the normal paper tray.

  Autocontinue

    If selected, and if the requested paper size or type is not available in the printer, the printer will override paper format, and pull paper from the default tray. If not selected, the printer will wait for the correct paper size to be inserted.

#### Operations Tab

End of Line Mode

  Determines how end of lines are sent to the printer. If you are not having problems, do not change this.

Page Protect

  Sets the Page Protect option on your printer. Refer to your printer manual for an explanation of this feature.

Power Save Time

  Determine the time of inactivity before the printer enters Powersave mode.

#### Fonts Tab

This box lets you determine the language, Symbol Set and font sizes to use for printing.

#### About Tab

This provides program and copyright information.

## Credits and License

&kljettool;

Program copyright 1997-2000 Bernd Johannes Wuebben wuebben@kde.org

Contributors:

- Espen Sand espen@kde.org

Documentation copyright 2000 Mike McBridempmcbride7@yahoo.com and Bernd Johannes Wuebben wuebben@kde.org

&underFDL; &underGPL;

## Installation

### How to obtain &kljettool;

&kljettool; is part of the &kde; project http://www.kde.org. &kljettool; can be found on ftp://ftp.kde.org/pub/kde/, the main &FTP; site of the &kde; project.

### Requirements

In order to successfully compile &kljettool;, you need the latest versions of libkdecore and libkfm. All required libraries as well as &kljettool; itself can be found on ftp://ftp.kde.org/pub/kde/.

### Compilation and Installation

In order to compile and install &kljettool; on your system, type the following in the base directory of the &kde; distribution:

    % cd kdeutils
    % ./configure
    % make
    % make install

Since &kljettool; uses `autoconf` you should have not trouble compiling it. Should you run into problems please report them to the &kde; mailing lists.

&documentation.index;