# 7.6. Printing

As KDevelop is designed to give developers the best access to files and information to reduce development cycles, it also contains a new printing utility which makes use of two common printing programs available for Unix-Systems, a2ps (ASCII-to-Postscript) and enscript . Besides these, you can also print by directly using lpr (the lineprinter device). As using a2ps or enscript offers the most options towards printing , you should install either one of these on your system; both programs are usually shipped with distributions, so you shouldn't have any problem to get them. But before printing , you should have a look at the available configuration dialog s to prepare the output according to your needs. The following section describes how to configure KDevelop for printing files.

## 7.6.1. Configuring the Printer

The printing programs can both be configured by selecting "Print" from the "File"-menu ; on the printing dialog, select the program by the drop-down-menu in the left upper corner. Then press the "Options" button on the right. This opens the configuration for the selected program that will be used. Another way to configure the programs are selecting "Printer Configuration..." from the "Options"-menu; then select "a2ps " or "enscript ".

### 7.6.1.1. The a2ps Configuration Options

#### 7.6.1.1.1. Printing

- header: adds a header frame to the page

- filename: if checked, the header frame will contain the filename as its text

- login: adds the User ID to the right upper corner of the page

- borders: adds frame borders to the text page

- Date & Time: adds the printing date and time

- align files: prints out files on the same page, available for two-page printing mode

- set TAB size: sets the TAB size for printing TABs

- headertext: available, if filename is deselected and allows inserting another text to the header frame

- fontsize: sets the fontsize for the text. The default fontsize is 9

#### 7.6.1.1.2. Textprinting

- cut lines: cuts the line's contents if the line is too large to be printed. If deselected, lines will be broken.

- interpret TAB, BS and FF: interpret TAB, Backspace and FastForward characters.

- replace non-printing character by space: if the file contains non-printable characters, those will be replaced by space characters.

- print non-ASCII character as ISO-Latin 1: prints characters not included in the ASCII format in ISO-Latin 1 mode output

- bold font: prints the whole text in bold font mode.

#### 7.6.1.1.3. Numbering

- numbering lines: numbers all lines top-down if enabled

- numbering pages: allows selecting page-numbering mode by:

  - file single: numbers each file's pages beginning with 1

  - file together: appends all following pages after the first for page numbering

- lines per page: sets the maximum lines per page to be printed.

### 7.6.1.2. The enscript Configuration Options

#### 7.6.1.2.1. Header

- Fancy Header: adds a fancy header

- Header Text: enables adding a header text

  - text: sets the text's contents

  - position: sets the text's position to left, center or right

- Login: add the UserID to the header

  - login: enables adding UserID

  - position: sets the position for the UserID

- Filename: add the filename to the header

  - Size of filename: add filename as full or short, meaning full path or filename only

  - Position: sets the position for the filename

- Hostname: add the hostname to the header

  - hostname: enables adding hostname

  - size of hostname: sets the size for hostname

  - Position: sets the position for hostname

#### 7.6.1.2.2. Date & Time

- Current Date: include the current date

  - current date: enables current date adding

  - position: sets the position for the date entry

  - format: sets the date format

- Modification Date: include the last modification date

  - modification date: enables modification date adding

  - position: sets the position for modification date entry

  - format: sets the date format

- Current Time: include current time

  - current time: enables current time adding

  - AM/PM: use AM/PM or 24h format

  - Position: sets the position for the time entry

  - Format: sets the time format

- Modification Time: include the last modification time

  - modification time: enables adding modification time

  - AMPM:/ use AM/PM or 24h format

  - Position: sets the position for the time entry

  - Format: sets the time format

#### 7.6.1.2.3. Layout

- Numbering & Border:

  - numbering lines: adds line numbers to the document for printing

  - borders: adds a border to the pages for printing

  - numbering pages: numbers pages for printing

  - align files: appends files for page numbering

  - lines per page: the maximum value for lines per page

- Format and TAB:

  - set TAB size: sets the TAB size for interpreting TABs

  - font for header: sets the font used for the header text

  - font for body: sets the font for the body text (file contents)

- Textprinting :

  - cut lines: cuts the lines if too large. If unchecked, lines are broken

  - replace non-printing character by space: replaces characters that the printing charset doesn't support by space characters

- Other Options:

  - table of contents: adds a table of contents page that contains information about printed files, page numbers etc.

  - Highlight bars:

    - highlight bars: highlights rows for printing

    - cycle fo change: sets the number of rows to change highlight style

  - Wrapped line:

    - mark wrapped lines: lines that are broken get marked for printing

    - value for wrapped line: the preset value for the new line the line is broken into.

#### 7.6.1.2.4. Underlay

- Text: sets the text to underlay

- Position: sets the position of underlay text

- Font: sets the font used for the underlay

- Angle: sets the angle for the underlay text

- Gray scaling: sets the grayscaling for the underlay text

- Style: sets the underlay text to be printed as outlined or filled

## 7.6.2. The Printing Dialog

### 7.6.2.1. Direct Printing Options

- Program: sets the printing program to be used for printing : a2ps , enscript or lpr

- Printer: sets the printer to be used for printing

- Output location: for printing into a file, select the output location

- Orientation: sets the orientation for printing , either landscape or portrait

- Copy: sets the amount of copies to be made per page

- Paper Size: sets the paper size to be used

- Output Format: for using enscript as printing program, you can choose between postscript or html printing

- Default Printsettings: sets the default settings to use for printing

- Outprinting :

  - Page Printing: sets one or two pages on one sheet

  - Pages: select all,odd or even for using enscript

  - Pretty Print:

    - pretty-print: enables pretty-print mode for enscript

    - color: use color printing

    - Pretty Print Mode: sets the printing mode dependent on your file format

### 7.6.2.2. File Selection

The file selection dialog is accessed by the "Files" button on the printing dialog. The file selection allows specifying which files to print out by certain criteria:

- File Selection:

  - current: the currently opened file visible in the editing window

  - all in project: all files included in the project currently opened

  - self chosen files: allows choosing the files to be printed by file-selection

  - all cpp files: prints out all source files of the project

  - all headers: prints out all header files of the project

  - changed files: allows specifying files that are changed in a timespan:

- Changed Files:

  - Between: specifies all files changed after:

    - Date: the date the files were changed

    - Time: the time the files were changed

  - And: specifies all files changed before:

    - Date: the date the files were changed

    - Time: the time the files were changed

- Self Chosen Files: available if self chosen files is selected (see above)

  - add: press this to add a file selected for printing in the lineedit field left

  - delete: deletes a selected file from the printing list

  - clear: clears the printing list

### 7.6.2.3. Print Preview

Print Preview is available for you to control how the output will look like. Therefore, KDevelop uses the program ghostview or kghostview. When the preview-button was pressed on either printing dialog, you will be presented a template output that shows you the effect of the currently set options.