# print-buffer(2)

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

## NAME

print-buffer - Print buffer, with formatting
print-region - Print region, with formatting

## SYNOPSIS

n print-buffer
n print-region

## DESCRIPTION

print-buffer and print-region print the current buffer or region, respectively, using high-lighting where appropriate. The hilighting assigned to a buffer is defined by the variable $buffer-hilight(5) the print scheme is defined with print-scheme(2), the scheme-editor(3) should be used to create printer schemes.

The printing is typically configured using print-setup(3), which can be found in the main menu under File->Printer Setup.

The numerical argument n is generally used for macro development, it changes the default behaviour of these commands as follows:

-2

Configures the printer and, on win32 platforms, opens a Windows printing dialog box enabling the user to configure the printer, font and page layout. The configuration is stored in the "`/print`" registry.

-1

Configures the printer, the configuration is stored in the "`/print`" registry.

0

Configures the printer and, on win32 platforms, using the Windows printer, opens a Windows printing dialog box enabling the user to configure the printer, font and page layout. The required printing is then performed.

1

Configures the printer and performs the required printing.

## Printing Process

When either of these commands are executed the macro file `print.emf` is executed to configure the printer (in a same vain as `me.emf` is executed to configure MicroEmacs for general usage). After the macro file has been executed the "`/print`" registry must contain the information required for printing. Following is a list of registry entries and their use:

flags (integer)

The setup flags, defined as a bit mask as follows:-

`0x0f` - Destination of the printer output.

`0x00` - Buffer only.
`0x01` - Internal queue.
`0x02` - To file only.
`0x03` - To file and command line.

`0x10` - Bit set, header enabled.
`0x20` - Bit set, footer
`0x40` - Bit set, enable line numbers.
`0x80` - Bit set, Enable truncated line character (typically \).

paper-x (integer)

Paper page width in character cells.

paper-y (integer)

Paper page depth in character cells.

page-x (integer)

The logical page width in character cells.

page-y (integer)

The logical paper depth in character cells.

specifier-x (integer)

Windows only.

specifier-y (integer)

Windows only.

font-face (string)

The name of the font face (Windows only).

rows (integer)

Number rows per output page.

cols (integer)

Number of columns per output page.

mtop (integer)

The size of the top margin in character cells (i.e. where printing may commence).

mbottom (integer)

The size of the bottom margin in character cells (i.e. where printing stops).

mleft (integer)

The number of characters of space forming the left magin of the physical page.

mright (integer)

The number of characters of space forming the right magin of the physical page.

header (string)

The ASCII text string for the header line.

footer (string)

The ASCII text string for the footer line.

port (string)

Printer port identity.

buffer (string)

The name of the destination buffer.

file (string)

The name of the destination file.

strip (integer)

If integer value strip spaces from eol.

device (string)

The ASCII name of the device (i.e. `/dev/lp`).

eof (string)

The printer codes for the end of the file, may be the empty string if not reqired.

eol (string)

The printer codes for the end of line character.

eop (string)

The printer codes for the end of a page.

sof (string)

The printer codes for the start of a file, may be the empty string if not required.

sol (string)

The printer codes for the start of a line.

sop (string)

The printer codes for the start of a page.

scont (string)

The printer codes for a start of row continuation.

econt (string)

The printer codes for the end of row continuation.

hsep (string)

The horizonal logical page separator character.

vsep (string)

The vertical logical page separator character.

wsep (string)

The depth in character cells of the vertical logical page separator.

xsep (string)

The width in character cells of the logical horizontal separator.

bg-color (integer)

The background colour number.

command-line (string)

The command line to perform a print operation.

## Printing Under Microsoft Windows Environments

Printing under Microsoft Windows Environments automatically invokes a dialog box to assign and configure the printer page characteristics. The dialog box allows the printer to be selected, enables line numbering, headers and footers.

The dialog allows the user to select the font size, by defining the number of characters that appear on a logical page, and the number of logical pages that appear on a physical page. Selecting the logical and physical page characteristics determine the size of the font. For dense pages with a small typeface then a point size of 6 is appropriate. For clarity, a larger typeface of 10 or 12 points is advised.

## NOTES

The last printer configuration selected by the user is held in the registry file "`print.erf`" which is loaded into the /print-history registry section. This feature is implemented in the macro file `print.emf`.

## BUGS

Landscape printing under Microsoft Windows environments is temperamental.

Font selection under Microsoft Windows environments does not always determine the most appropriate font size.

The printer interface does not support native postscript generation. (In progress).

## SEE ALSO

print-setup(3), scheme-editor(3), print-scheme(2), hilight(2), printall(3f), $buffer-hilight(5).

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

</HMTL>