[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mpage & PS docs -- 1-up => 2-up fsckups. StarOffice?



on Wed, Nov 29, 2000 at 01:32:49AM +0000, Colin Watson (cjw44@flatline.org.uk) wrote:
> kmself@ix.netcom.com wrote:
> >Specific instance is an Excel spreadsheet, printed to file from
> >StarOffice (that bloated stuck pig of an office suite), then attempting
> >to convert the file with mpage to a two-pages-per-sheet with:
> >
> >    mpage -dp -2 < soffice.ps > soffice-2up.ps
> >
> >Viewing (or printing) the results with gv flashes up the rendered
> >content for a moment, then blanks the page.  'gs' has similar results.
> >This appears to be a problem noted by others (Google, Deja turn up some
> >references), but I can't seem to find a fix.
> 
> Hm. I can't help with mpage, I'm afraid. As a workaround, have you tried
> psnup (from the psutils package)? Of course, you'll have to cause the
> PostScript file to contain its original self twice, perhaps using
> psmerge. Sorry if a workaround wasn't what you were after.

Thanks, psnup *does* do the trick.  I've been using mpage for a few
years, so it's going to tough to kick the habit, but that's a good one
to know.

The problem, according to web searches, is broken PS output by
StarOffice.  One fix is to use a set of ps2ps commands to produce
rectified, Level-1 postscript.  From a set of commands found online,
I've created the attached 'sopsvirginizer' script -- it un-fscks
StarOffice postscript output. 

-- 
Karsten M. Self <kmself@ix.netcom.com>     http://www.netcom.com/~kmself
 Evangelist, Zelerate, Inc.                      http://www.zelerate.org
  What part of "Gestalt" don't you understand?      There is no K5 cabal
   http://gestalt-system.sourceforge.net/        http://www.kuro5hin.org
#!/bin/sh

# This script virginizes (de-fucks) StarOffice postscript, for use in
# mpage and other tools.
# Author: Karsten M. Self
# Date: Tuesday, November 28, 2000
# Credits:  George Smiley (georgesmiley@my-deja.com) for the idea
# License:  This work is public domain
# ----------------------------------------
# Arguments:  $1= infile, $2= outfile
# ----------------------------------------

if [ X$1 = "X" -o X$2 = "X" ]; then
    echo "usage:  $( basename $0 ) infile outfile" 1>&2; exit 1
fi

export PATH=/usr/bin:/bin
TMPFILE=$( mktemp /tmp/sops1.XXXXXX ) || exit 1
trap 'rm -f $TMPFILE; exit 1' 1 2 3 13 15

ps2ps $1 $TMPFILE && ps2ps -dLanguageLevel=1 $TMPFILE $2
rm -f $TMPFILE

Attachment: pgpRpuAAL3dGC.pgp
Description: PGP signature


Reply to: