ErgoEmacsEmacsLispBlogEmacsLispBuy Tutorial
Web Hosting by 1&1

44 PostScript Hardcopy

These commands convert buffer contents to PostScript, either printing it or leaving it in another Emacs buffer.

M-x ps-print-buffer
Print hardcopy of the current buffer in PostScript form.
M-x ps-print-region
Print hardcopy of the current region in PostScript form.
M-x ps-print-buffer-with-faces
Print hardcopy of the current buffer in PostScript form, showing the faces used in the text by means of PostScript features.
M-x ps-print-region-with-faces
Print hardcopy of the current region in PostScript form, showing the faces used in the text.
M-x ps-spool-buffer
Generate and spool a PostScript image for the current buffer text.
M-x ps-spool-region
Generate and spool a PostScript image for the current region.
M-x ps-spool-buffer-with-faces
Generate and spool a PostScript image for the current buffer, showing the faces used.
M-x ps-spool-region-with-faces
Generate and spool a PostScript image for the current region, showing the faces used.
M-x ps-despool
Send the spooled PostScript to the printer.
M-x handwrite
Generate/print PostScript for the current buffer as if handwritten.

The PostScript commands, ps-print-buffer and ps-print-region, print buffer contents in PostScript form. One command prints the entire buffer; the other, just the region. The corresponding ‘-with-faces’ commands, ps-print-buffer-with-faces and ps-print-region-with-faces, use PostScript features to show the faces (fonts and colors) in the text properties of the text being printed. The ‘-with-faces’ commands only work if they are used in a window system, so it has a way to determine color values.

Interactively, when you use a prefix argument (C-u), the command prompts the user for a file name, and saves the PostScript image in that file instead of sending it to the printer.

Noninteractively, the argument filename is treated as follows: if it is nil, send the image to the printer. If filename is a string, save the PostScript image in a file with that name.

If you are using a color display, you can print a buffer of program code with color highlighting by turning on Font-Lock mode in that buffer, and using ps-print-buffer-with-faces.

The commands whose names have ‘spool’ instead of ‘print’, generate the PostScript output in an Emacs buffer instead of sending it to the printer.

Use the command ps-despool to send the spooled images to the printer.

This command sends the PostScript generated by ‘-spool-’ commands (see commands above) to the printer.

Interactively, when you use a prefix argument (C-u), the command prompts the user for a file name, and saves the spooled PostScript image in that file instead of sending it to the printer.

Noninteractively, the argument filename is treated as follows: if it is nil, send the image to the printer. If filename is a string, save the PostScript image in a file with that name.

M-x handwrite is more frivolous. It generates a PostScript rendition of the current buffer as a cursive handwritten document. It can be customized in group handwrite. This function only supports ISO 8859-1 characters.

The following section describes variables for customizing these commands.

blog comments powered by Disqus