Skip to Content.
Sympa Menu

baslinux - Re: [BL] Re: Printing from Abiword in BL2

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: Sindi Keesan <keesan AT iamjlamb.com>
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: [BL] Re: Printing from Abiword in BL2
  • Date: Wed, 31 Dec 2003 14:56:03 -0500 (EST)

I installed xpdf and it works nicely to display, scroll, change pages, and
magnify to '5', which is enough to make a scanned page converted to pdf
into something that is full-screen-width and (in theory) can be printed
but it will do nothing witout a mouse. I used the pdf2ps part of it to
convert my pdf file to ps so I could try to print it as suggested below.

Console mode gs displays pdf files much faster but they are too small to
be legible. Unlike my DOS version of gs386, it was not compiled with the
option of displaying tvga (trident) or tseng or atiw or even svga so I had
to use plain vgalib. This would not be a problem if I could also print.
ghostscript will display pdf or ps files. xpdf won't display ps files.

So I tried to print the ps file with lpr. lpr filename.ps

First, I ran wp to install the printer modules.

I made deskjet.filter and added the suggested lines to /etc/printcap.

I loaded lpd and practiced a few times unloading it.
kill 'pidof lp' gave me 'No such pid pidof lpd'
I did pidof and noted the number and then kill 1234 (if 1234 were the
number) and then pidof again and there was now nothing listed.
I typed lpd again to install lpd.

Then I typed lpr filename.ps and nothing happened and then lpq and the
file was in the queue. Jim then noticed that he had forgotten to plug the
printer cable into the computer. He plugged it in.

I typed lpr filename.ps again and the printer fed a sheet of paper through
it. (This is the same thing that had been happening when I was trying to
print a DOS file with lpr in text mode, without lpd. See below.) Nothing
was left in the queue with lpq.

>
> > Make a /var/spool/lpd/postscript directory. In that directory,
> > you put your filter script (in a file called deskjet.filter).
> > The filter will look something like this:
> > ' -------------------------------------------------
> > ' #!/bin/sh
> > ' /usr/bin/gs -q -dSAFER -sDEVICE=deskjet -r180x180
> > ' -sPAPERSIZE=letter -sOutputFile=- -
> > ' -------------------------------------------------


-sOutputFile=- - I typed this exactly, was I supposed to rename
the - - to some file name?

> > All of those parameters should go in one line (I split the
> > line to avoid a random wrap). You may also want to change
> > the resolution (180x180) and the papersize (letter). Also,
> > if you decide to use a different filter, change (deskjet).

Deskjet does 150x150 or 300x300, I think. Epson does 180x180 etc.

I used pico -w to turn off linewrap so I could type it all on one line.

> > Make sure your file script is executable (chmod).

I did chmod +x ghostscript for the file in /var/spool/lpd/

>
> > Now you
> > need to tell /etc/printcap about this filter.
> > -------------------------------------------------------
> > lp|ps|PS|PostScript:sh:mx#0:\
> > :lp=/dev/lp0:\
> > :sd=/var/spool/lpd/postscript:\
> > :if=/var/spool/lpd/postscript/deskjet.filter:\
> > --------------------------------------------------------
> > Make sure there are no # in front of those lines (and all
> > other lines in printcap do have a #).

Do I need to comment out the lines for generic printer?
When I do this, I don't even get a blank page fed through the printer,
which implies that the generic printer definition was being used.
I also don't get anything in the queue (lpq).


I notice that you told us to put deskjet.filter in
/var/spool/lpd/ghostscript

but the printcap line is
:if=/var/spool/lpd/postscript/deskjet.filter

Should we be using a /postscript/ instead of /ghostscript/ directory?
I tried putting deskjet.filter in both of them and neither worked.


> > You should also
> > check that your printer actually comes up as lp0 (when
> > you do all those insmods). If not, change the lp0 to lp1
> > (or whatever comes up).
>
> It is lp0
>

It worked as lp0 with the generic printer setting for text.

Would I need to rewrite printcap whenever I changed printers, or
resolutions?
With DOS ghostscript I can specify these on the command line
instead.

I may just print my pdf files with DOS and view them with xpdf unless
someone has a good idea of what to try next.


What percentage of basiclinux users actually ever succeed in printing
anything besides plain text?

I did chmod +x to printcap as well as to the copies of deskjet.filter in
both /ghostscript/ and /postscript/. I killed lpd and loaded it again. I
am still not even getting a page feed any more.


> Regards,
> Ron
>
Ron did you ever get this working?



Sindi Keesan





Archive powered by MHonArc 2.6.24.

Top of Page