chiark / gitweb /
Initial import of $HOME/bin.
[bin.git] / sops-virginizer
1 Article: 37376 of riva.lists.debian.user
2 Path: riva.ucam.org!gateway
3 X-Envelope-Sender: kmself@ix.netcom.com
4 From: kmself@ix.netcom.com
5 Date: Tue, 28 Nov 2000 19:37:02 -0800
6 To: debian-user@lists.debian.org
7 Subject: Re: mpage & PS docs -- 1-up => 2-up fsckups.  StarOffice?
8 Message-ID: <20001128193702.D19274@ix.netcom.com>
9 References: <20001128170849.B16364@ix.netcom.com> <E140w77-0004fQ-00@riva.ucam.org>
10 Mime-Version: 1.0
11 Content-Type: multipart/signed; micalg=pgp-sha1;
12         protocol="application/pgp-signature"; boundary="9crTWz/Z+Zyzu20v"
13 Content-Disposition: inline
14 User-Agent: Mutt/1.2.5i
15 In-Reply-To: <E140w77-0004fQ-00@riva.ucam.org>; from cjw44@flatline.org.uk on Wed, Nov 29, 2000 at 01:32:49AM +0000
16 X-Debian-GNU-Linux: Rocks
17 X-Kuro5hin-cabal: There is no K5 cabal
18 X-GPG-Fingerprint: F932 8B25 5FDD 2528 D595  DC61 3847 889F 55F2 B9B0
19 Resent-Message-ID: <TIJEP.A.DEC.loHJ6@murphy>
20 Resent-From: debian-user@lists.debian.org
21 X-Mailing-List: <debian-user@lists.debian.org> archive/latest/119890
22 X-Loop: debian-user@lists.debian.org
23 Precedence: list
24 Resent-Sender: debian-user-request@lists.debian.org
25 Resent-Bcc: 
26 Resent-Date: Wed, 29 Nov 2000 03:50:06 +0000
27 Newsgroups: riva.lists.debian.user
28 Approved: cjw44@riva.ucam.org
29 Lines: 96
30 Xref: riva.ucam.org riva.lists.debian.user:37376
31
32
33 --9crTWz/Z+Zyzu20v
34 Content-Type: multipart/mixed; boundary="uxuisgdDHaNETlh8"
35 Content-Disposition: inline
36
37
38 --uxuisgdDHaNETlh8
39 Content-Type: text/plain; charset=us-ascii
40 Content-Disposition: inline
41 Content-Transfer-Encoding: quoted-printable
42
43 on Wed, Nov 29, 2000 at 01:32:49AM +0000, Colin Watson (cjw44@flatline.org.=
44 uk) wrote:
45 > kmself@ix.netcom.com wrote:
46 > >Specific instance is an Excel spreadsheet, printed to file from
47 > >StarOffice (that bloated stuck pig of an office suite), then attempting
48 > >to convert the file with mpage to a two-pages-per-sheet with:
49 > >
50 > >    mpage -dp -2 < soffice.ps > soffice-2up.ps
51 > >
52 > >Viewing (or printing) the results with gv flashes up the rendered
53 > >content for a moment, then blanks the page.  'gs' has similar results.
54 > >This appears to be a problem noted by others (Google, Deja turn up some
55 > >references), but I can't seem to find a fix.
56 >=20
57 > Hm. I can't help with mpage, I'm afraid. As a workaround, have you tried
58 > psnup (from the psutils package)? Of course, you'll have to cause the
59 > PostScript file to contain its original self twice, perhaps using
60 > psmerge. Sorry if a workaround wasn't what you were after.
61
62 Thanks, psnup *does* do the trick.  I've been using mpage for a few
63 years, so it's going to tough to kick the habit, but that's a good one
64 to know.
65
66 The problem, according to web searches, is broken PS output by
67 StarOffice.  One fix is to use a set of ps2ps commands to produce
68 rectified, Level-1 postscript.  From a set of commands found online,
69 I've created the attached 'sopsvirginizer' script -- it un-fscks
70 StarOffice postscript output.=20
71
72 --=20
73 Karsten M. Self <kmself@ix.netcom.com>     http://www.netcom.com/~kmself
74  Evangelist, Zelerate, Inc.                      http://www.zelerate.org
75   What part of "Gestalt" don't you understand?      There is no K5 cabal
76    http://gestalt-system.sourceforge.net/        http://www.kuro5hin.org
77
78 --uxuisgdDHaNETlh8
79 Content-Type: text/plain; charset=us-ascii
80 Content-Disposition: attachment; filename=sopsvirginizer
81
82 #!/bin/sh
83
84 # This script virginizes (de-fucks) StarOffice postscript, for use in
85 # mpage and other tools.
86 # Author: Karsten M. Self
87 # Date: Tuesday, November 28, 2000
88 # Credits:  George Smiley (georgesmiley@my-deja.com) for the idea
89 # License:  This work is public domain
90 # ----------------------------------------
91 # Arguments:  $1= infile, $2= outfile
92 # ----------------------------------------
93
94 if [ X$1 = "X" -o X$2 = "X" ]; then
95     echo "usage:  $( basename $0 ) infile outfile" 1>&2; exit 1
96 fi
97
98 export PATH=/usr/bin:/bin
99 TMPFILE=$( mktemp /tmp/sops1.XXXXXX ) || exit 1
100 trap 'rm -f $TMPFILE; exit 1' 1 2 3 13 15
101
102 ps2ps $1 $TMPFILE && ps2ps -dLanguageLevel=1 $TMPFILE $2
103 rm -f $TMPFILE
104
105 --uxuisgdDHaNETlh8--
106
107 --9crTWz/Z+Zyzu20v
108 Content-Type: application/pgp-signature
109 Content-Disposition: inline
110
111 -----BEGIN PGP SIGNATURE-----
112 Version: GnuPG v1.0.4 (GNU/Linux)
113 Comment: For info see http://www.gnupg.org
114
115 iD8DBQE6JHncOEeIn1XyubARAn4OAJ9SJctkxOTl64vF3fMOkWzJScToCgCfa4KK
116 3zCwRibuVRWTOZPNVhiLwbA=
117 =RPmJ
118 -----END PGP SIGNATURE-----
119
120 --9crTWz/Z+Zyzu20v--
121
122
123 -- 
124 To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
125 with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
126
127
128
129