| Matej Vela on Wed, 10 May 2000 19:31:19 +0200 (CEST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: apsfilter 5.4.2 bugs'n'stuff |
On Tue, May 09, 2000 at 11:45:05AM +0200, Michael Loin wrote: > Matej Vela wrote: > > On Tue, May 02, 2000 at 12:30:53PM +0200, Michael Lossin wrote: > > > * For a local printer, $PRINT_REDIR is not set, so print_data > > > and print_ascii_recode end in void (which most probably is the > > > wrong destination). It should be: > > > [...] > > > I don't know what should happen in print_data... any hints? > > > > I'm sorry, I didn't understand this? > > What I meant was: should the pipe end in "print_raw" or just > "$PRINT_REDIR"? (print_raw should be alright, I guess...) Data (i.e. PCL, PJL, etc) should already be in a format suitable for printing, so I think that it can go directly to $PRINT_REDIR. (If it isn't printable, print_raw won't help.) (...) > * Why is apsfilter relying on the filters_found file? Wouldn't it be > simpler to check for the programs at run-time? > (change 'if [ -n "$HAVE_xyz" ]' to 'if which >/dev/null xyz') > Of course it would be uglier, but WTF... No need to re-run the filter > setup every time. Using which (even if we implement it as a shell function) imposes a performance penalty. However, since it does make our users' lives simpler, I think we can live with that. I'll wait for Andreas to see whether he agrees. > * (CVS version only) Using acroread in a pipeline results in a /tmp file > left after the script has ended (the "-pairs" construction with two > temporary files is needed). (Thanks for testing it!) Should we bother to work around this? It will probably be fixed soon, and /tmp is cleaned automatically anyway. If you really care, try the attached acroread wrapper -- it fixes the problem for everybody, and not just apsfilter. > * I suggested the use of "convert" for various bitmap (and other) > formats. Has anyone done serious comparison of the output quality to > the one generated by "...topnm | pnmtops"? (IMHO it really depends on > the input file.) Where can I download "convert"? > * 'This may uglify the source' (TM), but mpage is a tool similar to a2ps, > wouldn't it be nice... *ouch* Don't hit me! :) I've added preliminary support. Please test. Thanks, Matej
#!/bin/sh -e
# (C) 2000 Matej Vela <vela@debian.org>
# Under the GNU GPL, version 2 or higher.
#
# Move acroread to acroread.real, and put this script in its place.
no_pairs=true
topostscript=false
for argument; do
case "$argument" in
-pairs) no_pairs=false ;;
-toPostScript) topostscript=true ;;
esac
done
if $no_pairs && $topostscript; then
: ${TMPDIR:=/tmp}
pdf_file="$TMPDIR/acroread$$.pdf"
ps_file="$TMPDIR/acroread$$.ps"
umask 077
set -C
> "$pdf_file"
> "$ps_file"
set +C
set -- "$@" -pairs "$pdf_file" "$ps_file"
fi
acroread.real "$@"
if $no_pairs && $topostscript; then
rm "$pdf_file" "$ps_file"
fi
exit 0