From owner-ntemacs-users@trout  Sat Apr  5 00:16:20 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Sat" " 5" "April" "1997" "09:46:01" "+0200" "Frederic Corne" "frederic.corne@erli.fr" nil "19" "Re: 2-up printing solution found" "^From:" nil nil "4" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with SMTP id AAA01289 for <voelker@june.cs.washington.edu>; Sat, 5 Apr 1997 00:16:20 -0800
Received: from trout.cs.washington.edu (trout.cs.washington.edu [128.95.1.178]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id AAA31309 for <voelker@joker.cs.washington.edu>; Sat, 5 Apr 1997 00:16:18 -0800
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by trout.cs.washington.edu (8.8.5+CS/7.2ws+) with ESMTP id XAA23452 for <ntemacs-users@trout.cs.washington.edu>; Fri, 4 Apr 1997 23:48:57 -0800 (PST)
Received: from polaris.gsi.fr (polaris.gsi.fr [150.175.128.2]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with ESMTP id XAA00185 for <ntemacs-users@cs.washington.edu>; Fri, 4 Apr 1997 23:48:55 -0800
Received: from erli.fr ([150.175.65.76]) by polaris.gsi.fr (8.7.3/8.6.12) with SMTP id JAA18141; Sat, 5 Apr 1997 09:49:33 +0200 (MET DST)
Received: from orme.sunserv by erli.fr (4.1/SMI-4.1) 	id AA06079; Sat, 5 Apr 97 09:46:04 +0200
Received: by orme.sunserv (5.x/SMI-SVR4) 	id AA21538; Sat, 5 Apr 1997 09:46:01 +0200
Message-Id: <9704050746.AA21538@orme.sunserv>
In-Reply-To: <01BC411F.29CFB100@CODEWARRIOR> (message from Tim Sherrill on 	Fri, 4 Apr 1997 17:39:32 -0000)
Reply-To: frederic.corne@erli.fr
From: Frederic Corne <frederic.corne@erli.fr>
To: sherritp@sagian.com
Cc: ntemacs-users@cs.washington.edu
Subject: Re: 2-up printing solution found
Date: Sat, 5 Apr 1997 09:46:01 +0200



> From: Tim Sherrill <sherritp@sagian.com>
> 
> I initially posted the question regarding 2-up printing in NTEmacs.
> 

If I have well inderstood yours needs, you want to print text on 2 pages ?

Personaly, I use a perl script a2ps.pl (from Jeffrey Friedl
(jfriedl@omron.co.jp)) which works fine on both unix and nt.



FC

-- 

****  Frederic CORNE  ERLI  frederic.corne@erli.fr ****

From owner-ntemacs-users@trout  Fri Apr  4 15:28:40 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Fri" " 4" "April" "1997" "17:39:32" "-0000" "Tim Sherrill" "sherritp@sagian.com" nil "18" "2-up printing solution found" "^From:" nil nil "4" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with SMTP id PAA06287 for <voelker@june.cs.washington.edu>; Fri, 4 Apr 1997 15:28:40 -0800
Received: from trout.cs.washington.edu (trout.cs.washington.edu [128.95.1.178]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id PAA31589 for <voelker@joker.cs.washington.edu>; Fri, 4 Apr 1997 15:28:39 -0800
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by trout.cs.washington.edu (8.8.5+CS/7.2ws+) with ESMTP id OAA17897 for <ntemacs-users@trout.cs.washington.edu>; Fri, 4 Apr 1997 14:41:12 -0800 (PST)
Received: from knoggin.sagian.com (sagian.com [198.70.37.168]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with ESMTP id OAA03361 for <ntemacs-users@cs.washington.edu>; Fri, 4 Apr 1997 14:41:10 -0800
Received: from CODEWARRIOR (codewarrior [192.168.1.1]) by knoggin.sagian.com (8.7.4/8.7.3) with SMTP id RAA15777 for <ntemacs-users@cs.washington.edu>; Fri, 4 Apr 1997 17:44:27 -0500
Received: by CODEWARRIOR with Microsoft Mail 	id <01BC411F.29CFB100@CODEWARRIOR>; Fri, 4 Apr 1997 17:39:36 -0000
Message-ID: <01BC411F.29CFB100@CODEWARRIOR>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
From: Tim Sherrill <sherritp@sagian.com>
To: "ntemacs-users@cs.washington.edu" <ntemacs-users@cs.washington.edu>
Subject: 2-up printing solution found
Date: Fri, 4 Apr 1997 17:39:32 -0000

I initially posted the question regarding 2-up printing in NTEmacs.

I found psutils (and enscript, but psnup works better for what I'm =
trying to do) and compiled them.  A couple of lines need to be added to =
any existing emacs print code (print.el) and psnup.exe is needed.  Go to =

http://www.rose-hulman.edu/~mgrtps/emacs/2-up.html
for instructions and the code I used.  If you can't browse the web, send =
me some email, and I'll wrap everything up for you and send it off (I'd =
post it here, but there's a small executable and I don't want to use =
bandwidth needlessly).

The code on that page is enough to get you printing, as long as you have =
either a postscript printer or ghostscript (as is assumed).

Tim Sherrill
sherritp@sagian.com


From owner-ntemacs-users@trout  Thu Apr  3 13:29:43 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Thu" " 3" "April" "1997" "12:56:34" "-0800" "Jim Davidson" "jdavidso@teknowledge.com" nil "7" "Re: 2-up printing" "^From:" nil nil "4" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with SMTP id NAA02905 for <voelker@june.cs.washington.edu>; Thu, 3 Apr 1997 13:29:42 -0800
Received: from trout.cs.washington.edu (trout.cs.washington.edu [128.95.1.178]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id NAA27687 for <voelker@joker.cs.washington.edu>; Thu, 3 Apr 1997 13:29:41 -0800
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by trout.cs.washington.edu (8.8.5+CS/7.2ws+) with ESMTP id MAA26536 for <ntemacs-users@trout.cs.washington.edu>; Thu, 3 Apr 1997 12:56:37 -0800 (PST)
Received: from argon.Teknowledge.COM (argon.Teknowledge.COM [128.136.240.8]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with ESMTP id MAA29625 for <ntemacs-users@cs.washington.edu>; Thu, 3 Apr 1997 12:56:36 -0800
Received: from COBALT (cobalt.Teknowledge.COM [128.136.10.168]) by argon.Teknowledge.COM (8.7.1/8.7.1) with SMTP id MAA02450 for <ntemacs-users@cs.washington.edu>; Thu, 3 Apr 1997 12:56:34 -0800 (PST)
Message-Id: <199704032056.MAA02450@argon.Teknowledge.COM>
From: Jim Davidson <jdavidso@Teknowledge.COM>
To: ntemacs-users@cs.washington.edu
Subject: Re: 2-up printing
Date: Thu, 3 Apr 1997 12:56:34 -0800 (PST)

> I read the archives, emacs and ntemacs faqs, and ps-print.el file and it =
> looks like the only solution is enscript. Where can I find enscript for =
> NT?

Check out Gnu Enscript, http://www.hut.fi/~mtr/genscript/

-Jim

From owner-ntemacs-users@trout  Thu Apr 10 11:26:23 1997
X-VM-v5-Data: ([nil nil nil t nil nil nil nil nil]
	[nil "Thu" "10" "April" "1997" "13:50:21" "-0400" "Brian Gorka" "gorkab@sanchez.com" nil "212" "YANTPS (yet another NT printing solution)" "^From:" nil nil "4" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with SMTP id LAA12413 for <voelker@june.cs.washington.edu>; Thu, 10 Apr 1997 11:26:23 -0700
Received: from trout.cs.washington.edu (trout.cs.washington.edu [128.95.1.178]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id LAA32328 for <voelker@joker.cs.washington.edu>; Thu, 10 Apr 1997 11:26:21 -0700
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by trout.cs.washington.edu (8.8.5+CS/7.2ws+) with ESMTP id KAA16012 for <ntemacs-users@trout.cs.washington.edu>; Thu, 10 Apr 1997 10:49:52 -0700 (PDT)
Received: from net.sanchez.com (net.sanchez.com [206.7.38.252]) by june.cs.washington.edu (8.8.5+CS/7.2ju) with ESMTP id KAA08111; Thu, 10 Apr 1997 10:49:43 -0700
Received: from oz.sanchez.com ([140.140.1.251]) by net.sanchez.com           (post.office MTA v2.0 0813 ID# 0-0U10) with SMTP id AAA277;           Thu, 10 Apr 1997 13:44:08 -0400
Received: by oz.sanchez.com with SMTP (Microsoft Exchange Server Internet Mail Connector Version 4.0.995.52) 	id <01BC45B6.23681780@oz.sanchez.com>; Thu, 10 Apr 1997 13:50:23 -0400
Message-ID: <c=US%a=_%p=Sanchez_Computer%l=OZ-970410175021Z-175@oz.sanchez.com>
X-Mailer:  Microsoft Exchange Server Internet Mail Connector Version 4.0.995.52
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
From: gorkab@sanchez.com (Brian Gorka)
To: "'ntemacs-users@cs.washington.edu'" <ntemacs-users@cs.washington.edu>
Cc: "'voelker@cs.washington.edu'" <voelker@cs.washington.edu>
Subject: YANTPS (yet another NT printing solution)
Date: Thu, 10 Apr 1997 13:50:21 -0400

This one seems to have been missed by the FAQ.  I didn't write it, but I
added the 2up (or Nup) support that print.el has.  It's pretty easy to
modify, so I might add Ghostscript and Adobe Acrobat Distiller as
options after finals.  It works with local or network printers too.  It
requires cmd.exe to be in your path (for 95 users, i think you need the
cmd32 from Perl 5 for Win32)

;;; print-NT.el --- Special printing fonctions for Windows NT
;;
;; Author: Frederic Corne <frederic.corne@erli.fr> 
;; Created: jul 1996
;; Version: 1.0  1996/10/02 
;; Keywords: print, PostScript
;;
;;; Commentary:
;; 
;;  This file is based on the example of Pascal Obry (in the ntemacs
FAQ).
;;
;;  This file overwrites the items of the Tools menu, so it must be
loaded 
;;  before any use of the menu.
;;
;;  It alows to print with faces or not.
;;
;; USAGE: Byte-compile this file, and add the following line to your
;;  emacs initialization file (.emacs/_emacs) according to the type 
;;  of printer command (print or lpr):
;; 
;;  if you use print.exe command (The UNC style location for regular
print jobs):
;;  Remember to escape the backslashes(use '\\\\' for each '\\') for
emacs.
;;  
;;  (setq lpr-command "print"
;;       lpr-destination '("/D:\\\\host\\share-name") ;; for normal
printer
;;  	 ps-lpr-destination '("/D:\\\\host\\share-name") ;; for postscript
printer
;;  
;;  (setq  ps-paper-type 'ps-a4 ) ; the type of paper (if needed)
;;  
;;  (load "print-NT"() t)
;;  
;;  
;;  
;;  if you use lpr.exe command, add :
;;  
;;  (setq lpr-command "lpr"
;;     lpr-destination '("-S host -P share-name")  ;; for normal printer
;;     ps-lpr-destination '("-S host -P share-name")) ;; for postscript
printer
;;  			
;;  (setq  ps-paper-type 'ps-a4 ) ; the type of paper (if needed)
;;  
;;  (load "print-NT"() t)
;;  
;;
;;  You can also change the temporary buffers values ps-lpr-buffer and
txt-lpr-buffer
;;;;;  
;;;;; Change log:
;;
;; Revision 1.0  1996/10/02 fcorne
;; Initial revision
;;
;; Credit for suggestions, patches and bug-fixes:
;; David J. Fiande <davidf@mks.com>
;; Brad Sileo <brad@GeoData-GIS.com> 
;;;;; 
;;;;; Change log:
;;
;; Revision 1.1  1997/4/10 gorkab
;; Initial revision
;;
;; Brian Gorka <gorkab@sanchez.com>
;; 
;; Added nt-ps-2up-print-buffer
;;
;; With psnup.exe you can print multiple pages per sheet...
;;
;; (defvar ps-psnup-command "psnup")
;; (defvar ps-psnup-switches '(" -l -2 -m.25in "))
;; (defvar ps-psnup-buffer "c:\\tmp\\psnup.ps")

;;; Code:

(defvar  lpr-destination    '("-S host -P share-name"))
(defvar  ps-lpr-destination '("-S host -P share-name"))

(defvar ps-lpr-buffer "c:\\tmp\\psspool.ps")
(defvar txt-lpr-buffer "c:\\tmp\\psspool.txt")

(defvar ps-psnup-command "psnup")
(defvar ps-psnup-switches '(" -l -2 -m.25in "))
(defvar ps-psnup-buffer "c:\\tmp\\psnup.ps")

;;;;;;; print simple
(defun print-lpr-buffer ()
  (let ((shell-file-name "cmd.exe")	; switch back to cmd.exe temporarily
	(win32-quote-process-args nil)
	(shell-command-switch "/c"))
    (shell-command
     (apply 'concat (append (list lpr-command "
")														lpr-destination (list " " txt-lpr-buffer)))))
  (delete-file txt-lpr-buffer)
  )
(defun nt-print-buffer ()
  (interactive)
  (write-region (point-min) (point-max) txt-lpr-buffer)
  (print-lpr-buffer )
  )
(defun nt-print-region ()
  (interactive)
  (write-region (point) (mark) txt-lpr-buffer)
  (print-lpr-buffer )
  )

(define-key menu-bar-tools-menu [print-region]
  '("Print Region" . nt-print-region))

(define-key menu-bar-tools-menu [print-buffer]
  '("Print Buffer" . nt-print-buffer))

(define-key menu-bar-tools-menu [2up-print-buffer]
  '("2up Print Buffer" . nt-ps-2up-print-buffer))

;;;;;;; ps-print 

(require 'ps-print)

(defun ps-print-lpr-buffer ()
  (let ((shell-file-name "cmd.exe")	; switch back to cmd.exe temporarily
	(win32-quote-process-args nil)
	(shell-command-switch "/c"))
    (shell-command
     (apply 'concat (append (list ps-lpr-command " ")
			    ps-lpr-destination
			    (list " " ps-lpr-buffer)))))
  (delete-file  ps-lpr-buffer)
  )

(defvar ps-print-use-faces nil
  "*Non-nil means alway print with faces.")

(defun toggle-use-face ()
  (interactive)
  (if ps-print-use-faces 
      (progn (setq ps-print-use-faces nil)
	     (message "ps-print-use-faces disabled"))
    (setq ps-print-use-faces t)
    (message "ps-print-use-faces enabled"))
  )

(define-key menu-bar-tools-menu [toggle-use-face]
  '("Toggle on/off print-with-faces" . toggle-use-face))

(defun nt-ps-print-buffer ()
  (interactive)
  (if ps-print-use-faces 
      (ps-print-buffer-with-faces ps-lpr-buffer)
    (ps-print-buffer ps-lpr-buffer)
    )
  (ps-print-lpr-buffer)
  )

(define-key menu-bar-tools-menu [ps-print-buffer]
  '("Postscript Print Buffer" . nt-ps-print-buffer))
(define-key global-map "\C-cp" 'nt-ps-print-buffer)


(defun nt-ps-print-region ()
  (interactive)
  (if ps-print-use-faces 
      (ps-print-region-with-faces (point) (mark) ps-lpr-buffer)
    (ps-print-region (point) (mark) ps-lpr-buffer)
    )
  (ps-print-lpr-buffer)
  )

(define-key menu-bar-tools-menu [ps-print-region]
  '("Postscript Print Region" . nt-ps-print-region))
(define-key global-map "\C-crp" 'nt-ps-print-region)


(defun nt-ps-2up-print-buffer ()
  (interactive)
  (ps-print-buffer-with-faces ps-lpr-buffer)
  (let ((shell-file-name "cmd.exe")	; switch back to cmd.exe temporarily
	(win32-quote-process-args nil)
	(shell-command-switch "/c"))
    (shell-command
     (apply 'concat (append (list ps-psnup-command " ")
			    ps-psnup-switches
			    (list " " ps-lpr-buffer)
			    (list " " ps-psnup-buffer)
			    )))

    (delete-file  ps-lpr-buffer)

    (shell-command
     (apply 'concat (append (list ps-lpr-command " ")
			    ps-lpr-destination
			    (list " " ps-psnup-buffer)))))

  (delete-file  ps-psnup-buffer)
  )

(define-key global-map "\C-c2p" 'nt-ps-2up-print-buffer)

----------
This message has been made with only the finest ASCII characters.

From owner-ntemacs-users@cs.washington.edu  Thu Nov 20 16:39:48 1997
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	[nil "Thu" "20" "November" "1997" "15:46:49" "-0800" "David J. Lowe" "dave_lowe@hp.com" nil "24" "More printing without postscript" "^From:" nil nil "11" nil nil nil nil]
	nil)
Received: from joker.cs.washington.edu (joker.cs.washington.edu [128.95.1.42]) by june.cs.washington.edu (8.8.7+CS/7.2ju) with SMTP id QAA07854 for <voelker@june.cs.washington.edu>; Thu, 20 Nov 1997 16:14:32 -0800
Received: from trout.cs.washington.edu (trout.cs.washington.edu [128.95.1.178]) by joker.cs.washington.edu (8.6.12/7.2ws+) with ESMTP id QAA34321 for <voelker@joker.cs.washington.edu>; Thu, 20 Nov 1997 16:14:31 -0800
Received: (majordom@localhost) by trout.cs.washington.edu (8.8.5+CS/7.2ws+) id PAA24529 for ntemacs-users-outgoing; Thu, 20 Nov 1997 15:47:01 -0800 (PST)
Received: from june.cs.washington.edu (june.cs.washington.edu [128.95.1.4]) by trout.cs.washington.edu (8.8.5+CS/7.2ws+) with ESMTP id PAA24525 for <ntemacs-users@trout.cs.washington.edu>; Thu, 20 Nov 1997 15:46:59 -0800 (PST)
Received: from palrel1.hp.com (palrel1.hp.com [156.153.255.235]) by june.cs.washington.edu (8.8.7+CS/7.2ju) with ESMTP id PAA05072 for <ntemacs-users@cs.washington.edu>; Thu, 20 Nov 1997 15:46:58 -0800
Received: from hpvcldl.vcd.hp.com (hpvcldl.vcd.hp.com [15.36.122.25]) 	by palrel1.hp.com (8.8.6/8.8.5tis) with ESMTP id PAA28110 	for <ntemacs-users@cs.washington.edu>; Thu, 20 Nov 1997 15:46:53 -0800 (PST)
Received: from vcsdlowe3.vcd.hp.com by hpvcldl.vcd.hp.com with SMTP 	(1.37.109.16/15.5+ECS 3.3) id AA209329611; Thu, 20 Nov 1997 15:46:51 -0800
Received: by vcsdlowe3.vcd.hp.com with Microsoft Mail 	id <01BCF5CB.847222D0@vcsdlowe3.vcd.hp.com>; Thu, 20 Nov 1997 15:46:50 -0800
Message-Id: <01BCF5CB.847222D0@vcsdlowe3.vcd.hp.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Precedence: bulk
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by june.cs.washington.edu id QAA07854
From: David J Lowe <dave_lowe@hp.com>
Sender: owner-ntemacs-users@cs.washington.edu
To: "Ntemacs (E-mail)" <ntemacs-users@cs.washington.edu>
Subject: More printing without postscript
Date: Thu, 20 Nov 1997 15:46:49 -0800

I found a freeware program that lets me do 2-up printing without postscript. The program is PrintFile and can be found at http://hem1.passagen.se/ptlerup.

I use these additions to my .emacs to interface the program with the lpr package.

;;(require 'lpr)
(defvar lpr-spool-file "c:\\temp\\lprspool.txt"
  "*Name of temporary file for spooling print images.")
(setq lpr-switches '(" /q"))
(setq lpr-headers-switches "/n:Emacs")
(setq lpr-command "C:\\davel\\bin\\PrFile32.exe")
(setq lpr-add-switches nil)
;;(setq lpr-command "C:\\WINNT\\system32\\print.exe")
(defun nt-print-region-function
  (start end program delete buffer display &rest switches)
  (write-region start end lpr-spool-file)
  (shell-command
   (apply 'concat (append (list program " ")
                          switches
                          (list " " lpr-spool-file)))))
(setq print-region-function 'nt-print-region-function)

You do need a non-nil value for lpr-header-switches that is compatible with the command line options of PrintFile. A non-nil lpr-headers-switches keeps lpr from calling the lpr-page-header-program. PrintFile provides its own headers. I set lpr-headers-switches to "/n:Emacs". This selects a PrintFile configuration named "Emacs". You will need to run PrintFile and create your own settings  configuration name "Emacs" if you retain this value for lpr-headers-switches.

Dave Lowe

