Re: Dumb printing question
- From: mkitchin.public@xxxxxxxxx
- Date: Wed, 12 Dec 2007 05:40:39 -0800 (PST)
On Dec 12, 12:53 am, Unruh <unruh-s...@xxxxxxxxxxxxxx> wrote:
Shudder Shudder. That is old. If it is on the net and in a hospital I wouldI know. It isn't really an option for me. This is part of a mammogram
seriously consider the possibility that you will be sued for gross
negligence when that computer is used to shut down aspects of the hospital.
Please please upgrade.
machine. The vendor will say this isn't a computer. It is a medical
device certified by the FDA that happens to run an OS. It can't be
modified or it will have to be recertified by the FDA. My hands are
tied. And yes, it is brand new. It did put it on a firewalled VLAN at
least. It isn;t accessible from the internet.
Just send out the postscript file and use that. No need for pdf. You can
always convert to pdf outside if you really really need it.
That is exactly what I want to do.
What is the format of the files that are sent to the printer?
I'm not exactly sure.
What does mf_wrapper do? You could always alter that to send the output to
a file instead of the printer.
That is sort of what I was thinking. See below for mf_wrapper
I was thinking about changing the section near the end to look like
this. I'm wasn't positive if this would work though.
if [ -f "$TMP_FILE" ]; then
# rm -f "$TMP_FILE"
mv $TMP_FILE" /tmp/pdfblah
fi
[root@R2CADSERVER root]# cat /usr/share/printconf/util/mf_wrapper
#!/bin/bash
#
# Wrap calls to magicfilter, so that we can compose mf rules.
#
#
# Collect the rule set, as it exists _NOW_
MF_RULE_DIR='/usr/share/printconf/mf_rules'
MF_RULES=$MF_RULE_DIR/mf[[:digit:]][[:digit:]]-*
TMP_FILE=`mktemp /tmp/printconf.XXXXXX` || exit 1
# Create an m4 rule to pass the options to lpdomatic
# via magicfilter.
OPT_FILE=`mktemp /tmp/printopt.XXXXXX` || exit 1
echo 'define(LPRNGOPTS, `'$*"')dnl" > $OPT_FILE
cat $OPT_FILE ./mf.cfg $MF_RULES | m4 > $TMP_FILE
# Find the effective language set to use.
LANG=`grep '^[[:space:]]*#[[:space:]]*FILTER_LOCALE=' ./mf.cfg | sed
's/
^[[:space:]]*#[[:space:]]*F
ILTER_LOCALE=//;'`
[ -z "$LANG" ] && LANG=C
export LANG
# Try to close up some information exposure, and set the papersize for
ghostscript
GS_PAPERSIZE=`grep '^[[:space:]]*#[[:space:]]*GS_PAPERSIZE=' ./mf.cfg
| sed 's/
^[[:space:]]*#[[:spa
ce:]]*GS_PAPERSIZE=//;'`
GS_OPTIONS="$GS_OPTIONS -dPARANOIDSAFER -sPAPERSIZE=$GS_PAPERSIZE"
export GS_OPTIONS
# Tell ghostscript where it might expect to find some fonts (bug
#61015).
GS_FONTPATH=/usr/share/fonts
export GS_FONTPATH
# Debug expansion
DEBUGSTRING=
if [ -n "$DEBUG" ]
then
while [ "$DEBUG" -gt 0 ]
do
DEBUG=$(($DEBUG - 1))
DEBUGSTRING="$DEBUGSTRING --debug"
done
fi
# Run magic filter
/usr/bin/magicfilter-t "$TMP_FILE" $DEBUGSTRING < /dev/stdin
RETVAL=$?
if [ -f "$TMP_FILE" ]; then
rm -f "$TMP_FILE"
fi
if [ -f "$OPT_FILE" ]; then
rm -f "$OPT_FILE"
fi
if [[ $RETVAL -eq 0 ]]; then
# what termination are we using?
TERMINATION=`grep '^[[:space:]]*#[[:space:]]*TERMINATION=' ./
mf.cfg | sed 's/
^[[:space:]]*#
[[:space:]]*TERMINATION=//;'`
if [ -n $TERMINATION ]; then
echo -n -e $TERMINATION;
fi
fi
exit $RETVAL
.
- Follow-Ups:
- Re: Dumb printing question
- From: Keith Keller
- Re: Dumb printing question
- From: The Natural Philosopher
- Re: Dumb printing question
- References:
- Dumb printing question
- From: mkitchin . public
- Re: Dumb printing question
- From: Unruh
- Dumb printing question
- Prev by Date: Re: How do I find out if a text file includes currently Windows CRs or is Linux compatible?
- Next by Date: Re: How do I find out if a text file includes currently Windows CRs or is Linux compatible?
- Previous by thread: Re: Dumb printing question
- Next by thread: Re: Dumb printing question
- Index(es):