Commit 9dae638c authored by Vinicius Jose Latorre's avatar Vinicius Jose Latorre
Browse files

ps-print selection page fix

parent 3a1f1d79
2005-06-27 Vinicius Jose Latorre <viniciusjl@ig.com.br>
* ps-print.el: It was not working the page selection for printing.
Reported by Sebastian Tennant <sebyte@smolny.plus.com>.
(ps-print-version): New version 6.6.7.
(ps-end-sheet): New fun.
(ps-header-sheet, ps-end-job): Call it.
2005-06-27 Luc Teirlinck <teirllm@auburn.edu> 2005-06-27 Luc Teirlinck <teirllm@auburn.edu>
   
* subr.el (add-to-list, add-to-ordered-list): Doc fixes. * subr.el (add-to-list, add-to-ordered-list): Doc fixes.
......
...@@ -10,12 +10,12 @@ ...@@ -10,12 +10,12 @@
;; Maintainer: Kenichi Handa <handa@etl.go.jp> (multi-byte characters) ;; Maintainer: Kenichi Handa <handa@etl.go.jp> (multi-byte characters)
;; Vinicius Jose Latorre <viniciusjl@ig.com.br> ;; Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Keywords: wp, print, PostScript ;; Keywords: wp, print, PostScript
;; Time-stamp: <2005/03/19 00:40:12 vinicius> ;; Time-stamp: <2005/06/27 00:57:22 vinicius>
;; Version: 6.6.6 ;; Version: 6.6.7
;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/
(defconst ps-print-version "6.6.6" (defconst ps-print-version "6.6.6"
"ps-print.el, v 6.6.6 <2005/03/19 vinicius> "ps-print.el, v 6.6.7 <2005/06/27 vinicius>
Vinicius's last change version -- this file may have been edited as part of Vinicius's last change version -- this file may have been edited as part of
Emacs without changes to the version number. When reporting bugs, please also Emacs without changes to the version number. When reporting bugs, please also
...@@ -5961,10 +5961,14 @@ XSTART YSTART are the relative position for the first page in a sheet.") ...@@ -5961,10 +5961,14 @@ XSTART YSTART are the relative position for the first page in a sheet.")
(ps-begin-page)) (ps-begin-page))
(defun ps-end-sheet ()
(and ps-print-page-p (> ps-page-sheet 0)
(ps-output "EndSheet\n")))
(defun ps-header-sheet () (defun ps-header-sheet ()
;; Print only when a new sheet begins. ;; Print only when a new sheet begins.
(and ps-print-page-p (> ps-page-sheet 0) (ps-end-sheet)
(ps-output "EndSheet\n"))
(setq ps-page-sheet (1+ ps-page-sheet)) (setq ps-page-sheet (1+ ps-page-sheet))
(when (ps-print-sheet-p) (when (ps-print-sheet-p)
(setq ps-page-order (1+ ps-page-order)) (setq ps-page-order (1+ ps-page-order))
...@@ -6689,8 +6693,7 @@ If FACE is not a valid face name, it is used default face." ...@@ -6689,8 +6693,7 @@ If FACE is not a valid face name, it is used default face."
(defun ps-end-job (needs-begin-file) (defun ps-end-job (needs-begin-file)
(let ((previous-print ps-print-page-p) (let ((ps-print-page-p t))
(ps-print-page-p t))
(ps-flush-output) (ps-flush-output)
(save-excursion (save-excursion
(let ((pages-per-sheet (mod ps-page-printed ps-n-up-printing)) (let ((pages-per-sheet (mod ps-page-printed ps-n-up-printing))
...@@ -6717,8 +6720,7 @@ If FACE is not a valid face name, it is used default face." ...@@ -6717,8 +6720,7 @@ If FACE is not a valid face name, it is used default face."
(number-to-string ps-lines-printed) " BeginPage\n") (number-to-string ps-lines-printed) " BeginPage\n")
(ps-end-page))) (ps-end-page)))
;; Set end of PostScript file ;; Set end of PostScript file
(and previous-print (ps-end-sheet)
(ps-output "EndSheet\n"))
(ps-output "\n%%Trailer\n%%Pages: " (ps-output "\n%%Trailer\n%%Pages: "
(number-to-string (number-to-string
(if (and needs-begin-file (if (and needs-begin-file
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment