all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Cannot print with emacs
@ 2011-07-21 12:28 Harald Weis
  2011-07-22  6:26 ` Rasmus
  2011-07-22 10:08 ` Peter Dyballa
  0 siblings, 2 replies; 13+ messages in thread
From: Harald Weis @ 2011-07-21 12:28 UTC (permalink / raw)
  To: help-gnu-emacs

Hi All,

I can't find out why printing with emacs does not work for me.
CUPS is installed on my FreeBSD (actually 8.2-RELEASE) and is working
since ages. lpr-cups, xpdf, evince, gv are all printing fine on the
Lexmark T520 (Duplex Black&White Laser Printer) connected to the LAN.

The printing package is customized as follows:

;; To use the Printing package:
;;
(require 'printing)
(pr-update-menus)
(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(lpr-command "/usr/local/bin/lpr")
 '(pr-gs-switches (quote ("-q -dNOPAUSE -I/usr/local/share/ghostscript/9.02")))
 '(pr-print-using-ghostscript nil)
 '(pr-ps-printer-alist (quote ((default "/usr/local/bin/lpr" nil "-P" "lexpol"))))
 '(ps-lpr-command "/usr/local/bin/lpr")
 '(ps-paper-type (quote a4))
 '(ps-print-color-p nil))
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 )

Whether pr-print-using-ghostscript is nil or t, makes no difference.

pr-gs-device is set to "uniprint" without my intervention.
Running "gs -h" shows that gs does not seem to know the
Lexmark T520 printer.

The printing operation generates always Postscript files which
block the printer with the "900 Service RIP Software" error.
Printing <the said Postscript file> under gv outside emacs
produces the same error - probably not surprising.

What am I doing wrong ?

Thank you in advance for any help.
Harald Weis



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Cannot print with emacs
  2011-07-21 12:28 Cannot print with emacs Harald Weis
@ 2011-07-22  6:26 ` Rasmus
  2011-07-24 19:48   ` Harald Weis
  2011-07-22 10:08 ` Peter Dyballa
  1 sibling, 1 reply; 13+ messages in thread
From: Rasmus @ 2011-07-22  6:26 UTC (permalink / raw)
  To: help-gnu-emacs

Hi, 

> The printing operation generates always Postscript files which
> block the printer with the "900 Service RIP Software" error.
> Printing <the said Postscript file> under gv outside emacs
> produces the same error - probably not surprising.

I had a similar problem with my IBM printer (which is a Lexmark). I
from CUPS-generic-postscript to CUPS-generic-lpd and everything was
joy. It's also over LAN in my case. 

On my system Emacs prints to whatever printer is set to standard
according to lpoptions (on Linux).

Cheers,
Rasmus

-- 
Sent from my Emacs




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Cannot print with emacs
  2011-07-21 12:28 Cannot print with emacs Harald Weis
  2011-07-22  6:26 ` Rasmus
@ 2011-07-22 10:08 ` Peter Dyballa
  2011-07-26 14:01   ` Harald Weis
  1 sibling, 1 reply; 13+ messages in thread
From: Peter Dyballa @ 2011-07-22 10:08 UTC (permalink / raw)
  To: Harald Weis; +Cc: help-gnu-emacs


Am 21.07.2011 um 14:28 schrieb Harald Weis:

> What am I doing wrong ?

I think your setup is a bit too complicated, but I'm also no FreeBSD (just Mac OS X, a remote relative) and a PostScript printer user.


Assume you've set up your printing subsystem correctly. Then a default printer is set and it's able to process a few different input formats and send it as PostScript code to the printer – if it's a PS printer. OTOH, GNU Emacs can produce PostScript output directly – see its File menu!

Since GNU Emacs 21 or 22 I am relying on GNU Emacs' built-in knowledge of UNIX printing. So I am setting only variables to beautify the produced PS output, like:

	 '(ps-bottom-margin 36)
	 '(ps-error-handler-message (quote system))
	 '(ps-footer-font-family (quote Palatino))
	 '(ps-header-font-family (quote ZapfChancery-MediumItalic))
	 '(ps-inter-column 25)
	 '(ps-left-margin 36)
	 '(ps-line-number-color "green")
	 '(ps-line-number-font "Courier-Bold")
	 '(ps-paper-type (quote a4))
	 '(ps-print-control-characters nil)
	 '(ps-print-footer t)
	 '(ps-right-margin 27)
	 '(ps-top-margin 28)
	 '(ps-warn-paper-type nil)

Maybe printing works for you as well out-of-the-box... (provided the printing subsystem is set up correctly)

--
Mit friedvollen Grüßen

  Pete

Schön zu können, wenn man muss. 	– Always Ultra




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Cannot print with emacs
  2011-07-22  6:26 ` Rasmus
@ 2011-07-24 19:48   ` Harald Weis
  2011-07-31 21:54     ` Rasmus
  0 siblings, 1 reply; 13+ messages in thread
From: Harald Weis @ 2011-07-24 19:48 UTC (permalink / raw)
  To: help-gnu-emacs

On Fri, Jul 22, 2011 at 08:26:13AM +0200, Rasmus wrote:
> Hi, 
> 
> > The printing operation generates always Postscript files which
> > block the printer with the "900 Service RIP Software" error.
> > Printing <the said Postscript file> under gv outside emacs
> > produces the same error - probably not surprising.
> 
> I had a similar problem with my IBM printer (which is a Lexmark). I
> from CUPS-generic-postscript to CUPS-generic-lpd and everything was
> joy. It's also over LAN in my case. 

How did you do that?

I've installed cups-lpd (and also xinitd) and now I realize that I
can't even see how it could work with cups-lpd if the LPD client
is on the same machine.
What do you mean by CUPS-generic-lpd ?
Can you please explain? I am lost.

Cheers,
Harald



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Cannot print with emacs
  2011-07-22 10:08 ` Peter Dyballa
@ 2011-07-26 14:01   ` Harald Weis
  0 siblings, 0 replies; 13+ messages in thread
From: Harald Weis @ 2011-07-26 14:01 UTC (permalink / raw)
  To: help-gnu-emacs

On Fri, Jul 22, 2011 at 12:08:41PM +0200, Peter Dyballa wrote:
> 
> Am 21.07.2011 um 14:28 schrieb Harald Weis:
> 
> > What am I doing wrong ?
 
> Maybe printing works for you as well out-of-the-box... (provided the printing subsystem is set up correctly)

No, it does not. You must at least tell emacs that it must use
/usr/local/bin/lpr (which is the CUPS lpr) and not /usr/bin/lpr (which
is the LPD lpr).

I have some reason to suspect a bug in my present emacs
because on startup I get a
"GConf Error: Failed to contact configuration server" error.
I've recompiled - before my original post - emacs and gconf.
I hesitate to reinstall _all_ other ports because the emacs printing
package is the only thing which does not work.

In fact, I'm waiting now for Rasmus who will hopefully reply to my
previous post...

Mit besten Grüßen,
Harald



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Cannot print with emacs
  2011-07-24 19:48   ` Harald Weis
@ 2011-07-31 21:54     ` Rasmus
  2011-08-01 21:15       ` Harald Weis
  0 siblings, 1 reply; 13+ messages in thread
From: Rasmus @ 2011-07-31 21:54 UTC (permalink / raw)
  To: help-gnu-emacs

Harald Weis <hawei@free.fr> writes:

>> I had a similar problem with my IBM printer (which is a Lexmark). I
>> from CUPS-generic-postscript to CUPS-generic-lpd and everything was
>> joy. It's also over LAN in my case. 
>
> How did you do that?
>

Sorry for not replying earlier; I didn't see your message until now.

I just edit the driver in Cups. On my system I access Cups via:

  http://localhost:631/printers/

I use the driver "Generic PCL Laser Printer" where I would normally
utilize "Generic PostScript Printer". They are found under the brand
Generic as far as I remember.

I hope it helps

–Rasmus

-- 
Sent from my Emacs




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Cannot print with emacs
  2011-07-31 21:54     ` Rasmus
@ 2011-08-01 21:15       ` Harald Weis
  2011-08-03 14:22         ` Rasmus
  0 siblings, 1 reply; 13+ messages in thread
From: Harald Weis @ 2011-08-01 21:15 UTC (permalink / raw)
  To: help-gnu-emacs

On Sun, Jul 31, 2011 at 11:54:13PM +0200, Rasmus wrote:
 
> I use the driver "Generic PCL Laser Printer" where I would normally
> utilize "Generic PostScript Printer". They are found under the brand
> Generic as far as I remember.

I see. I never used that for my Lexmark T520 Duplex Laser Printer.
I always provide the LEXT520.PPD file which I've downloaded many years
ago from a Lexmark site.

No, something is wrong with my present emacs on several machines.
As I cannot find out I better give up. I suppose it will work the next
time when I reinstall _all_ ports.

Cheers,
Harald




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Cannot print with emacs
  2011-08-01 21:15       ` Harald Weis
@ 2011-08-03 14:22         ` Rasmus
  2011-09-06 21:21           ` Harald Weis
  0 siblings, 1 reply; 13+ messages in thread
From: Rasmus @ 2011-08-03 14:22 UTC (permalink / raw)
  To: help-gnu-emacs

Harald Weis <hawei@free.fr> writes:

> I see. I never used that for my Lexmark T520 Duplex Laser Printer.
> I always provide the LEXT520.PPD file which I've downloaded many years
> ago from a Lexmark site.

I think I have used both a PPD provided by Lexmark and a generic Post
Script driver.

> No, something is wrong with my present emacs on several machines.
> As I cannot find out I better give up. I suppose it will work the next
> time when I reinstall _all_ ports.

Try to start Emacs without loading config files (emacs -q). If the
problem persists it is probably not Emacs-centric but related to your
print server (CUPS). If it persists bisec your config file(s).

—Rasmus

-- 
Sent from my Emacs




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Cannot print with emacs
  2011-08-03 14:22         ` Rasmus
@ 2011-09-06 21:21           ` Harald Weis
  2011-09-06 21:31             ` Rasmus
  0 siblings, 1 reply; 13+ messages in thread
From: Harald Weis @ 2011-09-06 21:21 UTC (permalink / raw)
  To: help-gnu-emacs

On Wed, Aug 03, 2011 at 04:22:34PM +0200, Rasmus wrote:
> Harald Weis <hawei@free.fr> writes:
> 
> > I see. I never used that for my Lexmark T520 Duplex Laser Printer.
> > I always provide the LEXT520.PPD file which I've downloaded many years
> > ago from a Lexmark site.
> 
> I think I have used both a PPD provided by Lexmark and a generic Post
> Script driver.
> 
> > No, something is wrong with my present emacs on several machines.
> > As I cannot find out I better give up. I suppose it will work the next
> > time when I reinstall _all_ ports.
> 
> Try to start Emacs without loading config files (emacs -q). If the
> problem persists it is probably not Emacs-centric but related to your
> print server (CUPS). If it persists bisec your config file(s).

Sorry, Rasmus, for this long pause.
I was sort of far away from keyboard for a while.

The command `M-x print-buffer' (which I never used before, I must
apologize) does work fine with or without the config file.
In a sense, Peter's out-of-the-box remark is correct provided that lpr
is symlinked to /usr/local/bin/lpr.
That means that the CUPS print server is alright.

