Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 401
  • Last Modified:

Postscript Printer won't print

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
brucekey
Asked:
brucekey
  • 5
  • 4
  • 4
1 Solution
 
nicademusCommented:
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
 
brucekeyAuthor Commented:
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
 
nicademusCommented:
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
A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

 
jlmsCommented:
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
 
brucekeyAuthor Commented:
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
 
nicademusCommented:
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
 
nicademusCommented:
Sorry, thougth you were talking to me jlms, not thinking today....
0
 
jlmsCommented:
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
 
brucekeyAuthor Commented:
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
 
jlmsCommented:
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
 
brucekeyAuthor Commented:
Sorry, try again, replaced all spaces with tab, no change, same behavior...
0
 
brucekeyAuthor Commented:
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
 
jlmsCommented:
Great! Good that you got your problem solved!
Regards.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 5
  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now