# print-setup(3)

[Home] [Commands] [Variables] [Macro-Dev] [Glossary]

## NAME

print-setup - Configure MicroEmacs's printer interface

## SYNOPSIS

print-setup

## DESCRIPTION

print-setup provides a dialog interface for configuring MicroEmacs's printing interface. print-setup may be invoked from the main File menu or directly from the command line using execute-named-command(2).

The print-setup dialog is broken down into three pages of configuration options, the following buttons are available at the bottom of each dialog:-

`Print`

Prints the current buffer using the current configuration.

`Exit`

Quits print-setup, changes made to the configuration are saved.

The following pages appear in the dialog:-

## Printer

The Printer page is used to configure the type, style and location of the printer, the items on this page are defined as follows:-

`Driver`

Sets the printer type to be used, selecting this item creates a drop down list of available printer drivers. The drivers inform MicroEmacs which fonts and colors are available and how to enable/disable them, these are usually special character sequences. The following special drivers are defined:-

Default Plain Text

This driver does not use any special character sequences so the output it produces is plain text. This should work with most printers, but it does not support any colors or fonts.

HTML

This is a virtual printer driver as no printer uses HTML directly. However the files produced by this driver can be loaded by a web-browser and rendered with full color and font support so provides an efficient way of testing printer schemes. In addition may be used to convert the text rendered in MicroEmacs into HTML content.

Windows

This utilizes MicroEmacs's built-in Windows printer interface (Windows platforms only). When selected MicroEmacs communicates directly to the MS Printer Manager.

`Print Scheme`

Defines the color and font scheme to be used, selecting this item creates a drop down list of available printer schemes - choose the most appropriate one for your printer. The Default Plain Text scheme does not use any color or fonts and should work for all drivers. See the next item for scheme creation and editing.

`Edit`

Opens the scheme-editor(3) dialog box to edit the currently selected printer scheme. The editor may be used to create and install new printer schemes.

`Destination`

Specifies the destination print output, when selected a drop down menu appears with the following items:

To buffer only

Creates a "`*printer*`" buffer and prints to that buffer.

To file only

Creates a new temporary file and prints to it.

To file & print

Prints to a temporary file and then executes the `command-line` (see next item) to print the resultant file. This option is not available when using the Windows printer driver.

Direct to printer

Output is sent directly to the printer. The option is only available when using the Windows driver.

`Command-line`

Sets the command-line required to print a generated print file (option not available when the Windows driver is selected as printing is performed directly by the MS Print Manager). The command-line should be a single shell command using "`%f`" to reference the name of the file to be printed, e.g. on UNIX systems lp(1) or lpr(1) may be used as follows:-

    lp -s %f

On MS-DOS machines this may be performed by copying the file to the `PRN` device, as follows:

    copy %f PRN

`Page Layout`

Displays the current page configuration in the form:

Columns x Rows Chars-Wide x Chars-High

the fields cannot be edited directly, the settings in Page Setup affect these values.

## Page Setup

`Paper Size`

Defines the size of the printer paper, selecting this item produces a pop down menu listing of all available paper sizes. If the the Windows printer driver is being used this field cannot be selected and the Edit button is used instead.

`Page Size`

Defines the printable size of the page in terms of the number of characters which will fit on the paper (width x height). When selected a drop down menu lists all available sizes for the current paper size. This option is not available with the Windows driver and the Edit button should be used.

`Edit` (Windows only)

Opens a Windows printer dialog box allowing the user to specify the windows printer, paper size and character size, etc.

`No. of Columns` and `Rows`

Defines the page subdivision in terms of sub-columns and rows, thereby creating sub-pages within a page.

`Print Line Numbers`

When enabled, prints the line number at the left hand edge of each line.

`Print Split Line IDs`

When enabled the last right hand text column is reserved for a split line identifier. Whenever a line is too long to fit on a single line it is split over two or more lines, if this option is enabled the right edge will be set to the split character (usually a '`\`' char) to clearly indicate that the line is split.

`Page Layout`

As with the Printer Page Layout, displays the current page configuration, the field cannot be edited.

## Layout

`Margins`

Configures the top, bottom, left and right margins of the page in terms of characters.

`Print Header`

Defines whether a header should be printed and its format. The following escape sequence is interpreted:

`%%`

Print a '`%`' character.

`%b`

Print the current buffer's name.

`%D`

Print the current day of the month.

`%f`

Print the current buffer's file name.

`%h`

Print the current hour.

`%M`

Print the current month of the year.

`%m`

Print the current minute of the hour.

`%p`

Print the current page number.

`%s`

Print the current seconds.

`%Y`

Print the current year as a 2 digit number.

`%y`

Print the current year as a 4 digit number.

`Print Footer`

Defines whether a footer should be printed at the end of the page and the format. The header escape sequence characters are used.

## NOTES

print-setup is a macro using osd(2), defined in `printstp.emf`.

The list of available printer drivers and print schemes is stored in the macro file `printers.emf`. To create a new printer driver a new configuration registry file (`erf` file - see `print*.erf` for examples) must be created and added to the printer driver lists within `printer.emf`.

The `printers.emf` file also contains a list of printing schemes, using the Install option of the scheme-editor(3). scheme-editor(3) automatically adds the new scheme to the print schemes list.

## SEE ALSO

print-buffer(2), scheme-editor(3), osd(2).

(c) Copyright JASSPA 2009
Last Modified: 2009/08/29
Generated On: 2009/10/12

</HMTL>