[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: network printing on an Win2k network.
From: |
Harald Joerg |
Subject: |
Re: network printing on an Win2k network. |
Date: |
09 Apr 2003 12:07:36 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 |
pjacklam@online.no (Peter J. Acklam) writes:
> I use this on Windows XP and it works perfectly ("HOST" and
> "Printer" must be set appropriately)
>
> (setq-default ps-lpr-command "print")
> (setq-default ps-printer-name "\\\\HOST\\Printer")
> [...]
That's what I had, too, but...
> With Ghostscript installed one can get the usual Windows printer
> dialog thing with
>
> (setq-default ps-lpr-command "gsprint.exe")
> (setq-default ps-printer-name t)
> (setq-default ps-printer-name-option nil)
> (setq ps-lpr-switches '("-query")) ; show printer dialog
I really like this one! Thanks for the hint!
This inspired me to look for a solution for emacs under cygwin. Under
cygwin, emacs appears *not* to create a file which can be fed to
gsprint (Customize claims that it does so under "MS-DOS and MS-Windows
systems"), but to pipe the buffer (or region) to whatever is defined
in ps-lpr-command. I came up with a small shell procedure gsprint.sh:
#!/usr/bin/bash
TMPFILE=`mktemp -t emacs.print.XXXXX` || exit 1
cat >$TMPFILE
/$CYGPATH_TO_gsview/gsprint.exe -query "`cygpath -w $TMPFILE`"
...and set ps-lpr-command to "gsprint.sh".
--
Cheers,
haj