SUMMARY: HP4M+ Duplexing with Frame 4.0

From: Jeff Victor (victoj@kellas.Sage.EDU)
Date: Wed Dec 21 1994 - 02:11:10 CST


Congratulations and a big Thank You to Gerhard:

I installed a HP4M+ on my SS5 (Solaris 2.3), but Frame 4.0 wouldn't
send the proper PS command to do software-controlled duplexing.

Gerhard Lausser <lausser@kotw0002.mch.sni.de> replied with the following,
which worked perfectly the very first time:

this is how i solved the duplex problem:

create a file $FMHOME/fminit/FMlpr.duplex which acts as a filter for inserting
the 'duplex-on'-command in the postscript code
FMlpr.duplex calls /usr/local/bin/duplex.$PRINTER which in case of a HP LJ4 is:

#!/usr/bin/awk -f
$1 ~ /^\%\!/ { printf"%s\nstatusdict begin mark true setduplexmode cleartomark end\n",$0 }
$1 !~ /^\%\!/ { print $0 }

from the frame printing menu you type duplex:lp3 as printer name
(replace lp3 by the name of your hp lj4)

--gerhard
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ Gerhard Lausser _/ tel +49-89-4144-7721 fax +49-89-4144-7720 _/
_/ Siemens Nixdorf AG _/ lausser@kotw0002.mch.sni.de _/
_/ SNI BU BA NM 213 _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
_/ Rosenheimerstr.116 _/ des geld wos mir scho vosuffa ham, meisst eitz _/
_/ 81669 Muenchen _/ dolign. do kannt ma saffa --w.kuenzel _/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

this is FMlpr.duplex

#!/bin/sh
# $Id: FMlpr.tray,v 1.2 1992/11/06 05:42:09 adl Exp $
# Copyright (c) 1991-1993 Frame Technology Corp. All rights reserved.
# modified by g.lausser siemens nixdorf ag 06.05.94
# FMlpr.duplex
#
# This script supports printing on both sides of a sheet
# It is called by FrameMaker when a file is printed to printername
# duplex:lp. This script must be called FMlpr.duplex and installed in the
# fminit directory.

# Load arguments into named variables
. $3/FMlpr.init

# Get printer option
OPTION=`echo $PRINTER | sed -e 's/:.*//'`

# Strip off the option part of the printername
# (can't use expr since no string args on UnixV)
PRINTER=`echo $PRINTER | sed -e "s/${OPTION}://"`

# Mod for tray selection on multi-tray Dataproducts LZR 1260 printer

# Note the sed below was hard to get right because of the return. It
# MUST BE DIFFERENT than the code used for FMlpr.ltrhead since the value
# of the shell variable must be substituted, yet the sed arg must be in
# single quotes
eval "cat $FILE | /usr/local/bin/duplex.$PRINTER > $TMPFILE"

echo "$MYNAME: Sending file to printer $PRINTER using option duplex"

# Warning: if the file is too big and the /tmp partition is too small,
# this will fail. The assumption is that letterhead type documents are
# small, so we don't bother to check for this case.

# Replace original ps file with the modified version. That way, they
# have the same descriptive name as before (which is presumably ok for
# short filename systems).
cp $TMPFILE "$FILE"
rm -f $TMPFILE

# Now call FMlpr, but using the new file, and a real printername
FMLPR_LOCATION=FMlpr
. $FMINITDIR/FMlpr.finder
exec $FMLPR_LOCATION $PRINTER "$FILE" $FMINITDIR $HOMEDIR $LOCATIONFLAG $FMBINDIR

------------------------------------------------------------------------------
Jeff Victor The SageNet `Net Sage' victoj@sage.edu
Network Administrator 518-270-2354
The Sage Colleges Any opinions detected here are
Troy, New York probably your imagination running wild.
-------------------------------------------------------------------------------



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:17 CDT