/[emacs]/emacs/lisp/ps-print.el
ViewVC logotype

Diff of /emacs/lisp/ps-print.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.128 by rms, Fri Aug 30 15:48:29 2002 UTC revision 1.129 by rms, Mon Sep 9 19:26:40 2002 UTC
# Line 22  Emacs without changes to the version num Line 22  Emacs without changes to the version num
22  report the version of Emacs, if any, that ps-print was distributed with.  report the version of Emacs, if any, that ps-print was distributed with.
23    
24  Please send all bug fixes and enhancements to  Please send all bug fixes and enhancements to
25          Vinicius Jose Latorre <vinicius@cpqd.com.br>.          Vinicius Jose Latorre <vinicius@cpqd.com.br>.")
 ")  
26    
27  ;; This file is part of GNU Emacs.  ;; This file is part of GNU Emacs.
28    
# Line 1653  As an example for `ps-user-defined-prolo Line 1652  As an example for `ps-user-defined-prolo
1652     ;; Setting for HP PostScript printer     ;; Setting for HP PostScript printer
1653     (setq ps-user-defined-prologue     (setq ps-user-defined-prologue
1654           (concat \"<</DeferredMediaSelection true /PageSize [612 792] \"           (concat \"<</DeferredMediaSelection true /PageSize [612 792] \"
1655                   \"/MediaPosition 2 /MediaType (Plain)>> setpagedevice\"))                   \"/MediaPosition 2 /MediaType (Plain)>> setpagedevice\"))"
 "  
1656    :type '(choice :menu-tag "User Defined Prologue"    :type '(choice :menu-tag "User Defined Prologue"
1657                   :tag "User Defined Prologue"                   :tag "User Defined Prologue"
1658                   (const :tag "none" nil) string symbol)                   (const :tag "none" nil) string symbol)
# Line 1673  more requirements put them first in `ps- Line 1671  more requirements put them first in `ps-
1671  \"%%+\" comment.  For example, if you need to set numcopies to 3 and jog on  \"%%+\" comment.  For example, if you need to set numcopies to 3 and jog on
1672  requirements and set %%LanguageLevel: to 2, do:  requirements and set %%LanguageLevel: to 2, do:
1673    
1674  (setq ps-print-prologue-header   (setq ps-print-prologue-header
1675        \"%%+ numcopies(3) jog\\n%%LanguageLevel: 2\\n\")        \"%%+ numcopies(3) jog\\n%%LanguageLevel: 2\\n\")
1676    
1677  The duplex requirement is inserted by ps-print (see `ps-spool-duplex').  The duplex requirement is inserted by ps-print (see `ps-spool-duplex').
# Line 1729  See also `ps-printer-name-option' for do Line 1727  See also `ps-printer-name-option' for do
1727           "-P" ))           "-P" ))
1728    "*Option for `ps-printer-name' variable (see it).    "*Option for `ps-printer-name' variable (see it).
1729    
1730  On Unix-like systems, if it's been used lpr utility, it should be the string  On Unix-like systems, if `lpr' is in use, this should be the string
1731  \"-P\"; if it's been used lp utility, it should be the string \"-d\".  \"-P\"; if `lp' is in use, this should be the string \"-d\".
1732    
1733  On MS-DOS and MS-Windows systems, if it's been used print utility, it should be  On MS-DOS and MS-Windows systems, if `print' is in use, this should be
1734  the string \"/D:\".  the string \"/D:\".
1735    
1736  For any other printing utility, see the proper manual or documentation.  For any other printing utility, see its documentation.
1737    
1738  Set to \"\" or nil, if the utility given by `ps-lpr-command' needs an empty  Set this to \"\" or nil, if the utility given by `ps-lpr-command' needs an empty
1739  option printer name option.  printer name option.
1740    
1741  Any other value is treated as nil, that is, an empty printer name option.  Any other value is treated as nil, that is, an empty printer name option.
1742    
# Line 1858  It's used when `ps-spool-config' is set Line 1856  It's used when `ps-spool-config' is set
1856    :group 'ps-print-page)    :group 'ps-print-page)
1857    
1858  (defcustom ps-print-upside-down nil  (defcustom ps-print-upside-down nil
1859    "*Non-nil means print upside-down (that is, it's rotated by 180 grades)."    "*Non-nil means print upside-down (that is, rotated by 180 degrees)."
1860    :type 'boolean    :type 'boolean
1861    :version "21.1"    :version "21.1"
1862    :group 'ps-print-page)    :group 'ps-print-page)
# Line 1866  It's used when `ps-spool-config' is set Line 1864  It's used when `ps-spool-config' is set
1864  (defcustom ps-selected-pages nil  (defcustom ps-selected-pages nil
1865    "*Specify which pages to print.    "*Specify which pages to print.
1866    
1867  If it's nil, all pages are printed.  If nil, print all pages.
1868    
1869  If it's a list, the list element may be an integer or a cons cell (FROM . TO)  If a list, the lists element may be an integer or a cons cell (FROM . TO)
1870  designating FROM page to TO page; any invalid element is ignored, that is, an  designating FROM page to TO page; any invalid element is ignored, that is, an
1871  integer lesser than one or if FROM is greater than TO.  integer less than one or if FROM is greater than TO.
1872    
1873  Otherwise, it's treated as nil.  Otherwise, it's treated as nil.
1874    
1875  After ps-print processing `ps-selected-pages' is set to nil.  But the latest  After ps-print processing `ps-selected-pages' is set to nil.  But the
1876  `ps-selected-pages' is saved in `ps-last-selected-pages' (see it for  latest `ps-selected-pages' is saved in `ps-last-selected-pages' (which
1877  documentation).  So you can restore the latest selected pages by using  see).  So you can restore the latest selected pages by using
1878  `ps-last-selected-pages' or by calling `ps-restore-selected-pages' command (see  `ps-last-selected-pages' or with the `ps-restore-selected-pages'
1879  it for documentation).  command (which see).
1880    
1881  See also `ps-even-or-odd-pages'."  See also `ps-even-or-odd-pages'."
1882    :type '(repeat :tag "Selected Pages"    :type '(repeat :tag "Selected Pages"
# Line 2035  Any other value is treated as `left-top' Line 2033  Any other value is treated as `left-top'
2033    :group 'ps-print-n-up)    :group 'ps-print-n-up)
2034    
2035  (defcustom ps-number-of-columns (if ps-landscape-mode 2 1)  (defcustom ps-number-of-columns (if ps-landscape-mode 2 1)
2036    "*Specify the number of columns"    "*Specify the number of columns."
2037    :type 'number    :type 'number
2038    :group 'ps-print-miscellany)    :group 'ps-print-miscellany)
2039    
# Line 2195  page. Line 2193  page.
2193  If PAGES is nil, print background image on all pages.  If PAGES is nil, print background image on all pages.
2194    
2195  X, Y, XSCALE, YSCALE and ROTATION may be a floating point number, an integer  X, Y, XSCALE, YSCALE and ROTATION may be a floating point number, an integer
2196  number or a string. If it is a string, the string should contain PostScript  number or a string.  If it is a string, the string should contain PostScript
2197  programming that returns a float or integer value.  programming that returns a float or integer value.
2198    
2199  For example, if you wish to print an EPS image on all pages do:  For example, if you wish to print an EPS image on all pages do:
# Line 2245  page. Line 2243  page.
2243  If PAGES is nil, print background text on all pages.  If PAGES is nil, print background text on all pages.
2244    
2245  X, Y, FONTSIZE, GRAY and ROTATION may be a floating point number, an integer  X, Y, FONTSIZE, GRAY and ROTATION may be a floating point number, an integer
2246  number or a string. If it is a string, the string should contain PostScript  number or a string.  If it is a string, the string should contain PostScript
2247  programming that returns a float or integer value.  programming that returns a float or integer value.
2248    
2249  For example, if you wish to print text \"Preliminary\" on all pages do:  For example, if you wish to print text \"Preliminary\" on all pages do:
# Line 2320  For example, if you wish to print text \ Line 2318  For example, if you wish to print text \
2318    :group 'ps-print-vertical)    :group 'ps-print-vertical)
2319    
2320  (defcustom ps-header-line-pad 0.15  (defcustom ps-header-line-pad 0.15
2321    "*Portion of a header title line height to insert between the header frame    "*Portion of a header title line height to insert.
2322  and the text it contains, both in the vertical and horizontal directions."  The insertion is done between the header frame and the text it contains,
2323    both in the vertical and horizontal directions."
2324    :type 'number    :type 'number
2325    :group 'ps-print-vertical)    :group 'ps-print-vertical)
2326    
# Line 2331  and the text it contains, both in the ve Line 2330  and the text it contains, both in the ve
2330    :group 'ps-print-vertical)    :group 'ps-print-vertical)
2331    
2332  (defcustom ps-footer-line-pad 0.15  (defcustom ps-footer-line-pad 0.15
2333    "*Portion of a footer title line height to insert between the footer frame    "*Portion of a footer title line height to insert.
2334  and the text it contains, both in the vertical and horizontal directions."  The insertion is done between the footer frame and the text it contains,
2335    both in the vertical and horizontal directions."
2336    :type 'number    :type 'number
2337    :group 'ps-print-vertical)    :group 'ps-print-vertical)
2338    
# Line 2582  WARNING: The setpagedevice PostScript op Line 2582  WARNING: The setpagedevice PostScript op
2582           specified by setpagedevice, your printing will be aborted.           specified by setpagedevice, your printing will be aborted.
2583           So, if you need to use setpagedevice, set `ps-spool-config' to           So, if you need to use setpagedevice, set `ps-spool-config' to
2584           `setpagedevice', generate a test file and send it to your printer; if           `setpagedevice', generate a test file and send it to your printer; if
2585           the printed file isn't ok, set `ps-spool-config' to nil."           the printed file isn't OK, set `ps-spool-config' to nil."
2586    :type '(choice :menu-tag "Spool Config"    :type '(choice :menu-tag "Spool Config"
2587                   :tag "Spool Config"                   :tag "Spool Config"
2588                   (const lpr-switches) (const setpagedevice)                   (const lpr-switches) (const setpagedevice)
# Line 2718  It has effect only when `ps-spool-duplex Line 2718  It has effect only when `ps-spool-duplex
2718       (space-width . 2.2)       (space-width . 2.2)
2719       (avg-char-width . 4.10811))       (avg-char-width . 4.10811))
2720      )      )
2721    "*Font info database: font family (the key), name, bold, italic, bold-italic,    "*Font info database.
2722    Each element comprises: font family (the key), name, bold, italic, bold-italic,
2723  reference size, line height, space width, average character width.  reference size, line height, space width, average character width.
2724  To get the info for another specific font (say Helvetica), do the following:  To get the info for another specific font (say Helvetica), do the following:
2725  - create a new buffer  - create a new buffer
# Line 3040  There are the following basic functions Line 3041  There are the following basic functions
3041     `ps-time-stamp-mon-dd-yyyy'          Return date as \"Jun 18 2001\".     `ps-time-stamp-mon-dd-yyyy'          Return date as \"Jun 18 2001\".
3042    
3043  You can also create your own time stamp function by using `format-time-string'  You can also create your own time stamp function by using `format-time-string'
3044  (which see)."  \(which see)."
3045    :type '(repeat (choice :menu-tag "Right Header"    :type '(repeat (choice :menu-tag "Right Header"
3046                           :tag "Right Header"                           :tag "Right Header"
3047                           string symbol))                           string symbol))
# Line 3087  There are the following basic functions Line 3088  There are the following basic functions
3088     `ps-time-stamp-mon-dd-yyyy'          Return date as \"Jun 18 2001\".     `ps-time-stamp-mon-dd-yyyy'          Return date as \"Jun 18 2001\".
3089    
3090  You can also create your own time stamp function by using `format-time-string'  You can also create your own time stamp function by using `format-time-string'
3091  (which see)."  \(which see)."
3092    :version "21.1"    :version "21.1"
3093    :type '(repeat (choice :menu-tag "Right Footer"    :type '(repeat (choice :menu-tag "Right Footer"
3094                           :tag "Right Footer"                           :tag "Right Footer"
# Line 3249  See `ps-begin-cut-regexp' for more infor Line 3250  See `ps-begin-cut-regexp' for more infor
3250  (defun ps-print-buffer (&optional filename)  (defun ps-print-buffer (&optional filename)
3251    "Generate and print a PostScript image of the buffer.    "Generate and print a PostScript image of the buffer.
3252    
3253  Interactively, when you use a prefix argument (C-u), the command prompts the  Interactively, when you use a prefix argument (\\[universal-argument]), the command prompts the
3254  user for a file name, and saves the PostScript image in that file instead of  user for a file name, and saves the PostScript image in that file instead of
3255  sending it to the printer.  sending it to the printer.
3256    
# Line 3336  Use the command `ps-despool' to send the Line 3337  Use the command `ps-despool' to send the
3337  (defun ps-despool (&optional filename)  (defun ps-despool (&optional filename)
3338    "Send the spooled PostScript to the printer.    "Send the spooled PostScript to the printer.
3339    
3340  Interactively, when you use a prefix argument (C-u), the command prompts the  Interactively, when you use a prefix argument (\\[universal-argument]), the command prompts the
3341  user for a file name, and saves the spooled PostScript image in that file  user for a file name, and saves the spooled PostScript image in that file
3342  instead of sending it to the printer.  instead of sending it to the printer.
3343    
# Line 3348  image in a file with that name." Line 3349  image in a file with that name."
3349    
3350  ;;;###autoload  ;;;###autoload
3351  (defun ps-line-lengths ()  (defun ps-line-lengths ()
3352    "Display the correspondence between a line length and a font size, using the    "Display the correspondence between a line length and a font size.
3353  current ps-print setup.  Done using the current ps-print setup.
3354  Try: pr -t file | awk '{printf \"%3d %s\n\", length($0), $0}' | sort -r | head"  Try: pr -t file | awk '{printf \"%3d %s\n\", length($0), $0}' | sort -r | head"
3355    (interactive)    (interactive)
3356    (ps-line-lengths-internal))    (ps-line-lengths-internal))
# Line 3729  It can be retrieved with `(ps-get ALIST- Line 3730  It can be retrieved with `(ps-get ALIST-
3730    
3731    
3732  (defun ps-prologue-file (filenumber)  (defun ps-prologue-file (filenumber)
3733    "If prologue FILENUMBER exists and is readable, returns contents as string.    "If prologue FILENUMBER exists and is readable, return contents as string.
3734    
3735  Note: No major/minor-mode is activated and no local variables are evaluated for  Note: No major/minor-mode is activated and no local variables are evaluated for
3736        FILENUMBER, but proper EOL-conversion and character interpretation is        FILENUMBER, but proper EOL-conversion and character interpretation is
# Line 3845  This is in units of points (1/72 inch)." Line 3846  This is in units of points (1/72 inch)."
3846  (defvar ps-black-white-faces-alist nil  (defvar ps-black-white-faces-alist nil
3847    "Alist of symbolic faces used for black/white PostScript printers.    "Alist of symbolic faces used for black/white PostScript printers.
3848  An element of this list has the same form as `ps-print-face-extension-alist'  An element of this list has the same form as `ps-print-face-extension-alist'
3849  (which see).  \(which see).
3850    
3851  Don't change this list directly; instead,  Don't change this list directly; instead,
3852  use `ps-extend-face' and `ps-extend-face-list'.  use `ps-extend-face' and `ps-extend-face-list'.
# Line 4140  which long lines wrap around." Line 4141  which long lines wrap around."
4141    (get font-sym 'avg-char-width))    (get font-sym 'avg-char-width))
4142    
4143  (defun ps-line-lengths-internal ()  (defun ps-line-lengths-internal ()
4144    "Display the correspondence between a line length and a font size,    "Display the correspondence between a line length and a font size.
4145  using the current ps-print setup.  Done using the current ps-print setup.
4146  Try: pr -t file | awk '{printf \"%3d %s\n\", length($0), $0}' | sort -r | head"  Try: pr -t file | awk '{printf \"%3d %s\n\", length($0), $0}' | sort -r | head"
4147    (let* ((ps-font-size-internal    (let* ((ps-font-size-internal
4148            (or ps-font-size-internal            (or ps-font-size-internal

Legend:
Removed from v.1.128  
changed lines
  Added in v.1.129

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26