Rolf Sandau wrote:
Hi there,
I do not know, if this is correct goal where to put a response, but it's
just the easiest way to use the file-header, which is
Sorry, I don't maintain anymore ps-print.el
You should send this to... someone else...
Bye.
;;; ps-print.el --- Jim's Pretty-Good PostScript Generator for
XEmacs.
;; Author: Jim Thompson (was <thompson(a)wg2.waii.com>)
;; Author: Jacques Duthen <duthen(a)club-internet.fr>
;; Maintainer: XEmacs Development Team <xemacs-beta(a)xemacs.org>
;; Keywords: hardware
;; Time-stamp: <97/01/29 23:21:25 tjchol01>
;; Version: 3.05x1
I recognized, that printing with 2 columns on landscape A4 didn't work for
me with the current source I'm using.
My settings are:
(let ((pix-cm (/ 72 2.54)) ;; pixel per cm
(pix-inch 72)) ;; pixel per inch
(setq ps-paper-type 'a4 ;; default = 'ps-letter
ps-print-color-p 'nil
ps-landscape-mode t
ps-number-of-columns 2
ps-left-margin (* pix-cm 1.0) ; 1.0 cm
ps-right-margin (* pix-cm 1.0) ; 1.0 cm
ps-inter-column (* pix-cm 1.5) ; 1.5 cm
ps-bottom-margin (* pix-cm 1.0) ; 1.0 cm
ps-top-margin (* pix-cm 1.0) ; 1.0 cm
ps-header-offset (* pix-cm 0.3) ; 0.3 cm
ps-font-size 7 ;; default 8 too big
ps-header-font-size 8
ps-header-title-font-size 8
ps-spool-duplex t
)
(set-default 'ps-header-lines 1)
)
I'm pretty bad in postscript-code, but I found that I can enable this
feature, if I overwrite the defun ps-begin-file with the following version,
which comments out settings at the end of the function (see comments with
RSan), which seems to overwrite ('recorrect') the settings. If there is an
easier way - e.g. configuration - then please let me know.
Patched function:
========================================================================
(defun ps-begin-file ()
(ps-get-page-dimensions)
(setq ps-showpage-count 0)
(ps-output ps-adobe-tag)
(ps-output "%%Title: " (buffer-name) "\n") ;Take job name from name
of
;first buffer printed
(ps-output "%%Creator: " (user-full-name) "\n")
(ps-output "%%CreationDate: "
(time-stamp-hh:mm:ss) " " (time-stamp-mon-dd-yyyy) "\n")
(ps-output "%%Pages: (atend)\n")
(ps-output "%%EndComments\n\n")
(ps-output "%%BeginProlog\n")
(ps-output-boolean "LandscapeMode" ps-landscape-mode)
(ps-output (format "/NumberOfColumns %d def\n" ps-number-of-columns))
(ps-output (format "/PageHeight %s def\n" ps-page-height))
(ps-output (format "/PageWidth %s def\n" ps-page-width))
(ps-output (format "/PrintWidth %s def\n" ps-print-width))
(ps-output (format "/PrintHeight %s def\n" ps-print-height))
(ps-output (format "/LeftMargin %s def\n" ps-left-margin))
(ps-output (format "/RightMargin %s def\n" ps-right-margin)) ; not used
(ps-output (format "/InterColumn %s def\n" ps-inter-column))
(ps-output (format "/BottomMargin %s def\n" ps-bottom-margin))
(ps-output (format "/TopMargin %s def\n" ps-top-margin)) ; not used
(ps-output (format "/HeaderOffset %s def\n" ps-header-offset))
(ps-output (format "/HeaderPad %s def\n" ps-header-pad))
(ps-output-boolean "PrintHeader" ps-print-header)
(ps-output-boolean "PrintHeaderFrame" ps-print-header-frame)
(ps-output-boolean "ShowNofN" ps-show-n-of-n)
(ps-output-boolean "Duplex" ps-spool-duplex)
(ps-output (format "/LineHeight %s def\n" ps-line-height))
(ps-output ps-print-prologue-1)
(ps-output "%%EndProlog\n\n")
(ps-output "%%BeginSetup\n")
;; Header fonts
(ps-output ; /h0 14 /Helvetica-Bold Font
(format "/h0 %s /%s DefFont\n" ps-header-title-font-size
ps-header-title-font))
(ps-output ; /h1 12 /Helvetica Font
(format "/h1 %s /%s DefFont\n" ps-header-font-size
ps-header-font))
(ps-output ps-print-prologue-2)
;; Text fonts
(ps-output (format "/f0 %s /%s DefFont\n" ps-font-size ps-font))
(ps-output (format "/f1 %s /%s DefFont\n" ps-font-size ps-font-bold))
(ps-output (format "/f2 %s /%s DefFont\n" ps-font-size ps-font-italic))
(ps-output (format "/f3 %s /%s DefFont\n" ps-font-size
ps-font-bold-italic))
;;;;;;;;;;;; Begin: comment out following to enable 2 column prints in
landscape mode - 13.12.01/RSan
;; page device info
;; (ps-output (format
;; "
;; %% Pagedevice definitions:
;; languagelevel 1 gt {
;; <<
;; /Duplex %s /PageSize [%s %s]
;; >> setpagedevice\n} if
;; "
;; (if ps-spool-duplex
;; "true"
;; "false")
;; ps-page-width ps-page-height))
;;;;;;;;;;;; End - 13.12.01/RSan
(ps-output "\nBeginDoc\n\n")
(ps-output "%%EndSetup\n")
)
========================================================================
Hope this will help,
best regards
RSan
Mailto:Rolf.Sandau@marconi.com
Phone: +49 (0) 7191/13-4709
Fax: +49 (0) 7191/136-4709
--
[jack]
--
| # # | # # # | # # | # # # | # # | # # # |
| # # | # # # | # # | # # # | # # | # # # |
|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|_|