Dear Luggers,
My printer queue name is 'LX300' and device is a local printer /dev/lp0. What command should I add in the command line for the open office printer setup? I tried lpr, lp -d LX300, lpr -d LX300 but nothing seems to work. The test page in the OO printer setup simply ejects the page out. The Red Hat printer setup prints the test page properly.
Any help will be most appreciated. I finally figured it out upto this point from googling the net, but this is the last hurdle.
Regards,
Rony.
On Fri, 3 Dec 2004, Rony Bill wrote:
Dear Luggers,
My printer queue name is 'LX300' and device is a local printer /dev/lp0. What command should I add in the command line for the open office printer setup? I tried lpr, lp -d LX300, lpr -d LX300 but nothing seems to work. The test page in the OO printer setup simply ejects the page
This reply is probably late, but I hope it will still be helpful. First of all I am assuming that the printer in question here is a Epson LX 300 Dot Matrix printer. Before I begin I suggest that you go through our lug mail archive, because a few months back I had replied to somebody regarding using Dot Matrix printers under Linux.
Anyway, I'll explain what setup I have done for using Epson LX 300 printer with Linux.
The story in short is to move away from CUPS if you want to use Dot Matrix printers with Linux. You should use LPD printer software like the excellent LPRng. Red Hat till its release 8.0 used to include LPRng, but later version deprecated the software. The reason for this would best be known by their developers. I don't want to offend anybody or start any flame war but seriously Red Hat was probably never developed for Desktops. Try something better. Try SuSE, or better, try Slackware ;-)
The long story starts now. Well here is what you need to do to get your Dot Matrix printer working under Linux. First of all when using Dot Matrix printers, you should use LPD printer software like LPRng. Printing software like CUPS use postscript printing by default (try printing a simple text file with CUPS) where as LPRng prints text files in text mode. For printing files other then text files with LPRng, you need a filter program which tells LPRng to filter the file to be printed and get the desired output. If you are interested you should install a software called apsfilter. This requires you to install ghostscript and gs-fonts. These are mostly available on most of the distros. You can then easily set up your printer using the SETUP script which comes with apsfilter. Setting up a printer to work with LPRng is actually writing a correct /etc/printcap file and using the correct driver file from ghostscript. My current /etc/printcap file looks like this,
lp|eps9mid;r=240x204;q=medium;c=full;p=letter;m=auto:\ :lp=/dev/lp0:\ :if=/etc/apsfilter/basedir/bin/apsfilter:\ :sd=/var/spool/lpd/lp:\ :lf=/var/spool/lpd/lp/log:\ :af=/var/spool/lpd/lp/acct:\ :mx#0:\ :sh:
The only important thing above is the using the "eps9mid" printer driver and "r=240x204" resolution entry. This is included by aps-filter to specify what resolution is used. The output is excellent and you couldn't ask for anything better.
I am currently using Slackware 10.0 for my office computer and all my Invoice printing (using Foxpro with DOSemu), Spreadsheet/Quotations/Letters printing (using OpenOffice), is done on Epson LX300 printer. When I was using Red Hat (the last I used was release 8.0) I was never satisfied with the printing. After I moved to SuSE and later on to Slackware, I am more then happy.
I am sorry for this long mail, but I hope it helps.
Regards, Rajen.
On Wednesday 01 December 2004 10:28 pm, you wrote:
I am sorry for this long mail, but I hope it helps.
i feel like i have died and gone to heaven! this one mail, if publicised, will do more to popularise linux in india than anything else i have seen in the past 4 years. I am going to forward it to all the lists that i am a member of
thanks rajen
kg
On Wed, 2004-12-01 at 22:28, Rajen M. Parekh wrote:
The long story starts now. Well here is what you need to do to get your Dot Matrix printer working under Linux. First of all when using Dot Matrix printers, you should use LPD printer software like LPRng. Printing software like CUPS use postscript printing by default (try printing a simple text file with CUPS) where as LPRng prints text files in text mode. For printing files other then text files with LPRng, you need a filter program which tells LPRng to filter the file to be printed and get the desired output. If you are interested you should install a software called apsfilter. This requires you to install ghostscript and gs-fonts. These are mostly available on most of the distros. You can then easily set up your printer using the SETUP script which comes with apsfilter. Setting up a printer to work with LPRng is actually writing a correct /etc/printcap file and using the correct driver file from ghostscript. My current /etc/printcap file looks like this,
lp|eps9mid;r=240x204;q=medium;c=full;p=letter;m=auto:\ :lp=/dev/lp0:\ :if=/etc/apsfilter/basedir/bin/apsfilter:\ :sd=/var/spool/lpd/lp:\ :lf=/var/spool/lpd/lp/log:\ :af=/var/spool/lpd/lp/acct:\ :mx#0:\ :sh:
The only important thing above is the using the "eps9mid" printer driver and "r=240x204" resolution entry. This is included by aps-filter to specify what resolution is used. The output is excellent and you couldn't ask for anything better.
Dear Rajen,
Sorry for the trouble but could you give me a step by step config method for RHEL-3? I looked up the /etc/printcap file and it has this inside... " This file was automatically generated by cupsd(8) from the # /etc/cups/printers.conf file. All changes to this file # will be lost. LX300:"
I have a2ps instead of apsfilter and it has 2 files for config..../etc/a2ps.cfg and a2ps-site.cfg They both have a long text list of 'how to and what to' but I can't figure it out. I have ghostscript already installed.
I tried your resolution setting in the printer setup driver options and set it to an available choice of 240x72 and one more thing I noticed was that the paper feed was not set to manual, which I did and also checked the option 'Prerender Postscript' and now I can print using the generic printer in OO. The OO printer did have to be setup to accept the command 'lpr -P LX300' in Generic Printer.
I am still unable to print in evolution as it does not show the printers like other programs. It only has 3 choices Create PDF, Generic Postscript and LX300. In LX300 it has only one choice of CUPs as the location, in Generic Postscript it has options file, lpr and custom. lpr does not work, custom was made lpr -P LX300 but still no result and Generic Postscript too does not work. In all the 3 cases it ejects the page and the roller rolls on for a few seconds more.
There is no copy/paste option in opened messages in evolution so I can't transfer the text to another software that will print.
Regards,
Rony.
On Mon, 13 Dec 2004, Rony Bill wrote:
Dear Rajen,
Sorry for the trouble but could you give me a step by step config method for RHEL-3?
The steps are just the same. Install LPRng + apsfilter and you are done. After installing apsfilter run the 'SETUP' script in /usr/share/apsfilter, or wherever you install it. When asked for various options to be set just remember to set 2 options correctly. One is the printer driver which is eps9mid and the second one is the resolution which should be set as 240x204. This resolution thing had me stumped earlier, but after a bit of trial and error I came to this final figure.
I looked up the /etc/printcap file and it has this inside... " This file was automatically generated by cupsd(8) from the # /etc/cups/printers.conf file. All changes to this file # will be lost. LX300:"
This file is generated by CUPS. When you intend to use LPRng, you should stop the CUPS service and start the lpd server (LPRng). Back up this original file, in case you are not satisfied with LPRng, so that you can use it with CUPS later on.
I have a2ps instead of apsfilter and it has 2 files for config..../etc/a2ps.cfg and a2ps-site.cfg They both have a long text list of 'how to and what to' but I can't figure it out. I have ghostscript already installed.
I haven't used a2ps so I am not in a position to comment on it. Maybe it is also similar/better then apsfilter. But I think a search on freshmeat will give you links to apsfilter. The softwar size is also quite small, so you will be easily able to download it. On my Slackware system the following command shows
less /var/log/packages/apsfilter-7.2.5-i386-2
PACKAGE NAME: apsfilter-7.2.5-i386-2 COMPRESSED PACKAGE SIZE: 295 K UNCOMPRESSED PACKAGE SIZE: 1340 K PACKAGE LOCATION: /var/log/mount/slackware/ap/apsfilter-7.2.5-i386-2.tgz PACKAGE DESCRIPTION: apsfilter: apsfilter (printer filter and configuration tool) apsfilter: apsfilter: Apsfilter is a printer input filter. With apsfilter installed and apsfilter: configured, you can print many different file types (like ASCII, apsfilter: PostScript, and DVI, as well as compressed versions of all of these) apsfilter: directly with 'lpr', and apsfilter will automatically handle the apsfilter: conversion process on the fly. What does apsfilter stand for? apsfilter: Apsfilter Prints So Fine, It Leads To Extraordinary Results ;-) apsfilter: apsfilter: To configure apsfilter, run the SETUP program in /usr/share/apsfilter
Another option that Slackware distro has is that of "ifhp". Since I haven't tried that one, I don't have much idea about it.
I am still unable to print in evolution as it does not show the printers like other programs. It only has 3 choices Create PDF, Generic Postscript and LX300. In LX300 it has only one choice of CUPs as the location, in Generic Postscript it has options file, lpr and custom.
Once you will setup apsfilter with LPRng, you will be able to print in evolution using the Generic Postscript option, since it is giving you the lpr option. A simple lpr will print your evolution mail.
I suggest you try out apsfilter and I am sure you will be satisfied.
Regards, Rajen.