It's the Printing package (2 lines in .emacs without any customization)
which does not work.
It produces a Postscript file and puts the printer in a "900 Service
RIP Software" error state (the printer must be restarted).  
Running ``lpr <the said Postscript file>'' has exactly the same effect.
The bug seems to be in the generated Postscript file.
Please note that the Postscript Preview is perfect!

Needless to say that the printer does work fine after restart which is
easily checked with the command ``a2ps foo.txt | lpr''.

Cheers,
Harald



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Cannot print with emacs
  2011-09-06 21:21           ` Harald Weis
@ 2011-09-06 21:31             ` Rasmus
  2011-09-08  9:16               ` Harald Weis
  0 siblings, 1 reply; 13+ messages in thread
From: Rasmus @ 2011-09-06 21:31 UTC (permalink / raw)
  To: help-gnu-emacs

Harald Weis <hawei@free.fr> writes:

> On Wed, Aug 03, 2011 at 04:22:34PM +0200, Rasmus wrote:
>> Harald Weis <hawei@free.fr> writes:
>> 
>> > I see. I never used that for my Lexmark T520 Duplex Laser Printer.
>> > I always provide the LEXT520.PPD file which I've downloaded many years
>> > ago from a Lexmark site.
>> 
>> I think I have used both a PPD provided by Lexmark and a generic Post
>> Script driver.
>> 
>> > No, something is wrong with my present emacs on several machines.
>> > As I cannot find out I better give up. I suppose it will work the next
>> > time when I reinstall _all_ ports.
>> 
>> Try to start Emacs without loading config files (emacs -q). If the
>> problem persists it is probably not Emacs-centric but related to your
>> print server (CUPS). If it persists bisec your config file(s).
>
> Sorry, Rasmus, for this long pause.
> I was sort of far away from keyboard for a while.
>
> The command `M-x print-buffer' (which I never used before, I must
> apologize) does work fine with or without the config file.
> In a sense, Peter's out-of-the-box remark is correct provided that lpr
> is symlinked to /usr/local/bin/lpr.
> That means that the CUPS print server is alright.
>
> It's the Printing package (2 lines in .emacs without any customization)
> which does not work.
> It produces a Postscript file and puts the printer in a "900 Service
> RIP Software" error state (the printer must be restarted).  
> Running ``lpr <the said Postscript file>'' has exactly the same effect.
> The bug seems to be in the generated Postscript file.
> Please note that the Postscript Preview is perfect!

