Solved

Postscript Printer won't print

Posted on 1997-08-31
13
390 Views
Last Modified: 2013-12-15
I have my printcap file set up for 2 devices, 1 a panasonic dot-matrix printer, the other a Fujitsu Postcript printer. The panasonic prints fine, the Fujitsu, when passed a postscript file, responds `processing' for about 30 seconds, then responds `waiting', then after waiting 15 seconds (as setup) goes `idle'.
The spool directory listed in the printcap file, gets the postcript file, and the control file, and they live while the printer is responding 'processing' and get erased as soon as it starts to respond `waiting'. Doing a `ps -ax' while the printer is `processing' shows that I do indeed have 2 lpd processes running.
This printer works fine on a dos/windows machine. And will print the files with the dos command `print filename' that I am trying to print from my linux box. It takes about 3-5 minutes to print these files out on the dos machine, yet my lpd process dies in about 30 seconds...

Anybody have an idea of why this is happening?

P.S. There are no errors showing in my lp-error or /var/log/syslog log files. And I've already checked for errors in my printcap file, (I had the guy that wrote the Printing HOWTO check them also!)
0
Comment
Question by:brucekey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 4
13 Comments
 
LVL 2

Expert Comment

by:nicademus
ID: 1629467
A file which may interest you is aps-xxx.tgz (xxx beign the version number) I'm unsure what it's up to now.
It comes on most Distributions of Linux, just look under the /cdrom/system/Printing directory for a whole of lot of PS printing solutions.
primary site:  ftp://sunsite.unc.edu/pub/Linux/system/Printing
and of course it should be available at mirrors.
Unfortunately you must have filter files/scripts to print Postscript files on Non-postscript and many Postscript printers from linux.  APS and other progs will set these all up for you automatically.  But beware it is hit and miss as to which prog will work with your particular printer.
0
 

Author Comment

by:brucekey
ID: 1629468
The point here is... I have a postscript printer, I don't need a filter....The clue here is.. "the other is a Fujitsu postscript printer" And if you'll note, I said, my other printer is a dot-matrix (non-postscript) and it works just fine...
The file prints just fine when I `cat filename.ps > /dev/lp0', therefore, I don't need to pass through a filter. The problem is the lpd instance spawned to handle the spooling/printing of the file dies about 30 seconds after the file is spooled.
0
 
LVL 2

Expert Comment

by:nicademus
ID: 1629469
I only mentioned this because I have a non-postcript printer and an Apple LaserWriter NTR, so that is definately postscript.  When I had one setup with the printcap I sent a Jpeg to the dot-matrix, it stalled for a while, then formfed 4 pages and no ink on the page at all.  This was using a postscript/jpeg/gif/et al filter.  I had luck using APS with the LaserWriter, I just thought you might also.  Besides any printcap entry discrepencies, I can only suggest at this time that it may be something to do with you Deamon or rc.d init files, maybe in the way it is setup to originally run the lpd, possibly with respawning.  Or even something wrong with your kernel, or the version...sorry I couldn't help.  Keep trying...
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 4

Expert Comment

by:jlms
ID: 1629470
How are both printers connected?
You mention that "cat file.ps > /dev/lp0" works.
/dev/lp0 is your first parallel port..
Where is the dot matrix printer connected?
Can you put your /etc/printcap file here so we can check?
0
 

Author Comment

by:brucekey
ID: 1629471
I'm switching the cables between the two printers, both are not active at the same time...
Here's my printcap file:

lp|Generic dot-matrix printer entry:\
        :lp=/dev/lp0:\
        :sd=/var/spool/lp0/lp:sh:\
#!        :if=/usr/local/bin/magicfilter:\
        :df=/var/spool/lp0/filter.ps:\
        :tf=/var/spool/lp0/filter.ps:\
        :af=/usr/local/bin/epson9c-filter:\
        :lf=/var/spool/lp0/lp-err:
#
ps|ps|Postscript printer entry:\
         :lp=/dev/lp0:\
         :sd=/var/spool/lp0/ps:\
         :mx#0:\
         :lf=/var/spool/lp0/lp-err:
#

0
 
LVL 2

Expert Comment

by:nicademus
ID: 1629472
Sorry no, when I said I sent a Jpeg to the printer, I should have elaborated.  I did    cat image.jpg | lpr

As far as my printcap goes, it is just the default one now, because I am waiting for a fuser lamp to come from Brisbane for my Laswrprinter, and when it went down I initially thought it was the printcap entry because I had made a minor adjusment to that.
So sorry about that.  I just looked, thinking I had the printcap.orig and .old files that APS makes, but I must have deleted them too, I can't stand stale files..
I am getting this part tommorrow morning, Air freight, so I will get my Laser going again and investigate.
Also I actually have the Laser connected via a serial port and the D/matrix via the Parallel, it is on /dev/lp1 under Linux2.0.29 and /dev/lp0 under 2.1.51 , the Laser is /dev/ttyS1 (my COM2)
0
 
LVL 2

Expert Comment

by:nicademus
ID: 1629473
Sorry, thougth you were talking to me jlms, not thinking today....
0
 
LVL 4

Expert Comment

by:jlms
ID: 1629474
After checking brucekey's /etc/printcap file I have this sugestions:
-Include the "sh" boolean option  for the postscript printer description. If Linux sends a banner (that is the default if "sh" is not included) the PS printer could get confused and don't recognize the document as a legitimate PS one.
- In the first line of your PS printer's definition don't repeat the name of the printer (put ps only once).


0
 

Author Comment

by:brucekey
ID: 1629475
Sorry it took so long for me to get to this, I had to try it before I `graded' it. My wife took her printer back, so I had to drag it back over 8-{).
Sorry, but the above suggestions had no effect at all with the problem. I'm beginning to think the problem is in the kernel driver in 2.0.29.
0
 
LVL 4

Expert Comment

by:jlms
ID: 1629476
The blank spaces at the beginning of some lines have to be TAB's, not spaces, check this editing with vi and moving the curso to the beggining of these lines, if it makes a big jump to the first character then there is a TAB, if you have to move serveral times the curso to reach the first character then you have spaces, the later is not correct.

Also check that at the end of the lines there are not strange characters (like spaces or control characters). Tha last character ( \ or :   ) has to be the last character.

  Try using the lpc command to see how many printers your system is recognizing, you can diagnose some weird probles with the printcap file here because you will see "phantom" printers appear or printers repeated several times. this kind of problems point to syntax errors in the printcap file.

  A last, desperate resource is to define a filter with a line that only makes the cat to the port:

cat  - > /dev/lp0

that is something is working.


0
 

Author Comment

by:brucekey
ID: 1629477
Sorry, try again, replaced all spaces with tab, no change, same behavior...
0
 

Author Comment

by:brucekey
ID: 1629478
jlms, give me an answer, any answer, I've got it working, and it (I think) was at least partially from your answer! I replaced spaces with tabs, and that didn't work, I went back later and noticed that the `\' was missing after the /dev/lp0, when I put that back in, it started printing! Like I said give me any answer so I can pass the points to you! Thanks
0
 
LVL 4

Accepted Solution

by:
jlms earned 100 total points
ID: 1629479
Great! Good that you got your problem solved!
Regards.
0

Featured Post

Command Line Tips and Tricks

The command line is a powerful tool at the disposal of every Linux user. Although Linux distros come with beautiful user interfaces, it's worthwhile to learn the command line because it allows you to do a number of things that you otherwise cannot do from the GUI.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question