;; Maintainer: Kenichi Handa <handa@etl.go.jp> (multi-byte characters)
;; Maintainer: Vinicius Jose Latorre <vinicius@cpqd.com.br>
;; Keywords: wp, print, PostScript
-;; Time-stamp: <2000/03/21 00:02:42 vinicius>
-;; Version: 5.1.1
+;; Time-stamp: <2000/03/22 09:12:07 vinicius>
+;; Version: 5.1.2
-(defconst ps-print-version "5.1.1"
- "ps-print.el, v 5.1.1 <2000/03/21 vinicius>
+(defconst ps-print-version "5.1.2"
+ "ps-print.el, v 5.1.2 <2000/03/22 vinicius>
Vinicius's last change version -- this file may have been edited as part of
Emacs without changes to the version number. When reporting bugs,
(ps-output "\n%%EndProcSet\n\n")
- (ps-output-boolean "SkipFirstPage " ps-banner-page-when-duplexing)
(ps-output-boolean "LandscapeMode "
(or ps-landscape-mode
(eq (ps-n-up-landscape n-up) 'pag)))
"\n\n"
ps-print-duplex-feature
"\n%%EndFeature\n")))
- (ps-output "\n/Lines 0 def\n/PageCount 0 def\n\nBeginDoc\n%%EndSetup\n"))
+ (ps-output "\n/Lines 0 def\n/PageCount 0 def\n\nBeginDoc\n%%EndSetup\n")
+ (and ps-banner-page-when-duplexing
+ (ps-output "\n%%Page: 0 0\nsave showpage restore\n")))
(defun ps-insert-string (prologue)
(defmacro ps-page-number ()
`(1+ (/ (1- ps-page-count) ps-number-of-columns)))
-(defun ps-end-file ()
+(defun ps-end-file (needs-begin-file)
(ps-flush-output)
;; Back to the PS output buffer to set the last page n-up printing
(save-excursion
(ps-dummy-page))
;; Set end of PostScript file
(ps-output "EndSheet\n\n%%Trailer\n%%Pages: "
- (format "%d" ps-page-order)
+ (format "%d"
+ (if (and needs-begin-file ps-banner-page-when-duplexing)
+ (1+ ps-page-order)
+ ps-page-order))
"\n\nEndDoc\n\n%%EOF\n"))
(funcall genfunc from to)
(ps-end-page)
- (ps-end-file)
+ (ps-end-file needs-begin-file)
(ps-end-job)
;; Setting this variable tells the unwind form that the