I have always relied on CUPS and I don't know the cli programs all too
well. 

However, I experienced a similar problem, as I may or may not have
stated earlier. This was a PS error as well, although in my case the
printer just printed a page with an error message.

The way I solved it was by switching driver in CUPS. Maybe there is
something fishy about PS support in Lexmark printers? I honestly lack a
truely exhausting answer. 

I hope you'll get it working. 
 
–Rasmus

PS: A temporary solution would be to set cups-pdf as default printer
(e.g. lpoptions -d cups_pdf) and print the pdf manually.

-- 
Sent from my Emacs




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Cannot print with emacs
  2011-09-06 21:31             ` Rasmus
@ 2011-09-08  9:16               ` Harald Weis
  2011-09-08 10:45                 ` Rasmus
  0 siblings, 1 reply; 13+ messages in thread
From: Harald Weis @ 2011-09-08  9:16 UTC (permalink / raw)
  To: help-gnu-emacs

On Tue, Sep 06, 2011 at 11:31:35PM +0200, Rasmus wrote:
 
> I have always relied on CUPS and I don't know the cli programs all too
> well. 
> 
> However, I experienced a similar problem, as I may or may not have
> stated earlier. This was a PS error as well, although in my case the
> printer just printed a page with an error message.
> 
> The way I solved it was by switching driver in CUPS. Maybe there is
> something fishy about PS support in Lexmark printers? I honestly lack a
> truely exhausting answer. 
> 
> I hope you'll get it working. 
  
I will wait and see the next time I reinstall all ports. I still suspect
that the problem could be related with the error message I get on
starting emacs (as I mentioned previously), but I don't know how to
deal with it except reinstalling the lot.
 
> PS: A temporary solution would be to set cups-pdf as default printer
> (e.g. lpoptions -d cups_pdf) and print the pdf manually.
 
How do you define that cups_pdf printer ?

Bye,
Harald



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Cannot print with emacs
  2011-09-08  9:16               ` Harald Weis
