Solved

Input Filter for HP Laserjet 8000

Posted on 2000-02-23
13
665 Views
Last Modified: 2013-12-15
What is the best input filter / magic filter to use for an HP laserjet? It's a network printer with it's own IP address. I can print text ok (with the staircase effect!) but I need to print dvi files etc. I'm on Red Hat linux, using lpr. (i.e. /etc/printcap)

I heard APS filter was good, but it doesn't seem to work over the network. Does anyone have any good suggestions?
0
Comment
Question by:bergsy
  • 6
  • 6
13 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 2553222
The HP 8000 has postscript, so if you set up the printer with printtool, just  configure a network printer and select "Postscript printer" for the filter and you should be in business.
0
 

Author Comment

by:bergsy
ID: 2553294
Nice idea, but the PC it's on is a server & does not have X installed. So using printool is out (unless anyone knows otherwise???).
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2553380
Ah, you didn't say anything about wanting to configure it on a headless server. Personally, I'd install the X tools, python, etc, and access them remotely as there are a number of things (like printers) that aren't simple or easy to configure without the GUI. I can see what the queue looks like, and I can see where the filters came from, but it's not evident that simply putting those items in the correct place will make it work.

If you are feeling adventuresome, I can turn the the contents of a spool dir and the printcap entry into a shar file and put them into a comment.
0
 
LVL 4

Expert Comment

by:kiffney
ID: 2570031
When you say 'the PC it's on doesn't have X' do you mean, the PC you want to print from? Or that the pc you're talking about is a print server?   If it's a print server, why not use printtool on a redhat/linux workstation with X that doesn't have a printer (after first backing up the printcap file), configure the 8000 exactly the way you would if you WERE on the x-less print server, and then copying the printcap and filter files over to the print server,making sure the spool and filter permissions are correct.

Alternatively, you can do your filtering on YOUR workstation and print the raw output on the remote printer.  Just use the HP4si filter - the 8000 will work fine with the PCL5 that this puts out.  RedHat's printtool will do this for you - its print filter is fine.  Setting up your own printcap and input/output filters  by hand will cause you a world of pain.  
0
 

Author Comment

by:bergsy
ID: 2571613
Nice idea kiffney. I tried that, copied the files over fine. I can now print text with no problems, but when I try and print a postscript file, the actual postscript code is printed, not the output I want. I have tried specifiying both a 'Postscript' and a 'Laserjet' printer in printtool, but both have exactly the same results.
Where can I confirm if the HP 8000 N actually supports postscript?
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2572491
You can do it by printing a status page via the front panel of the printer. It may not be set up for "auto switch" from PCL to Postscript. You never responded to my question about the shar file, wanna try that?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:bergsy
ID: 2572941
Just printed the status page. This has confirmed the printer has postscript (19980610). The 'Personality' setting is 'Auto' as opposed to PS or PCL. So why is the printer not going into Postscript as it should???

As for the share file, yes please I think that would be VERY helpful! Do you have this printer yourself by the way?
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2573259
I don't have an 8000N that I can get to from a Linux box, but I don't think that would matter. The best driver for it, from a Linux/Unix perspective is the generic postscript driver. As long as the printer supports Postscript Level 2 or better, it'll print.

More than likely it's not going into postscript mode because something is wrong with the "magic token". There is a string that has to be at the absolute beginning of the print job that the printer sees as the postscript mode indicator.
0
 

Author Comment

by:bergsy
ID: 2575371
Adjusted points to 100
0
 

Author Comment

by:bergsy
ID: 2575372
So, how do I get this 'Magic Token' from Linux to the printer? I've looked at HP's site (Joke for Linux users) & the manual but could not find anything there about the commands the printer supports.
0
 
LVL 40

Accepted Solution

by:
jlevie earned 100 total points
ID: 2576294
I'm sorry, I got in a rush and didn't provide complete an explanation as I should have. The "magic token" is this line (%!PS-Adobe-3.0) at the top of a postscript file. While I don't know the exact method this printer uses to distinguish between Postscript and PCL. someplace I've got a note stating that one or more of the HP printers does look for that line. I've seen printers get confused when there was anything, especially binary data before that line.

Well, duh... I just realized you're using a PCL filter for the printer queue. Since the filter isn't a smart filter, it's treating the postscript as text and printing it as such. A smart filter would sense the magic token and ship the data straight to the printer as is.

