comparison lisp/ps-print.el @ 22093:5818374d88e7

(ps-file-end): Put Trailer and Pages before EndDoc. (ps-print-control-characters): Doc fix.
author Richard M. Stallman <rms@gnu.org>
date Sat, 16 May 1998 03:49:47 +0000
parents 35efe9eafc6c
children e1921cd8a532
comparison
equal deleted inserted replaced
22092:3ce96ca84d68 22093:5818374d88e7
5 ;; Author: Jim Thompson (was <thompson@wg2.waii.com>) 5 ;; Author: Jim Thompson (was <thompson@wg2.waii.com>)
6 ;; Author: Jacques Duthen <duthen@cegelec-red.fr> 6 ;; Author: Jacques Duthen <duthen@cegelec-red.fr>
7 ;; Author: Vinicius Jose Latorre <vinicius@cpqd.com.br> 7 ;; Author: Vinicius Jose Latorre <vinicius@cpqd.com.br>
8 ;; Maintainer: Vinicius Jose Latorre <vinicius@cpqd.com.br> 8 ;; Maintainer: Vinicius Jose Latorre <vinicius@cpqd.com.br>
9 ;; Keywords: print, PostScript 9 ;; Keywords: print, PostScript
10 ;; Time-stamp: <98/05/05 12:36:30 vinicius> 10 ;; Time-stamp: <98/05/15 21:15:06 vinicius>
11 ;; Version: 3.06.1 11 ;; Version: 3.06.1
12 12
13 (defconst ps-print-version "3.06.1" 13 (defconst ps-print-version "3.06.1"
14 "ps-print.el, v 3.06.1 <98/05/05 vinicius> 14 "ps-print.el, v 3.06.1 <98/05/15 vinicius>
15 15
16 Vinicius's last change version -- this file may have been edited as part of 16 Vinicius's last change version -- this file may have been edited as part of
17 Emacs without changes to the version number. When reporting bugs, 17 Emacs without changes to the version number. When reporting bugs,
18 please also report the version of Emacs, if any, that ps-print was 18 please also report the version of Emacs, if any, that ps-print was
19 distributed with. 19 distributed with.
837 ;; (his code was severely modified, but the main idea was kept). 837 ;; (his code was severely modified, but the main idea was kept).
838 ;; 838 ;;
839 ;; Thanks to some suggestions on: 839 ;; Thanks to some suggestions on:
840 ;; * Face color map: Marco Melgazzi <marco@techie.com> 840 ;; * Face color map: Marco Melgazzi <marco@techie.com>
841 ;; * XEmacs compatibility: William J. Henney <will@astrosmo.unam.mx> 841 ;; * XEmacs compatibility: William J. Henney <will@astrosmo.unam.mx>
842 ;; * Check ps-paper-type: Sudhakar Frederick <sfrederi@asc.corp.mot.com> 842 ;; * Check `ps-paper-type': Sudhakar Frederick <sfrederi@asc.corp.mot.com>
843 ;; 843 ;;
844 ;; Thanks to Jacques Duthen <duthen@cegelec-red.fr> (Jack) for the 3.4 version 844 ;; Thanks to Jacques Duthen <duthen@cegelec-red.fr> (Jack) for the 3.4 version
845 ;; I started from. [vinicius] 845 ;; I started from. [vinicius]
846 ;; 846 ;;
847 ;; Thanks to Jim Thompson <?@?> for the 2.8 version I started from. 847 ;; Thanks to Jim Thompson <?@?> for the 2.8 version I started from.
993 :group 'ps-print) 993 :group 'ps-print)
994 994
995 (defcustom ps-print-control-characters 'control-8-bit 995 (defcustom ps-print-control-characters 'control-8-bit
996 "*Specifies the printable form for control and 8-bit characters. 996 "*Specifies the printable form for control and 8-bit characters.
997 That is, instead of sending, for example, a ^D (\004) to printer, 997 That is, instead of sending, for example, a ^D (\004) to printer,
998 it is sent the string \"^D\". 998 you can send ^ and D.
999 999
1000 Valid values are: 1000 Valid values are:
1001 1001
1002 `8-bit' This is the value to use when you want an ascii encoding of 1002 `8-bit' This is the value to use when you want an ASCII encoding of
1003 any control or non-ascii character. Control characters are 1003 any control or non-ASCII character. Control characters are
1004 encoded as \"^D\", and non-ascii characters have an 1004 encoded as \"^D\", and non-ascii characters have an
1005 octal encoding. 1005 octal encoding.
1006 1006
1007 `control-8-bit' This is the value to use when you want an ascii encoding of 1007 `control-8-bit' This is the value to use when you want an ASCII encoding of
1008 any control character, whether it is 7 or 8-bit. 1008 any control character, whether it is 7 or 8-bit.
1009 European 8-bits accented characters are printed according 1009 European 8-bits accented characters are printed according
1010 the current font. 1010 the current font.
1011 1011
1012 `control' Only ascii control characters have an ascii encoding. 1012 `control' Only ascii control characters have an ASCII encoding.
1013 European 8-bits accented characters are printed according 1013 European 8-bits accented characters are printed according
1014 the current font. 1014 the current font.
1015 1015
1016 nil No ascii encoding. Any character is printed according the 1016 nil No ASCII encoding. Any character is printed according the
1017 current font. 1017 current font.
1018 1018
1019 Any other value is treated as nil." 1019 Any other value is treated as nil."
1020 :type '(choice (const 8-bit) (const control-8-bit) 1020 :type '(choice (const 8-bit) (const control-8-bit)
1021 (const control) (const nil)) 1021 (const control) (const nil))
3337 3337
3338 (defmacro ps-page-number () 3338 (defmacro ps-page-number ()
3339 `(1+ (/ (1- ps-page-count) ps-number-of-columns))) 3339 `(1+ (/ (1- ps-page-count) ps-number-of-columns)))
3340 3340
3341 (defun ps-end-file () 3341 (defun ps-end-file ()
3342 (ps-output "\nEndDoc\n\n%%Trailer\n%%Pages: " 3342 (ps-output "\n%%Trailer\n%%Pages: "
3343 (format "%d" (ps-page-number)) 3343 (format "%d" (ps-page-number))
3344 "\n%%EOF\n")) 3344 "\n\nEndDoc\n\n%%EOF\n"))
3345 3345
3346 3346
3347 (defun ps-next-page () 3347 (defun ps-next-page ()
3348 (ps-end-page) 3348 (ps-end-page)
3349 (ps-flush-output) 3349 (ps-flush-output)