Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Jan 1999 05:48:41 +0300 (AST)
From:      root@isis.dynip.com
To:        robert@chalmers.com.au
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: How to print HTML doc on HPdeskjet 690C in COLOR
Message-ID:  <199901280249.FAA17720@isis.dynip.com>
In-Reply-To: <36AFCED0.7CDD93DF@chalmers.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On 28 Jan, Robert Chalmers wrote:
> 
> Hi,
> thats really excellent. Thank you very much. I'll certainly make use of this.
> 
> The Ozone - or lack of it means Australia has the highest skin cancer rate of any country in
> the world now. Some claim to fame huh!  The weather reports now carry an index to advise people
> of changes to it.
> 
> Thanks again for your excellent help,
> 
> Regards
> Robert
> 
> root@isis.dynip.com wrote:
> 
>> On 28 Jan, Robert Chalmers wrote:
>> > Hi,
>> > how did you get a 690c to print postscript? I can do text and condensed text,
>> > but couldn't figure out how to print PS documents?
>> > I'll have to have a look at color too. Never thought of that.
>> >
>> Hi Robert,
>> nice to a have a question from Australia.
>> By the way how is the Ozone problem there  ?
>>
>> To print postscript docs on non-postscript capable printers like HP
>> deskjets you need a software trick to overcome the hardware cripling.
>> So you need to use print filters, it is a rather long, complex and
>> sometimes terrifying topic which I am very far from fully
>> understanding, but here is the way I got it to work for me with the
>> help of FreeBSD Handbook (already installed on your system I hope).
>>
>> step 1: Setup your /etc/printcap file
>> here is mine:
>> ##      @(#)printcap    5.3 (Berkeley) 6/30/90
>> ## $Id: printcap,v 1.9 1998/02/04 12:09:06 ache Exp $
>> #
>> ##
>> ## This enables a simple local "raw" printer, hooked up to the first
>> ## parallel port.  No kind of filtering is done, so everything you
>> ## pass to the "lpr" command will be printed unmodified.
>> ##
>> ## Remember, for further print queues you're going to add, you have to
>> ## chose different spool directories (the "sd" capability below),
>> ## otherwise you will greatly confuse lpd.
>> ##
>> ## For some advanced printing, have a look at the "apsfilter" package.
>> ## It plugs into the lpd system, allowing you to print a variety of
>> ## different file types by converting everything to PostScript(tm)
>> ## format.  If you don't have a PostScript(tm) printer, don't panic,
>> ## but do also install the "ghostscript" package.
>> ##
>> ## Do also refer to section 7 (Printing) of the handbook.  A local copy
>> ## can be found under /usr/share/doc/handbook/handbook.{html,latin1}.
>> ##
>> ## Banner pages are now suppressed by default.  Remove the :sh:
>> ## capability to turn them back on.
>> ## Installed filters
>> ##:df=/usr/libexec/hpdf:
>> ##:if=/usr/libexec/if-simple:   <-- simple text only
>> ##:df=/usr/libexec/psdf:        <-- dvi to ps
>> ##:if=/usr/local/libexec/psif:  <-- print ps to text on ps printers(don't use we're POOR)
>> ##:if=/usr/libexec/hpif:        <-- Print Ghostscript-simulated PostScript on a DeskJet 500
>> HP-Inkjet|lp|local line printer|HP Deskjet 690C:\ <--- your printer name
>>         :sh:\
>>         :lp=/dev/printer:sd=/var/spool/output/lpd/HP-InkJet:\
>>         :lf=/var/log/lpd-errs:\
>>         :df=/usr/libexec/psdf:\
>>         :vf=/usr/libexec/hpvf:\
>>         :tf=/usr/libexec/pstf:\
>>         :rf=/usr/libexec/hprf:\
>>         :if=/usr/libexec/hpif:   <--------- THIS IS THE SUCKER ps->HPjet
>>
>> #************************ THE REST IS ADDED BY ASPFILTER form /usr/ports
>> # LABEL apsfilter
>> # apsfilter setup Thu Jan 21 14:29:08 AST 1999
>> #
>> # APS_BASEDIR:/usr/local/apsfilter
>> #
>> #
>> ascii|lp1|cdj670-a4-ascii-mono|cdj670 ascii mono:\
>>         :lp=/dev/printer:\
>>         :sd=/var/spool/lpd/cdj670-a4-ascii-mono:\
>>         :lf=/var/spool/lpd/cdj670-a4-ascii-mono/log:\
>>         :af=/var/spool/lpd/cdj670-a4-ascii-mono/acct:\
>>         :if=/usr/local/apsfilter/filter/aps-cdj670-a4-ascii-mono:\
>>         :mx#0:\
>>         :sh:
>> #
>> lp2|cdj670-a4-auto-mono|cdj670 auto mono:\
>>         :lp=/dev/printer:\
>>         :sd=/var/spool/lpd/cdj670-a4-auto-mono:\
>>         :lf=/var/spool/lpd/cdj670-a4-auto-mono/log:\
>>         :af=/var/spool/lpd/cdj670-a4-auto-mono/acct:\
>>         :if=/usr/local/apsfilter/filter/aps-cdj670-a4-auto-mono:\
>>         :mx#0:\
>>         :sh:
>> #
>> lp3|cdj670-a4-ascii-color|cdj670 ascii color:\
>>         :lp=/dev/printer:\
>>         :sd=/var/spool/lpd/cdj670-a4-ascii-color:\
>>         :lf=/var/spool/lpd/cdj670-a4-ascii-color/log:\
>>         :af=/var/spool/lpd/cdj670-a4-ascii-color/acct:\
>>         :if=/usr/local/apsfilter/filter/aps-cdj670-a4-ascii-color:\
>>         :mx#0:\
>>         :sh:
>> #
>> lp|lp4|cdj670-a4-auto-color|cdj670 auto color:\
>>         :lp=/dev/printer:\
>>         :sd=/var/spool/lpd/cdj670-a4-auto-color:\
>>         :lf=/var/spool/lpd/cdj670-a4-auto-color/log:\
>>         :af=/var/spool/lpd/cdj670-a4-auto-color/acct:\
>>         :if=/usr/local/apsfilter/filter/aps-cdj670-a4-auto-color:\
>>         :mx#0:\
>>         :sh:
>> #
>> raw|lp5|cdj670-a4-raw|cdj670 auto raw:\
>>         :lp=/dev/printer:\
>>         :sd=/var/spool/lpd/cdj670-raw:\
>>         :lf=/var/spool/lpd/cdj670-raw/log:\
>>         :af=/var/spool/lpd/cdj670-raw/acct:\
>>         :if=/usr/local/apsfilter/filter/aps-cdj670-a4-raw:\
>>         :mx#0:\
>>         :sh:
>>
>> HERE IS THE FILTER ITSELF:
>> #!/bin/sh
>> #
>> #  ifhp - Print Ghostscript-simulated PostScript on a DeskJet 500
>> #  Installed in /usr/libexec/hpif
>>
>> #
>> #  Treat LF as CR+LF:
>> #
>> printf "\033&k2G" || exit 2
>>
>> #
>> #  Read first two characters of the file
>> #
>> read first_line
>> first_two_chars=`expr "$first_line" : '\(..\)'`
>>
>> if [ "$first_two_chars" = "%!" ]; then
>>     #
>>     #  It is PostScript; use Ghostscript to scan-convert and print it
>>     #
>>     /usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=djet500 -sOutputFile=- - \
>>         && exit 0
>>
>> else
>>     #
>>     #  Plain text or HP/PCL, so just print it directly; print a form
>>     #  at the end to eject the last page.
>>     #
>>     echo $first_line && cat && printf "\f" && exit 2
>> fi
>>
>> exit 2
>>
>> INSTALL Ghost Script program (in the ports collection)
>> it will give you /usr/local/bin/gs <----- this is actually called from
>> with in the filter script.
>>
>> Use any postscript program like Ghost View (in the ports)
>> to View then use its own Print command from the menu.
>>
>> Thanks.
>> --
>> - MAY THE FORCE BE WITH YOU.                                ~o  .^.
>> ----------------------------                          ___   o~ .00 )
>> Static Email   : osiris2002@yahoo.com                   /|   o~ /)(
>> Bouncing Email : root@isis.dynip.com                   / |       | \
>> Web Site       : http://isis.dynip.com:80 (Frames) ___/  |      /   \
>> Anon FTP Site  : ftp://isis.dynip.com:21 (anonymous)  |  /''___/ /   |
>> Gopher Site    : gopher://isis.dynip.com:70           | /'''/___/    |
>> Network News   : isis.dynip.com (Read, Post, Xfer)  __|/'''/
>> Mailing Lists  : majordomo@isis.dynip.com (public)
>> pgp key        : finger root@isis.dynip.com
>>
>> To Unsubscribe: send mail to majordomo@FreeBSD.org
>> with "unsubscribe freebsd-questions" in the body of the message
> 
> --
> http://www.chalmers.com.au. Publications From China in 24 different languages.
> English, French, German, Russian, Arabic, Spanish, Chinese, Burmese, Bengali,
> Hindi, Indonesian, Italian, Japanese, Korean, Portuguese, Persian, Swahili,
> Sinhalese, Thai, Tamil, Urdu, Vietnamese. China Books for CIBTC, Beijing.
> 
Thanks for your politelness.
Very sorry for Australia, it is really one of the most loveable
countries+Newzealand, that I hate to see in trouble in any way, 
<WAR PROOF>
thanks to our friends and Factories in North America.
</WAR PROOF>
Anyways, I forgot to tell you that the filter in /usr/libexec must be
owned by daemon or the lpd won't be able to execute it.
If you succeed tell me.
Cheers too.
-- 
- MAY THE FORCE BE WITH YOU.                                ~o  .^.
----------------------------                          ___   o~ .00 )
Static Email   : osiris2002@yahoo.com                   /|   o~ /)(
Bouncing Email : root@isis.dynip.com                   / |       | \
Web Site       : http://isis.dynip.com:80 (Frames) ___/  |      /   \
Anon FTP Site  : ftp://isis.dynip.com:21 (anonymous)  |  /''___/ /   |
Gopher Site    : gopher://isis.dynip.com:70           | /'''/___/    |
Network News   : isis.dynip.com (Read, Post, Xfer)  __|/'''/
Mailing Lists  : majordomo@isis.dynip.com (public)
pgp key        : finger root@isis.dynip.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901280249.FAA17720>