We help IT Professionals succeed at work.

Postscript Printer won't print

brucekey asked
Medium Priority
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!)
Watch Question

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.


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.
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...

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?


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:\
#!        :if=/usr/local/bin/magicfilter:\
ps|ps|Postscript printer entry:\

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)
Sorry, thougth you were talking to me jlms, not thinking today....

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).


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.

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.


Sorry, try again, replaced all spaces with tab, no change, same behavior...


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
Great! Good that you got your problem solved!

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.