Al weer 2 slapen lozen nachten erbij. Ik wil er voor zorgen dat ik vanuit mijn windows bak op mijn linux bak kan printen. Het is mij al gelukt om met "GS" .ps files aftedrukken en die komen er ook goed uit. Maar ja nu wil ik graag dat ik ook vanuit Windows kan printen dit kan op twee manieren met de LPT1 delen maar dat lukt mij ook niet en op de volgende manier die hier onderstaand. Maar het lijkt of die niks door stuurt naar mijn spool directorie. Hij doet ook verder niks en de directories blijven gewoon leeg.
Hier onder staat het script wat ik helemaal geprobeerd heb.
For now I found a solution using lprng and magicfilter and have the same dj working in different modes (mono, draft, photo quality) on my Debian Linux system.
1. Install lprng and magicfilter and djtools with apt-get install.
2. Get the hpijs packages gs-hpijs-5.50-1.rh62.i386.rpm and
hpijs-0.97-1.rh62.i386.rpm
3. convert both packages with "alien -d filename" where filename has to be replaced by the rpm package.
4. install both debs with dpkg
5. copy eg /etc/dj500c-filter to your suggested filter names and edit them
Here is an example for printcap and filters, which will allow you to print either mono, draft or photo quality with an dj840c.
/etc/printcap:
dj|dj840c|HP Deskjet 840c:
:lp=/dev/lp0:sd=/var/spool/lpd/hpdj840c
:sh:pw#80:pl#72:px#2880:mx#0
:if=/etc/magicfilter/dj840c-filter
:af=/var/log/lp-acct:lf=/var/log/lp-errs
:force_localhost@
dj-mono|dj840c-mono|HP Deskjet 840c Monochrome:
:lp=/dev/lp0:sd=/var/spool/lpd/hpdj840c-mono
:sh:pw#80:pl#72:px#2880:mx#0
:if=/etc/magicfilter/dj840c-filter-mono
:af=/var/log/lp-acct:lf=/var/log/lp-errs
:force_localhost@
dj-draft|dj840c-draft|HP Deskjet 840c Draft:
:lp=/dev/lp0:sd=/var/spool/lpd/hpdj840c-draft
:sh:pw#80:pl#72:px#2880:mx#0
:if=/etc/magicfilter/dj840c-filter-draft
:af=/var/log/lp-acct:lf=/var/log/lp-errs
:force_localhost@
(filters can be copied from another dj filter delivered with magicfilter)
The last line of every filter is
default filter /usr/bin/djscript -q
Ther first lines are different for every filter
dj840c-filter-draft:
# PostScript
0 %! filter /usr/bin/gs -q -dSAFER -dNOPAUSE -r300x300 -sDEVICE=hpijs -sDeviceName=DJ8xx -dPaperType=1 -dPrintMode=1 -sPAPERSIZE=a4 -sOutputFile=- -
0 \004%! filter /usr/bin/gs -q -dSAFER -dNOPAUSE -r300x300 -sDEVICE=hpijs -sDeviceName=DJ8xx -dPaperType=1 -dPrintMode=1 -sPAPERSIZE=a4 -sOutputFile=- -
dj840c-filter:
# PostScript
0 %! filter /usr/bin/gs -q -dSAFER -dNOPAUSE -r600x600 -sDEVICE=hpijs -sDeviceName=DJ8xx -dPaperType=1 -dPrintMode=2 -sPAPERSIZE=a4 -sOutputFile=- -
0 \004%! filter /usr/bin/gs -q -dSAFER -dNOPAUSE -r600x600 -sDEVICE=hpijs -sDeviceName=DJ8xx -dPaperType=1 -dPrintMode=2 -sPAPERSIZE=a4 -sOutputFile=- -
dj840c-filter-mono:
# PostScript
0 %! filter /usr/bin/gs -q -dSAFER -dNOPAUSE -r300x300 -sDEVICE=hpijs -sDeviceName=DJ8xx -dPaperType=1 -dPrintMode=0 -sPAPERSIZE=a4 -sOutputFile=- -
0 \004%! filter /usr/bin/gs -q -dSAFER -dNOPAUSE -r300x300 -sDEVICE=hpijs -sDeviceName=DJ8xx -dPaperType=1 -dPrintMode=0 -sPAPERSIZE=a4 -sOutputFile=- -
printing eg
lpr -Pdj840c tiger.ps
If this does not work for you:
1. ist your printer connected and online?
2. Did you chose the correct file names in printcap for the filters?
3. Is your printer at lp0?
4. What does lpstat say for the printer? Maybe the print is dequed or in progress?
5. What does lpq -P printername say?
6. Do you find any error for the printer in /var/log/lp-errs or wherever your error files are?
Did I miss anything?
cu
Jutta
Hier onder staat het script wat ik helemaal geprobeerd heb.
For now I found a solution using lprng and magicfilter and have the same dj working in different modes (mono, draft, photo quality) on my Debian Linux system.
1. Install lprng and magicfilter and djtools with apt-get install.
2. Get the hpijs packages gs-hpijs-5.50-1.rh62.i386.rpm and
hpijs-0.97-1.rh62.i386.rpm
3. convert both packages with "alien -d filename" where filename has to be replaced by the rpm package.
4. install both debs with dpkg
5. copy eg /etc/dj500c-filter to your suggested filter names and edit them
Here is an example for printcap and filters, which will allow you to print either mono, draft or photo quality with an dj840c.
/etc/printcap:
dj|dj840c|HP Deskjet 840c:
:lp=/dev/lp0:sd=/var/spool/lpd/hpdj840c
:sh:pw#80:pl#72:px#2880:mx#0
:if=/etc/magicfilter/dj840c-filter
:af=/var/log/lp-acct:lf=/var/log/lp-errs
:force_localhost@
dj-mono|dj840c-mono|HP Deskjet 840c Monochrome:
:lp=/dev/lp0:sd=/var/spool/lpd/hpdj840c-mono
:sh:pw#80:pl#72:px#2880:mx#0
:if=/etc/magicfilter/dj840c-filter-mono
:af=/var/log/lp-acct:lf=/var/log/lp-errs
:force_localhost@
dj-draft|dj840c-draft|HP Deskjet 840c Draft:
:lp=/dev/lp0:sd=/var/spool/lpd/hpdj840c-draft
:sh:pw#80:pl#72:px#2880:mx#0
:if=/etc/magicfilter/dj840c-filter-draft
:af=/var/log/lp-acct:lf=/var/log/lp-errs
:force_localhost@
(filters can be copied from another dj filter delivered with magicfilter)
The last line of every filter is
default filter /usr/bin/djscript -q
Ther first lines are different for every filter
dj840c-filter-draft:
# PostScript
0 %! filter /usr/bin/gs -q -dSAFER -dNOPAUSE -r300x300 -sDEVICE=hpijs -sDeviceName=DJ8xx -dPaperType=1 -dPrintMode=1 -sPAPERSIZE=a4 -sOutputFile=- -
0 \004%! filter /usr/bin/gs -q -dSAFER -dNOPAUSE -r300x300 -sDEVICE=hpijs -sDeviceName=DJ8xx -dPaperType=1 -dPrintMode=1 -sPAPERSIZE=a4 -sOutputFile=- -
dj840c-filter:
# PostScript
0 %! filter /usr/bin/gs -q -dSAFER -dNOPAUSE -r600x600 -sDEVICE=hpijs -sDeviceName=DJ8xx -dPaperType=1 -dPrintMode=2 -sPAPERSIZE=a4 -sOutputFile=- -
0 \004%! filter /usr/bin/gs -q -dSAFER -dNOPAUSE -r600x600 -sDEVICE=hpijs -sDeviceName=DJ8xx -dPaperType=1 -dPrintMode=2 -sPAPERSIZE=a4 -sOutputFile=- -
dj840c-filter-mono:
# PostScript
0 %! filter /usr/bin/gs -q -dSAFER -dNOPAUSE -r300x300 -sDEVICE=hpijs -sDeviceName=DJ8xx -dPaperType=1 -dPrintMode=0 -sPAPERSIZE=a4 -sOutputFile=- -
0 \004%! filter /usr/bin/gs -q -dSAFER -dNOPAUSE -r300x300 -sDEVICE=hpijs -sDeviceName=DJ8xx -dPaperType=1 -dPrintMode=0 -sPAPERSIZE=a4 -sOutputFile=- -
printing eg
lpr -Pdj840c tiger.ps
If this does not work for you:
1. ist your printer connected and online?
2. Did you chose the correct file names in printcap for the filters?
3. Is your printer at lp0?
4. What does lpstat say for the printer? Maybe the print is dequed or in progress?
5. What does lpq -P printername say?
6. Do you find any error for the printer in /var/log/lp-errs or wherever your error files are?
Did I miss anything?
cu
Jutta