I have a wireless HP 6988 printer. I have tried windows emacs and
emacs via my cygwin terminal with the same response. Documents can be
printed via windows notepad and gVim but I would rather not do it that
way.
I use both vista and xp machines and get the same issue.
Is there some setting I need to make?
Thanks..Dave
That does not necessarily help. See
http://www.emacswiki.org/emacs/PrintingFromEmacs
http://www.emacswiki.org/emacs/PrintWithWebBrowser
But does not necessarily fail, either. No need to discourage a fellow
Emacs users before they even tried.
Well Setting up printing in windows from emacs can be an adventure
The settings that I have are these:
(require 'printing)
(setq printer-name "//network/path/to/printer")
(setq ps-printer-name t)
(setenv "GS_LIB" "D:/Program Files/gs/gs8.63/lib")
(setq ps-lpr-command "D:/Program Files/gs/gs8.63/bin/gswin32c.exe")
(setq ps-lpr-switches '( "-dNOPAUSE" "-dBATCH" "-sDEVICE=mswinpr2"))
and it seems to work (remember to modify your gs paths and network (or
otherwise) printer paths suitably)
The stuff associated with the require 'printing was completely
confusing to me and this worked only when I gave up on that. But this
(at least the ps-(B/W printing) only works with that included
These are all described in the Emacs manual, AFAICS, except perhaps
the setenv part. Is it really needed?
I don't know why you needed `(require 'printing)', I don't see how it
could be necessary.
I did not try to discourage. As you know there is a very simple
solution: Use the web browser for printing. For details see the page
on EmacsWiki I pointed to.
It's certainly much easier to get something out of Emacs and down in
black and white (color too) using printing through the browser rather
than through ghost-script. Virtually every w32 user has a browser but
very many don't have ghost-script installed. I think that I once had the
latter method working since I have lines similar to rustom's commented
out in my .emacs. To get printing through Firefox all I had to do was
download:
hfyview.el
htmlfontify.el
These are in my emacs/lisp directory but they could probably go in
emacs/emacs-lisp instead, where the other piece of the puzzle,
easymenu.el resides.
Then add to .emacs:
(require 'hfyview)
After restarting (or maybe just rereading .emacs) a new item appears in
the File menu:
Quick Printing (Using Web Browser)
Ed
Yes, that setup is right. If you use nXhtml it does that for you.
Otherwise you can find the latest hfyfview.el and htmlfontify.el in
the nXhtml repository. (Or, at the moment it is not the latest
htmlfontify.el, I forgot to add that. Will add it.)
If your printer supports PostScript, you don't need Ghostscript.
You also need to be able to set the printer in PostScript mode by
default. This is not always possible.
Thanks for all the good suggestions and different ways to attack the
issue. I will be trying them out over the weekend. I have downloaded
and installed all the ghostscript etc files but the web browser
method seems attractive as it seem simple. It would probably also work
on both a Windows (XP and Vista) as well as my Ubunto netbook.
One other question. When you need to set the value of "printer name"
where does one find the "printer name" in windows XP. Is it the name
given to the printer in the Windows XP printer control panel or the
Port Name in the printers Advanced properties menu.
Regards..Dave
Not necessarily. The node "Windows Printing" in the Emacs manual
gives advice on how to find out this name.
That's got to be fairly rare, because I have yet to see such a
situation.
I think your memory is failing you. You and I have had a long
discussion over this on Emacs Devel. You gave me varying instructions
that you thought would help. I know they would not, but to convince
you I followed the instructions.
And they did not work in this particular case.
Not in this case. I said _I_ have yet to see such a situation. I
remember you telling me about your case, but that's you. I myself
have never encountered such a printer, in my 30+ years of experience
in several large organizations.
I'm not saying these situations do not exist, I'm saying that they are
rare. Why can't you accept that?
I thought you said you had not heard of any such case, sorry. I for
sure know you have not seen them where you are. Maybe that is a good
indication that they are rare, but I actually doubt that. You know
that better than me, maybe you have been working on very many
different places.
> I have been using emacs for about a month and really like it. It
> wasn't till today that I tried to print something. I see this
> message but nothig i sever printed: Spooling with options (page
> headers are not supported)...done.
I Am Not A Programmer. I have gotten so consistently frustrated
trying to make lpr-buffer, lpr-region, tex-buffer, & tex-print work
that I have resorted to the following workarounds:
(defun lprl (r/b)
"Print all or part of buffer with TeX literal mode."
(interactive "cr(egion) or b(uffer)?")
(save-window-excursion
(let ((passage (if (equal r/b ?r)
(buffer-substring (region-beginning) (region-end))
(buffer-substring (point-min) (point-max)))))
(find-file "/usr/own/f/hdwe/printer/hp/Lpr-scratch.tex")
(delete-region (point-min) (point-max))
(insert-file "~/tex/Tex-literal-hdr")
(goto-char (point-max))
(insert passage)
(goto-char (point-max))
(insert-file "~/tex/Tex-literal-ftr")
(untabify (point-min) (point-max))
(goto-char (point-min))
(replace-regexp "\e.\\|\C-r" "")
(save-buffer)
(shell-command "latex /usr/own/f/hdwe/printer/hp/Lpr-scratch.tex") ;Doesn't understand tilde
(shell-command "dvips -f /usr/own/f/hdwe/printer/hp/Lpr-scratch.dvi | gsprint - color - ")
)))
----------------------------------------------------------------------
Tex-literal-hdr:
\documentclass[12pt]{article}
\pagestyle{empty}
\setlength{\oddsidemargin}{-.25in}
\setlength{\topmargin}{-.75in}
\setlength{\textheight}{9.5in}
\setlength{\textwidth}{7in}
----------------------------------------------------------------------
Tex-literal-ftr:
\end{verbatim}
\end{document}
----------------------------------------------------------------------
\begin{document}
\setlength{\baselineskip}{.1667in}
\noindent
\begin{verbatim}
(defun lprt ()
"Print the TeX file in the current buffer."
(interactive)
(save-window-excursion
(let ((file (buffer-string)))
(find-file "~/hdwe/printer/hp/Lpr-scratch.tex")
(delete-region (point-min) (point-max))
(insert file))
(save-buffer)
(shell-command "latex /usr/own/f/hdwe/printer/hp/Lpr-scratch.tex") ;Doesn't understand tilde
(shell-command "dvips -f /usr/own/f/hdwe/printer/hp/Lpr-scratch.dvi | gsprint - color - ")
))
--
--- Joe Fineman jo...@verizon.net
||: First you go to hell, then your body rots, and then you die. :||
Strange!
Yesterday I commented out the require line and the postscript print
buffer(B+W) stopped working
Today its again working with the line commented out.
As for the GS_LIB -- got it from http://www.emacswiki.org/cgi-bin/wiki/PrintingFromEmacs
but yes its also probably not needed (so much for the content of the
wiki :-)
Well I gave it a try but I must be missing something as a new Item
does not appear in the emacs File menu and no printing occurs.
Here is my .emacs file:
(require 'hfyview)
;;Org-mode settings
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-font-lock-mode 1)
This is the version of emacs I am using now.
This is GNU Emacs 23.0.91.1 (i386-mingw-nt5.1.2600)
of 2009-02-26 on LENNART-69DE564 (patched)
I will keep investigating this. I like the org application in Emacs
too but occasionally need to print.
Thanks..dave
See the beginning of the file hfyview.el.
(require 'hfyview)
(require 'easymenu)
(require 'htmlfontify)
;;Org-mode settings
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-ca" 'org-agenda)
(global-font-lock-mode 1)
========================================
This is from my hfyview.el . With the hfyview-quick-print-in-files-
menu t
line thought this would add the menu items but no luck so far.
I have the hffview.el file in my lisp folder under EmacsW32 diretory.
My .emacs file is in the EmacsW32 directoty.
From hfyview.el
===============================================================
(defcustom hfyview-quick-print-in-files-menu t)
"Add Quick print entries to File menu if non-nil.
If you set this to nil you have to restart Emacs to get rid of
the Quick Print entry."
:type 'boolean
:set (lambda (sym val)
(set-default sym val)
(if val
(hfyview-add-to-files-menu)))
:group 'hfy-view)
(defvar hfyview-print-visible t
"Non-nil means show Quick Print entry on the file menu.")
===============================================================
Maybe my emacs file is not being read on startup..still investigating
that.
Regards.. Dave