Mailinglist Archive: opensuse (4053 mails)

< Previous Next >
Re: [SLE] Printing tiff files?
  • From: (Ted Harding) <Ted.Harding@xxxxxxxxxxxxxxxx>
  • Date: Thu, 02 Aug 2001 08:57:45 +0100 (BST)
  • Message-id: <XFMail.010802085745.Ted.Harding@xxxxxxxxxxxxxxxx>
On 02-Aug-01 Steven T. Hatton wrote:
> Alexandr,
> Thanks. That got me over the first hurdle. Now I have over 500
> individual postscript files which I would like to be able to print in
> such a way as to form a book consisting of sections of ten sheet
> each. I attempted to use psmerge to join the individual postscrip
> files into larger postscrip files. That didn't seem to work.

Hmmm. It looks as though 'psmerge' doesn't work at all (at any rate
not as described in "man psmerge"): just tried it with a few diffferent
combinations of PS files, and all I got as output was the PS prologue,
but no content.

> Is there a way to format a spool file so that two postscript file
> will be printed on the same face and in landscape orientation?
> When I already have my document in a postscript file I typically use
> psbook and psnup, but I don't think these will do any good in this
> situation. Just to be clear. I have a postscript file for each page.
> These were created by using convert on the tiff files.

Assuming your per-page PS files are valid EPS (Encapsulated PS) files,
which they probably are (they only need a %%BoundingBox line inside)[*],
then the following (which is a bit of a sledgehammer for this nut -- pity
psmerge is a duffer) should work.

1. Prepare a text file (e.g. "") with the following content
(this is for A4 paper; for e.g. letter paper change the dimensions in
".landscape_metrics" --
.pl = "page length" which in landscape = width of sheet of paper = 8i
in letter,
PO = page offset (blank left margin) -- reduce this at least to 1i
for letter,
LL = line length ; maybe reduce this to 9.0i in letter):

.de landscape_metrics
.pl 8.142i
.nr PO 1.195i
.nr LL 9.5i
.lt \\n[LL]u
.nr LT \\n[LL]u
.PSPIC 4.0i
.PSPIC 4.0i
.PSPIC 4.0i
.PSPIC 4.0i

and so on, until you have entered all the pages you want for one
bundle.(By the way, the 4.0i may also be a bit wide for letter;
it's OK for A4 though; try reducing it if you only get 1 original
page per output page). Also try tweaking other metrics to get a
more satisfactory layout.

Then, with this text file in the same directory as your page_*.ps
files, run

groff -Tps -P-l -ms >

(where the "l" in -P-l is a lower case letter "ell") and you should
have your first bundle of pages, 2-up, and landscape.

In principle it is easy to set up a shell script to do this for all
your 500 pages. For each bundle, you feed the script the name of the
output "" and the list of original pages ... for that bundle, and it should "echo" the header (down to .2C)
">", then echo ">" the succeeding lines until the
list of original pages for the bundle is exhausted. Then it runs
the 'groff' command as above with ">".

Try it first on say 4 original pages until you get it right.

[*] If there are problems with the PS files converted from tiff
not being good EPS files, try using 'convert' to output to page_*.eps
instead of to page_*.ps -- that should force it.

(From my experience with PS files converted from tiff, your output
files may be huge: hopefully your printer won't choke. You should
be able to at least view them in 'gv' though).

Good luck,

E-Mail: (Ted Harding) <Ted.Harding@xxxxxxxxxxxxxxxx>
Fax-to-email: +44 (0)870 167 1972
Date: 02-Aug-01 Time: 08:57:45
------------------------------ XFMail ------------------------------

< Previous Next >