Subject: Re: Printing on windows 95

From: Paul Koning/US/3Com <[email-masked]>
Date: 16 Oct 96 15:02:56 EDT

Returning to a note from last May...  

>From: rbrodersen @ siebel.com (Robert Brodersen) @ UGATE    

>I modified Pascal Obry's NT PS-Print to work on Windows 95.
>I can believe how lousy the print spooler is in Windows 95.
>Avoiding it entirely seems to work fairly well tough.  A better 
>solution sure would be nice.  Perhaps someone knows of
>a port of lpr to Windows 95?

>; W95 PS-Print works by writing a file and then copying the file to the printer
>; If you use a network printer, you need to setup a capture port (using the
>; details tab of the printer properties dialog)
>; ##################################################  W95 PS-Print
>
>(require 'ps-print)
>(setq ps-lpr-command "copy")
>(setq ps-lpr2-switches '("LPT1:"))      ; switches which go after the
>filename
>(setq ps-lpr-buffer "c:\\temp\\psspool.ps")       ; a tmp spool file
>
>(defun w95-ps-print-buffer-with-faces ()
>  (interactive)
>  (ps-print-buffer-with-faces ps-lpr-buffer)
>  (shell-command
>   (apply 'concat (append (list ps-lpr-command " ")
>                          ps-lpr-switches
>                          (list " " ps-lpr-buffer " ")
>                          ps-lpr2-switches)))
>)

I tried setting the spool file name to the printer device name, but
that doesn't work.  What DID work is to set the spool file name to
the UNC name of the printer.  It helps that the printer I want to
use is a network printer; I'm not sure what the UNC name of a local
printer is (or if there even is one).  

Anyway, with that approach things get very simple:

(require 'ps-print)
(setq ps-lpr-buffer "\\\\server\\printer") ; point straight to printer

(defun w95-ps-print-buffer-with-faces ()
  (interactive)
  (ps-print-buffer-with-faces ps-lpr-buffer)
)

Thanks for pointing the way, Bob.

 paul