@ 2011-09-08 10:45                 ` Rasmus
  2011-09-09 12:54                   ` Harald Weis
  0 siblings, 1 reply; 13+ messages in thread
From: Rasmus @ 2011-09-08 10:45 UTC (permalink / raw)
  To: help-gnu-emacs


Hi,

> How do you define that cups_pdf printer ?

In my distribution it's a separate package

#+begin_example
 $ pacman -Qi cups-pdf 
Name           : cups-pdf
Version        : 2.5.1-1
URL            : http://cip.physik.uni-wuerzburg.de/~vrbehr/cups-pdf
Licenses       : GPL2
Groups         : None
Provides       : None
Depends On     : cups  ghostscript
Optional Deps  : None
Required By    : None
Conflicts With : None
Replaces       : None
Installed Size :  60,00 K
Packager       : Andreas Radke <andyrtr@archlinux.org>
Architecture   : x86_64
Build Date     : 2011-04-30T00:21:15 CEST
Install Date   : 2011-04-30T11:10:07 CEST
Install Reason : Explicitly installed
Install Script : Yes
Description    : PDF printer for cups
#+end_example

Once installed you can install a new printer in the cups web interface
(localhost:631 on my system). 
This new printer can be set as default.  Pdfs are saved in /var/spool/cups-pdf/$USER

–Rasmus

-- 
Sent from my Emacs




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Cannot print with emacs
  2011-09-08 10:45                 ` Rasmus
@ 2011-09-09 12:54                   ` Harald Weis
  0 siblings, 0 replies; 13+ messages in thread
From: Harald Weis @ 2011-09-09 12:54 UTC (permalink / raw)
  To: help-gnu-emacs

On Thu, Sep 08, 2011 at 12:45:25PM +0200, Rasmus wrote:
 
> > How do you define that cups_pdf printer ?
> 
> In my distribution it's a separate package
 
It's in my ports tree as well.
Sorry for my stupid question.
I have even failed to produce my otherwise natural Google-reflex:
the first hit for "freebsd cups-pdf" is a good one.

Thanks again, Rasmus, for your help.
Cheers,
Harald



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-09-09 12:54 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-21 12:28 Cannot print with emacs Harald Weis
2011-07-22  6:26 ` Rasmus
2011-07-24 19:48   ` Harald Weis
2011-07-31 21:54     ` Rasmus
2011-08-01 21:15       ` Harald Weis
2011-08-03 14:22         ` Rasmus
2011-09-06 21:21           ` Harald Weis
2011-09-06 21:31             ` Rasmus
2011-09-08  9:16               ` Harald Weis
2011-09-08 10:45                 ` Rasmus
2011-09-09 12:54                   ` Harald Weis
2011-07-22 10:08 ` Peter Dyballa
2011-07-26 14:01   ` Harald Weis

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.