On Sat, 19 Jun 1999, you wrote:
> Dear Jaroslaw,
>      many thanks for your interest. Actually debian system is new for me, 
> So could you please let me know step by step how can I install my printer 
> to my PC.
> First I have kernel with lpr support installed in my system also I 
> have lpr command what after that?.
> How can I adjustments GhostScript options for StylusColor device)?.
> early reply is better for me
Sorry, I was away few days, so the answer is a bit late.

> with my best regards
> aboanber
> 

Ok, I assume you have the physical installation correct.

1. You have to have kernel with lp support (note that under 2.2.x kernels You
have a bucket of features related with lp: parport, parport_pc, parport_probe
etc, and under 2.2.x typical printer port is /dev/lp0 instead of /dev/lp1 under
2.0.x).

2. You should install the printer daemon and utils package (lpd or recommended
lprng). This will provide the daemon and programs like lpr, lpc ,lpq, lprm.

3. Install gs and gsfonts packages (and gv if You want to have the viewer fo
*.ps files).

4. Install magicfilter and suggested packages (dselect will tell You about
suggested packages). These packages are user in input filters to convert some
formats onto PostScript. Then, You will be allowed to print files of many
formats, like $lpr foo1.ps foo2.pdf foo3.troff

5. Run #magicfilterconfig (#magicfilterconfig --force if it refuses to run
because of already configured printers). This utility will show a brief
example of values and ask You for some settings in loop for each printer:
a) the full printer name ("done" ends the loop).
b) short name (the spool dir will have this name).
c) device path (see the note 1.).
d) than magicfilterconfig prints the so-called input filters to be used -
choose for example stylus_color_360dpi. I will explain the setting below.

If You will follow these instructions, the magicfilterconfig will have filled
the /etc/printcap file with chosen settings and created the spool directory and
some control files inside for each printer. Now look into /etc/printcap. You
will see something like :
#
# Copyright (c) 1983 Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that this notice is preserved and that due credit is given
# to the University of California at Berkeley. The name of the University
# may not be used to endorse or promote products derived from this
# software without specific prior written permission. This software
# is provided ``as is'' without express or implied warranty.
#
#       @(#)etc.printcap        5.2 (Berkeley) 5/5/88
#
# This file was generated by /usr/sbin/magicfilterconfig.
#
sc400-360-mono|Epson SC 400 360 dpi Mono:\
        :lp=/dev/printer:sd=/var/spool/lpd/sc400-360-mono:\
        :sh:pw#80:pl#72:px#1440:mx#0:\
        :if=/etc/magicfilter/stylus_color_360dpi-mono-filter:\
        :af=/var/log/lp-acct:lf=/var/log/lp-errs:
        
sc400-360-color|Epson SC 400 360 dpi Color:\
        :lp=/dev/printer:sd=/var/spool/lpd/sc400-360-color:\
        :sh:pw#80:pl#72:px#1440:mx#0:\
        :if=/etc/magicfilter/stylus_color_360dpi-filter:\
        :af=/var/log/lp-acct:lf=/var/log/lp-errs:
        
sc400-720-color|Epson SC 400 720 dpi Color:\
        :lp=/dev/printer:sd=/var/spool/lpd/sc400-720-color:\
        :sh:pw#80:pl#72:px#1440:mx#0:\
        :if=/etc/magicfilter/stylus_color_720dpi-filter:\
        :af=/var/log/lp-acct:lf=/var/log/lp-errs:

I have 3 entries because I need different settings and this is IMHO the best
way to pass settings to print system (/dev/printer is symlink to /dev/lp0,
beacause I have 2.2.x kernels). Each "virtual" printer (their names are
self-explanatory) maps onto the same physical printer. You can create more than
one entry if You need different print settings and specify the -P printer_name
in lpr command.

So, You can see that the differences between virtual printers are the input
filters. With magicfilter come only basic filters. I have copied
stylus_color_360dpi-filter onto stylus_color_360dpi_mono-filter and
stylus_color_360dpi_mono-filter and made some modifications to each.

Each input filter is the set of converters' invocations like gs or enscript.
Every print job is processed to determine the data type (by using some magic
values - specific file content parts) and then the conversion is applied (one
or multiple stage pass - some formats need temporal another format storage like
temporal files or pipes). The ultimate result is the printer-specific data
stream sent to printer device. Jobs wich cannot be converted are not printed
and the mail with error message is sent back to user.

For Epson printers the ultimate stage is handled by GhostScript with
StylusColor device (ESC/P2 printers are fairly supported - my friends with
other printers' vendors have big problems with configuration of their
printers). Look into /etc/magicfilter/stylus_color_360dpi-filter. You will see
lines like:
# PostScript
0       %!              filter  /usr/bin/gs  -sDEVICE=stcolor 
-sDithering=fscmyk -r360 -q -dMicroweave -dSAFER -dNOPAUSE -dSpotSize='{2.6 2.4 
2.6 2}' -sOutputFile=- - 
0       \004%!          filter  /usr/bin/gs  -sDEVICE=stcolor 
-sDithering=fscmyk -r360 -q -dMicroweave -dSAFER -dNOPAUSE -dSpotSize='{2.6 2.4 
2.6 2}' -sOutputFile=- - 

# PDF
0       %PDF            fpipe   /usr/bin/gs  -sDEVICE=stcolor 
-sDithering=fscmyk -r360 -q -dMicroweave -dSAFER -dNOPAUSE -dSpotSize='{2.6 2.4 
2.6 2}' -sOutputFile=- $FILE 

I have modified it for my best settings - added the dithering option (default
is veeeeeeeeery bad for pixmaps and such like) and the Microweave flag. Detailed
option explanation is in /usr/doc/gs/devices.txt in section Epson Stylus Color.
You can play with options to reach the best results and to fit Your needs like
resolution (option -r1440x720 for example). Probably You want to have the
virtual printer with the best resolution (You mentioned  You have Epson Photo),
so copy the stylus_color_360dpi-filter onto (may say)
stylus_color_photo1440-filter and apply the changes:
# PostScript
0       %!              filter /usr/bin/gs  -sDEVICE=stcolor -sDithering=fscmyk 
-r1440x720 -q -dMicroweave -dSAFER -dNOPAUSE -dSpotSize='{2.6 2.4 2.6 2}' 
-sOutputFile=- -  
0       \004%!          filter /usr/bin/gs  -sDEVICE=stcolor -sDithering=fscmyk 
-r1440x720 -q -dMicroweave -dSAFER -dNOPAUSE -dSpotSize='{2.6 2.4 2.6 2}' 
-sOutputFile=- - 

# PDF
0       %PDF            fpipe  /usr/bin/gs  -sDEVICE=stcolor -sDithering=fscmyk 
-r1440x720 -q -dMicroweave -dSAFER -dNOPAUSE -dSpotSize='{2.6 2.4 2.6 2}' 
-sOutputFile=- $FILE 

You should create the input filter for each virtual printer (I think for mono
and low resolution prints) BEFORE running #magicfilterconfig, then
#magicfilterconfig will show these filters as available.

If You want me to send my filters (or create ones for You), let me know.

NOTE: I don't know how Yor printer will handle the data stream for non-photo
printers like mine. It's not guaranted the results will be OK, but I hope this
will work.

HTH

--
Jaroslaw "Jaros" Berezowski

Reply via email to