aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Innes1998-11-09 15:05:23 +0000
committerAndrew Innes1998-11-09 15:05:23 +0000
commitf8c707612e1428cd9336430fc4b1cda2231efd36 (patch)
tree5edebe75b3a56c21552816c9e16fae43b908819b
parent1dca54f61ea181bbcab4d75dc2599a28ba0d4024 (diff)
downloademacs-f8c707612e1428cd9336430fc4b1cda2231efd36.tar.gz
emacs-f8c707612e1428cd9336430fc4b1cda2231efd36.zip
(ps-print-prologue-1): In BeginDoc procedure, call setpagedevice to
specify the page size if setpagedevice is available. This is necessary to select the correct paper tray on Level 2 printers with multiple paper sizes available. (ps-begin-file): Cope with font names that contain spaces, and call BeginDoc in a BeginSetup/EndSetup block.
-rw-r--r--lisp/ps-print.el17
1 files changed, 12 insertions, 5 deletions
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index 905de385d70..69041c2f6a1 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -2367,6 +2367,14 @@ StandardEncoding 46 82 getinterval aload pop
2367 /SpaceWidth /f0 findfont setfont ( ) stringwidth pop def 2367 /SpaceWidth /f0 findfont setfont ( ) stringwidth pop def
2368 % ---- save the state of the document (useful for ghostscript!) 2368 % ---- save the state of the document (useful for ghostscript!)
2369 /docState save def 2369 /docState save def
2370 % ---- [andrewi] set PageSize based on chosen dimensions
2371 /setpagedevice where {
2372 pop
2373 1 dict dup
2374 /PageSize [ PrintPageWidth LeftMargin RightMargin add add
2375 LandscapePageHeight ] put
2376 setpagedevice
2377 } if
2370 % ---- [jack] Kludge: my ghostscript window is 21x27.7 instead of 21x29.7 2378 % ---- [jack] Kludge: my ghostscript window is 21x27.7 instead of 21x29.7
2371 /JackGhostscript where { 2379 /JackGhostscript where {
2372 pop 1 27.7 29.7 div scale 2380 pop 1 27.7 29.7 div scale
@@ -4528,10 +4536,10 @@ page-height == bm + print-height + tm - ho - hh
4528 (ps-output "} def\n/printLocalBackground {\n} def\n") 4536 (ps-output "} def\n/printLocalBackground {\n} def\n")
4529 4537
4530 ;; Header fonts 4538 ;; Header fonts
4531 (ps-output (format "/h0 %s /%s DefFont\n" ; /h0 14 /Helvetica-Bold DefFont 4539 (ps-output (format "/h0 %s (%s) cvn DefFont\n" ; /h0 14 /Helvetica-Bold DefFont
4532 ps-header-title-font-size (ps-font 'ps-font-for-header 4540 ps-header-title-font-size (ps-font 'ps-font-for-header
4533 'bold)) 4541 'bold))
4534 (format "/h1 %s /%s DefFont\n" ; /h1 12 /Helvetica DefFont 4542 (format "/h1 %s (%s) cvn DefFont\n" ; /h1 12 /Helvetica DefFont
4535 ps-header-font-size (ps-font 'ps-font-for-header 4543 ps-header-font-size (ps-font 'ps-font-for-header
4536 'normal))) 4544 'normal)))
4537 4545
@@ -4541,7 +4549,7 @@ page-height == bm + print-height + tm - ho - hh
4541 (let ((font (ps-font-alist 'ps-font-for-text)) 4549 (let ((font (ps-font-alist 'ps-font-for-text))
4542 (i 0)) 4550 (i 0))
4543 (while font 4551 (while font
4544 (ps-output (format "/f%d %s /%s DefFont\n" 4552 (ps-output (format "/f%d %s (%s) cvn DefFont\n"
4545 i 4553 i
4546 ps-font-size 4554 ps-font-size
4547 (ps-font 'ps-font-for-text (car (car font))))) 4555 (ps-font 'ps-font-for-text (car (car font)))))
@@ -4554,8 +4562,7 @@ page-height == bm + print-height + tm - ho - hh
4554 4562
4555 (ps-mule-initialize) 4563 (ps-mule-initialize)
4556 4564
4557 (ps-output "\nBeginDoc\n\n" 4565 (ps-output "%%EndPrologue\n%%BeginSetup\nBeginDoc\n%%EndSetup\n\n")))
4558 "%%EndPrologue\n"))
4559 4566
4560(defun ps-header-dirpart () 4567(defun ps-header-dirpart ()
4561 (let ((fname (buffer-file-name))) 4568 (let ((fname (buffer-file-name)))