My "shar" file will appear here as soon as I get to work, in about an hour... Lets see if that doesn't work better.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2577015
Okay, here's the shar file. make a temp dir, cd to the dir and unshar what's below. You'll find an extract from my printcap that'll need modification for your printer IP. On a single device JetDirect the remote queue name (scribe0 in my printcap won't matter). The lp directory needs to be moved to /var/spool/lpd and changed to owned by root:lp (chown -R root:lp /var/spool/lpd/lp). Do check to see that the rhs-printfilters package has been installed for access to the filter plugins.

#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.2.1).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
#
# Made on 2000-03-02 09:47 CST by <levie@wilowisp.dynetics.com>.
# Source directory was `/nfs0/levie/printer'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
#
# This shar contains:
# length mode       name
# ------ ---------- ------------------------------------------
#    490 -rw-r--r-- printcap
#   9443 -rwxr-xr-x lp/filter
#    192 -rwxr-xr-x lp/general.cfg
#      4 -rw-r--r-- lp/lock
#    347 -rwxr-xr-x lp/postscript.cfg
#     32 -rw-rw-r-- lp/status
#    146 -rwxr-xr-x lp/textonly.cfg
#
save_IFS="${IFS}"
IFS="${IFS}:"
gettext_dir=FAILED
locale_dir=FAILED
first_param="$1"
for dir in $PATH
do
  if test "$gettext_dir" = FAILED && test -f $dir/gettext \
     && ($dir/gettext --version >/dev/null 2>&1)
  then
    set `$dir/gettext --version 2>&1`
    if test "$3" = GNU
    then
      gettext_dir=$dir
    fi
  fi
  if test "$locale_dir" = FAILED && test -f $dir/shar \
     && ($dir/shar --print-text-domain-dir >/dev/null 2>&1)
  then
    locale_dir=`$dir/shar --print-text-domain-dir`
  fi
done
IFS="$save_IFS"
if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED
then
  echo=echo
else
  TEXTDOMAINDIR=$locale_dir
  export TEXTDOMAINDIR
  TEXTDOMAIN=sharutils
  export TEXTDOMAIN
  echo="$gettext_dir/gettext -s"
fi
if touch -am -t 200112312359.59 $$.touch >/dev/null 2>&1 && test ! -f 200112312359.59 -a -f $$.touch; then
  shar_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"'
elif touch -am 123123592001.59 $$.touch >/dev/null 2>&1 && test ! -f 123123592001.59 -a ! -f 123123592001.5 -a -f $$.touch; then
  shar_touch='touch -am $3$4$5$6$1$2.$7 "$8"'
elif touch -am 1231235901 $$.touch >/dev/null 2>&1 && test ! -f 1231235901 -a -f $$.touch; then
  shar_touch='touch -am $3$4$5$6$2 "$8"'
else
  shar_touch=:
  echo
  $echo 'WARNING: not restoring timestamps.  Consider getting and'
  $echo "installing GNU \`touch', distributed in GNU File Utilities..."
  echo
fi
rm -f 200112312359.59 123123592001.59 123123592001.5 1231235901 $$.touch
#
if mkdir _sh01033; then
  $echo 'x -' 'creating lock directory'
else
  $echo 'failed to create lock directory'
  exit 1
fi
# ============= printcap ==============
if test -f 'printcap' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'printcap' '(file already exists)'
else
  $echo 'x -' extracting 'printcap' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'printcap' &&
# /etc/printcap
#
# Please don't edit this file directly unless you know what you are doing!
# Be warned that the control-panel printtool requires a very strict format!
# Look at the printcap(5) man page for more info.
#
# This file can be edited with the printtool in the control-panel.
X
##PRINTTOOL3## REMOTE POSTSCRIPT 300x300 letter {} PostScript Default {}
scribe0|lp:\
X      :sd=/var/spool/lpd/lp:\
X      :mx#0:\
X      :sh:\
X      :rm=scribes.dynetics.com:\
X      :rp=scribe0:\
X      :if=/var/spool/lpd/lp/filter:
SHAR_EOF
  (set 20 00 03 02 09 42 58 'printcap'; eval "$shar_touch") &&
  chmod 0644 'printcap' ||
  $echo 'restore of' 'printcap' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'printcap:' 'MD5 check failed'
b2de5b91aa0d780c1c8847a277cd7b63  printcap
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'printcap'`"
    test 490 -eq "$shar_count" ||
    $echo 'printcap:' 'original size' '490,' 'current size' "$shar_count!"
  fi
fi
# ============= lp/filter ==============
if test ! -d 'lp'; then
  $echo 'x -' 'creating directory' 'lp'
  mkdir 'lp'
fi
if test -f 'lp/filter' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'lp/filter' '(file already exists)'
else
  $echo 'x -' extracting 'lp/filter' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'lp/filter' &&
#!/bin/bash
#
#
# New smart print filter
#
#
# determines input file magic
#
# looks in the default filter plugin (FPI) directory
# finds all *.fpi files, then finds a combination that will
# yield the desired file type, or will indicate this is impossible.
#
X
X
function filtfrom {
X    echo -ne ${1%-to-*}
}
X
function filtto {
X    echo -ne ${1#*-to-}
}
X
#
# given filters as input vars, find next level available given the
# first arg is the starting point
#
function nextlvl {
X
X    local try
X    local start
X    local all
X    local depth
X
#
#
# $1 is starting point, find something that will work
#
X    start="$1"
X    shift
X
X    depth="$1"
X    shift
X
X    all="$@"
X
#
#   get out of here if too deep!
#
X    if [ $depth -ge $MAX_DEPTH ]; then
X        return 1
X    fi
X    if [ $DEBUG_TREE ]; then
X       echo "Starting point = $start" >> /tmp/filter.debug
X    fi
X
X    if [ $(filtto $start) = $DESIRED_TO ]; then
X      echo " DONE"
X        return 0
X    fi
X
X    while [ $1 ]; do
X      try=$1
X      shift
X        if [ $DEBUG_TREE ]; then
X          echo "for $start trying $try" >> /tmp/filter.debug
X      fi
X      if [ $(filtfrom $try) = $(filtto $start) ]; then
X          echo -n "$start.fpi:$depth:CONT "
X
X          if [ $(filtto $try) = $DESIRED_TO ]; then
X            echo -n "$try.fpi:$((depth+1)):DONE "
X            return 0
X          else
#            echo -n $try
X            nextlvl $try $((depth+1)) $all
#            echo "|G is $G| "
X                if [ $DEBUG_TREE ]; then
X               echo "|rt is $?|" >> /tmp/filter.debug
X            fi
X            if [ "$?" = "0" ]
X                then
X                   if [ $DEBUG_TREE ]; then
X                    echo "for $start we are done"  >> /tmp/filter.debug
X                   fi
#               return 0
X            else
X                   if [ $DEBUG_TREE ]; then
X                  echo "for $start we have failed" >> /tmp/filter.debug
X                   fi
X                   return 1
X                fi
X          fi
X      fi
#      echo ""
X    done
}
X
X
#
# MAIN
#
#
X
#
#
#   setup some global variables used by this script
#
#
X
#
#   FPIDIR points to where print filter plug-ins are stored
#   Normally these will be installed with a package via RPM
#
X    FPIDIR=/usr/lib/rhs/rhs-printfilters/
X
X    PATH=${FPIDIR}:${PATH}
X
#
#   MAX_DEPTH determines how long a string of filters will be
#   tried as a possible printing solution. How many input
#   formats will take 6 filters to output Postscript!
#   Unlikely this will need to be changed.
#
X    MAX_DEPTH=6
X
#
#   define these to gets lots of feedback
#   output is appended on /tmp/filter.debug
#
X    DEBUG_TREE=""
X    DEBUG_FILTER=""
X
#
#   Setup variables available to all filter plug-ins
#
#
X
#
#   SPOOLDIR is directory which lpd is spooling from
#
X    export SPOOLDIR=$(pwd)
X
#
#   Get queue specific information (which was written by printtool)
#
X    source ${SPOOLDIR}/general.cfg
X
X    if [ "$DEBUG_FILTER" != "" ]; then
X      echo "Desired print format is $DESIRED_TO" >> /tmp/filter.debug
X      echo "Paper size is $PAPERSIZE" >> /tmp/filter.debug
X      echo -n "A form feed will " >> /tmp/filter.debug
X      if [ "$SEND_EOF" = "" ]; then
X        echo "not be sent." >> /tmp/filter.debug
X      else
X        echo "be sent." >> /tmp/filter.debug
X      fi
X    fi
X
X    cd $FPIDIR
X    fpis=$(ls *.fpi 2> /dev/null | tr '\n' ' ' | sed 's/\.fpi//g')
X
#
# let's see if its a compressed file first
#
#
# Figure out the magic of the input file
#
X    magic=$(file -)
X    $FPIDIR/rewindstdin
X    magic=${magic#*: }
X    if [ "$DEBUG_FILTER" != "" ]; then
X      echo "Magic is |$magic|" >> /tmp/filter.debug
X    fi
X    case `echo $magic | tr 'A-Z' 'a-z'` in
X        *packed*|*gzip*|*compress* )
X                                              DECOMPRESS="gzip -dc";;
X        * )
X                                              DECOMPRESS="";;
X    esac
X
#
# Figure out the magic of the input file
#
X    if [ "$DECOMPRESS" = "" ]; then
X       magic=$(file -)
X    else
X       magic=$($DECOMPRESS - | file -)
X    fi
X    $FPIDIR/rewindstdin
X    magic=${magic#*: }
X    if [ "$DEBUG_FILTER" != "" ]; then
X      echo "Magic is |$magic|" >> /tmp/filter.debug
X    fi
X    case `echo $magic | tr 'A-Z' 'a-z'` in
X        *empty* )
X                                            exit;;
X        "pc bitmap data"* )
X                                              startpnt="INPUT-to-bmp";;
X        "gif image data"* )
X                                              startpnt="INPUT-to-gif";;
X        "jpeg image data"* )
X                                              startpnt="INPUT-to-jpeg";;
X        "tiff image data"* )
X                                              startpnt="INPUT-to-tiff";;
X        "sun raster image data"* )
X                                              startpnt="INPUT-to-rast";;
X        "pgm"*|"pbm"*|"ppm"* )
X                                              startpnt="INPUT-to-pnm";;
X        postscript* )
X                                              startpnt="INPUT-to-ps";;
X        "tex dvi file"* )
X                                              startpnt="INPUT-to-dvi";;
X        "fig image text"* )
X                                              startpnt="INPUT-to-fig";;
# troff is safe again with groff-1.11a or later we hope
X        "troff or preprocessor"* )
X                                              startpnt="INPUT-to-troff";;
X        "rpm"* )                                   
X                                              startpnt="INPUT-to-rpm";;
X        *ascii*|*text*|*english*|*script* )
X                                              startpnt="INPUT-to-asc";;
X        *data*|*escape* )
X                                              startpnt="INPUT-to-prdata";;
X        *pcl* )
X                                              startpnt="INPUT-to-prdata";;
X         * )
X                                              startpnt="INPUT-to-unknown";;
X    esac
X
X
#
# here is where we could put in hook to call user routine(s) to
# handle extra magics they've defined filters for
#
#  call_user_magic_hook()
#
X    if [ "$DEBUG_FILTER" != "" ]; then    
X       echo "Type of file is $startpnt" >> /tmp/filter.debug
X    fi
X
X    if [ "$startpnt" = "Dont know" ]; then
X       echo "Error - input file type is unknown - cannot print"
X       exit 1
X    fi
X
#
# catch some easy cases without having to figure out best path the hard way
#
X    bestpath=""
X    foundbest="NO"
X    if [ $(filtto $startpnt) = "asc" ]; then
X       if [ "$ASCII_TO_PS" = "NO" ]; then
X          bestpath="$startpnt | asc-to-printer.fpi"
X        foundbest="YES"
X       fi
X    elif [ $(filtto $startpnt) = "prdata" ]; then
X          bestpath="$startpnt | cat -"
X        foundbest="YES"
X    elif [ $(filtto $startpnt) = $DESIRED_TO ]; then
X          bestpath="$startpnt | $DESIRED_TO-to-printer.fpi"
X          foundbest="YES"
X    fi
X
X    if [ "$foundbest" != "YES" ]; then
#  
#   we go through and find best path
#
X    G=`nextlvl "$startpnt" "0" $fpis`
X
X    if [ "$DEBUG_FILTER" != "" ]; then  
X      echo "$G" >> /tmp/filter.debug
X    fi
X
#
# now sort out the best path of all available
#
#
# if no processing required, depth will equal 'DONE'
#
X    if [ "${G# *}" != "DONE" ]; then
X      root=""
X      bestdepth=$((MAX_DEPTH*2))
X      bestpath=""
X      curdepth="0"
X      depth="0"
X      foundbest="NO"
X      for i in $G; do
X          entry=${i%%:*}
X          depth=${i#*:}
X          depth=${depth%:*}
X        if [ $depth -le $curdepth ]; then
X             while [ $(($depth <= $curdepth && $curdepth >= 0)) -eq 1 ]; do
X                root=${root%* | *}
X                curdepth=$(($curdepth - 1))
X             done
X          fi
X         if [ $(($curdepth < 0)) -eq 1 ]; then
X             root=""
X          fi
X          curdepth=$depth
X          if [ "$root" = "" ]; then
X           root="$entry"
X        else
X           root="$root | $entry"
X          fi
X        if [ ${i##*:} = "DONE" ]; then
X             if [ "$DEBUG_FILTER" != "" ]; then
X               echo "$root -> depth = $depth" >> /tmp/filter.debug
X             fi
X             if [ $depth -lt $bestdepth ]; then
X                foundbest="YES"
X                bestdepth=$depth
X                bestpath=$root
X             fi
X          fi
X      done
X    fi
X
X    if [ "$foundbest" = "YES" ]; then
X       bestpath="$bestpath | $DESIRED_TO-to-printer.fpi"
X    fi
#
# end of doing it the hard way
#
X    fi
#
#   we have to add filter to convert desired format to something the
#   printer can handle. May be as simple as 'cat'
#
#
#   ok we got here, and if input data magic is 'data' we'll let it
#   through, hoping it really will work on the printer!
#   Note we still reject lots of magics, like ELF, by doing this
#   which is what we want
#
#
#   getting bad, but trapping all "special" cases here
#
#
X    if [ "$foundbest" = "NO" ]; then
X       printf "No way to print this type of input file: $magic \014"
X       exit 0
X    else
#
#   fix up the best path so we can run it
#
X       if [ "$DECOMPRESS" = "" ]; then
X         bestpath="cat - ${bestpath#* }"
X       else
X         bestpath="$DECOMPRESS ${bestpath#* }"
X       fi
X    fi
X
#
#   any post-filter to run (like smbclient?)
#
X    if [ "$PRINTER_TYPE" = "SMB" ]; then
X       bestpath="$bestpath | ${FPIDIR}/smbprint ${SPOOLDIR}/acct"
X    elif [ "$PRINTER_TYPE" = "NCP" ]; then
X       bestpath="$bestpath | ${FPIDIR}/ncpprint ${SPOOLDIR}/acct"
X    fi
X
X    if [ "$DEBUG_FILTER" != "" ]; then
X      echo "Best path of depth $bestdepth is $bestpath" >> /tmp/filter.debug
X    fi
X
#
# run the command!
#
X    eval $bestpath 2>/dev/null
X
#
#
#   see if we need to send a form feed to eject the page from printer
#
#    if [ "$SEND_EOF" != "" ]; then
#      printf "\014"
#    fi
X
X    exit 0
SHAR_EOF
  (set 20 00 01 26 10 31 34 'lp/filter'; eval "$shar_touch") &&
  chmod 0755 'lp/filter' ||
  $echo 'restore of' 'lp/filter' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'lp/filter:' 'MD5 check failed'
1220df576869efd548073bf9710f4842  lp/filter
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'lp/filter'`"
    test 9443 -eq "$shar_count" ||
    $echo 'lp/filter:' 'original size' '9443,' 'current size' "$shar_count!"
  fi
fi
# ============= lp/general.cfg ==============
if test -f 'lp/general.cfg' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'lp/general.cfg' '(file already exists)'
else
  $echo 'x -' extracting 'lp/general.cfg' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'lp/general.cfg' &&
#
# General config options for printing on this queue
# Generated by PRINTTOOL, do not modify.
#
export DESIRED_TO=ps
export PAPERSIZE=letter
export PRINTER_TYPE=REMOTE
export ASCII_TO_PS=YES
SHAR_EOF
  (set 20 00 01 26 10 31 34 'lp/general.cfg'; eval "$shar_touch") &&
  chmod 0755 'lp/general.cfg' ||
  $echo 'restore of' 'lp/general.cfg' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'lp/general.cfg:' 'MD5 check failed'
c9aacd8dd09a36b987bb774a9e04a87c  lp/general.cfg
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'lp/general.cfg'`"
    test 192 -eq "$shar_count" ||
    $echo 'lp/general.cfg:' 'original size' '192,' 'current size' "$shar_count!"
  fi
fi
# ============= lp/lock ==============
if test -f 'lp/lock' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'lp/lock' '(file already exists)'
else
  $echo 'x -' extracting 'lp/lock' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'lp/lock' &&
495
SHAR_EOF
  (set 20 00 03 02 08 12 40 'lp/lock'; eval "$shar_touch") &&
  chmod 0644 'lp/lock' ||
  $echo 'restore of' 'lp/lock' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'lp/lock:' 'MD5 check failed'
2347412d3332140012fa5e6d6003c1f3  lp/lock
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'lp/lock'`"
    test 4 -eq "$shar_count" ||
    $echo 'lp/lock:' 'original size' '4,' 'current size' "$shar_count!"
  fi
fi
# ============= lp/postscript.cfg ==============
if test -f 'lp/postscript.cfg' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'lp/postscript.cfg' '(file already exists)'
else
  $echo 'x -' extracting 'lp/postscript.cfg' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'lp/postscript.cfg' &&
#
# configuration related to postscript printing
# generated automatically by PRINTTOOL
# manual changes to this file may be lost
#
GSDEVICE=POSTSCRIPT
RESOLUTION=300x300
COLOR=
PAPERSIZE=letter
EXTRA_GS_OPTIONS=""
REVERSE_ORDER=
PS_SEND_EOF=NO
X
#
# following is related to printing multiple pages per output page
#
NUP=1
RTLFTMAR=18
TOPBOTMAR=18
SHAR_EOF
  (set 20 00 01 26 10 31 34 'lp/postscript.cfg'; eval "$shar_touch") &&
  chmod 0755 'lp/postscript.cfg' ||
  $echo 'restore of' 'lp/postscript.cfg' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'lp/postscript.cfg:' 'MD5 check failed'
24f880133623bcf6cd63420367598bef  lp/postscript.cfg
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'lp/postscript.cfg'`"
    test 347 -eq "$shar_count" ||
    $echo 'lp/postscript.cfg:' 'original size' '347,' 'current size' "$shar_count!"
  fi
fi
# ============= lp/status ==============
if test -f 'lp/status' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'lp/status' '(file already exists)'
else
  $echo 'x -' extracting 'lp/status' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'lp/status' &&
sending to scribes.dynetics.com
SHAR_EOF
  (set 20 00 03 01 18 41 47 'lp/status'; eval "$shar_touch") &&
  chmod 0664 'lp/status' ||
  $echo 'restore of' 'lp/status' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'lp/status:' 'MD5 check failed'
9140894c9bd81bbf6d0dd36839079637  lp/status
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'lp/status'`"
    test 32 -eq "$shar_count" ||
    $echo 'lp/status:' 'original size' '32,' 'current size' "$shar_count!"
  fi
fi
# ============= lp/textonly.cfg ==============
if test -f 'lp/textonly.cfg' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'lp/textonly.cfg' '(file already exists)'
else
  $echo 'x -' extracting 'lp/textonly.cfg' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'lp/textonly.cfg' &&
#
# text-only printing options for printing on this queue
# Generated by PRINTTOOL, do not modify.
#
TEXTONLYOPTIONS=
CRLFTRANS=
TEXT_SEND_EOF=NO
SHAR_EOF
  (set 20 00 01 26 10 31 34 'lp/textonly.cfg'; eval "$shar_touch") &&
  chmod 0755 'lp/textonly.cfg' ||
  $echo 'restore of' 'lp/textonly.cfg' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'lp/textonly.cfg:' 'MD5 check failed'
6bcd21d71f334d755c44eb79b436403a  lp/textonly.cfg
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'lp/textonly.cfg'`"
    test 146 -eq "$shar_count" ||
    $echo 'lp/textonly.cfg:' 'original size' '146,' 'current size' "$shar_count!"
  fi
fi
rm -fr _sh01033
exit 0

0
 

Author Comment

by:bergsy
ID: 2604526
The magic token did the trick - I can now print postscript properly. Thanks.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now