Subject: printing problem

From: Richard Goldberg <[email-masked]>
Date: Fri, 26 Jan 2001 13:55:27 -0500 (EST)

Hi all,

My papd.conf file is set up as follows:
Colour Test:\
        :pr=test:\
        :op=lp:\
        :pd=/etc/atalk/ppd/lexmark_optrac710.ppd:

When I  try to print someting, I get an error on the mac saying
"Document could not be printed on printer "Printername" because of a
PostScript error". In the log file on my atalkd server I get:

Jan 26 13:31:27 <server> papd[9128]: getppdent: line too long
Jan 26 13:31:27 <server> papd[9128]: lp_init: lock: No such file or directory
Jan 26 13:31:27 <server> papd[9128]: lp_open failed

I thought the "line too long "error was due to the lf/cr issue between mac
and unix but I ran tr "\015" "\012" < orig.ppd > temp.ppd and the
error still comes up.

I know I can fix the other error (lp_init/lp_open) by changing the conf
file to
	:pr=|/usr/bin/lpr -Ptest:\
are there any disadvantages to this?

Are there any other ways to fix this problem?

Why does this problem happen?

Thanks
***************************** **************************************
*Rick Goldberg              * *                                    *
*Graduate Student           * * "I never wanted to be average,     *
*Computer Science Dept      * *   because when you are average you *
*York University            * *   are just as far from the top as  *
*Toronto, Canada            * *   you are from the bottom."        *
[email-masked]             * *              -Stan Cottrell-       *
*www.cs.yorku.ca/~rickg     * *                                    *
***************************** **************************************
     "If you don't invest very much, the defeat doesn't hurt,
             But winning isn't very exciting."

---

From: Carsten Neumann <[email-masked]>
Date: Fri, 26 Jan 2001 23:18:11 +0100

> and unix but I ran tr "\015" "\012" < orig.ppd > temp.ppd and the

Have you tried to setup the printer on your Mac after tr-ing your PPD file?
(and renaming the temp file? ;-))
Just to re-read the ppd file.

> are there any disadvantages to this?

I had similar problems: job was queued but no daemon started.
The error messages were others:
	Jan 11 03:23:19 athlet papd[5733]: lp_conn_unix connect /dev/printer: Connection refused
	Jan 11 03:23:19 athlet papd[5733]: lp_print: lp_conn_unix: Connection refused
Just piping to lpr solved this.
Had no problems until now.

> Why does this problem happen?

Are the spool directory and its files owned by lp?
What is your printcap entry for test?

> Thanks

Regards

	Carsten

---

From: Christian Schmidt <[email-masked]>
Date: Sat, 27 Jan 2001 15:19:33 +0100

>  Jan 26 13:31:27 <server> papd[9128]: lp_open failed

I always got the same message although my printer worked fine.
I got rid of it by transferring the PPD file via ftp as ASCII Text 
onto the server.
=> It was a problem resulting from the different LF/CR handling.

>  and unix but I ran tr "\015" "\012" < orig.ppd > temp.ppd and the

Try ftp-ing it from the mac to the server and choose "ASCII Text" 
transfer mode.

>  are there any disadvantages to this?

No, I don't think so.

hth,
Christian
-- 
Made with a Macintosh...
[email-masked]
http://home.t-online.de/home/chrischmi/

---

From: Richard Goldberg <[email-masked]>
Date: Tue, 30 Jan 2001 09:55:36 -0500 (EST)

> Just to re-read the ppd file.

Yup tried that with the same result.

> What is your printcap entry for test?

Thats a good point. The dirs were owned by daemon not lp, but I changed
the papd.conf file to op=daemon and restarted atalk and I still get the
same errors.

The printcap entry for this printer is:
test|colourlp\
:server\
:rw:sh:sf\
:lp=colorlp.irus.rri.on.ca%9100\
:mx#0\
:lf=/var/spool/lpd/colour/colour-errs\
:sd=/var/spool/lpd/colour\
:af=/var/spool/lpd/colour/test-account\
:la\
:ifhp=model=colour,config=/etc/ifhp.conf\
:if=/usr/local/lib/filters/ifhp\
:of=/usr/local/lib/filters/ofhp

this is actually /etc/printcap.papd (and I give the -p /etc/printcap.papd
to papd when I start it). I need to do it this way since my main
printcap file is in lprng format. This should still work though.

If I change the pr line to pipe to lpr I don't get the lp_conn_unix and
lp_print errors, but I still get the line too long error.

-Rick Goldberg

---

From: Richard Goldberg <[email-masked]>
Date: Tue, 30 Jan 2001 10:05:09 -0500 (EST)

> >  are there any disadvantages to this?

I tried to ftp it in ascii mode with the same result.

-Rick Goldberg

---

From: Carsten Neumann <[email-masked]>
Date: Tue, 30 Jan 2001 23:18:01 +0100

On Tue, 30 Jan 2001, Richard Goldberg wrote:
[snip]
> :of=/usr/local/lib/filters/ofhp

Oops, you omitted tho colons ':' just before each backslash, and after the last entry:

test|colourlp:\
	:server:\
	:rw:sh:sf:\
	:lp=colorlp.irus.rri.on.ca%9100:\
	:mx#0:\
	:lf=/var/spool/lpd/colour/colour-errs:\
	:sd=/var/spool/lpd/colour:\
	:af=/var/spool/lpd/colour/test-account:\
	:la:\
	:ifhp=model=colour,config=/etc/ifhp.conf:\
	:if=/usr/local/lib/filters/ifhp:\
	:of=/usr/local/lib/filters/ofhp:

OK, if you don't indent your printcap entry lines the colons before the escape chars (backslash)
might not be necessary, but that at the end is.

> printcap file is in lprng format. This should still work though.

Probably lprng is more relax regarding the format of the printcap entries, but I just can guess.
I'm using BSD spooling.

> lp_print errors, but I still get the line too long error.

Does your PPD file look sane?
Tr-ing my PPD file and "Auto Setup" the printer (on Mac) solved my problem.

BTW: piping through lpr was the only way to get non-postscript data sent to my printer.
This is a NEC Silentwriter LC 890 and has only PS level 1, laserjet, and diablo emulation.
If I want to print postscript level 2, I need put the printer into laserjet modus use ghostscript,
and send its output via pap directly to my printer. I didn't manage to use psf somehow to send the
data.

Regards

	Carsten

---

From: Richard Goldberg <[email-masked]>
Date: Wed, 31 Jan 2001 09:28:22 -0500 (EST)

> might not be necessary, but that at the end is.

I caught that about 5 minutes after I sent the message. However, I fix
the printcap and still get the same problem.

> Tr-ing my PPD file and "Auto Setup" the printer (on Mac) solved my problem.

The ppd files look fine. What is the max line length that you can have
in a ppd file before atalk starts to complain? There are a few long line
(maybe 125 chars).

Thanks

-Rick

---

From: Carsten Neumann <[email-masked]>
Date: Thu, 1 Feb 2001 02:40:09 +0100

On Wed, 31 Jan 2001, Richard Goldberg wrote:
[snip]
> in a ppd file before atalk starts to complain? There are a few long line

The PPD file for my NEC Silentwriter has max. 84 chars line length.
What does happen if you use another PPD with shorter lines?
Have you tried to break the long lines into shorter ones?

> -Rick

I attached the PPD for my printer to this mail.
This one doesn't lead to an error on my system.

Regards

	Carsten