Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

merging PostScript files

76 views
Skip to first unread message

Bomber72

unread,
Dec 24, 2000, 12:40:15 PM12/24/00
to
I desperately need to merge various .ps files in a single .ps file.

I tried with a perl script from psutils, but it seems it works only in very
special cases, for example if the input files have been generated in the
same way, from the same program.

This is not my case. Does anybody knows alternative utilities? May be I can
go trough pdf to merge everything?

Thanks


Thomas Esser

unread,
Dec 24, 2000, 3:53:51 PM12/24/00
to
Bomber72 <tullio....@aquila.infn.it> wrote:
> This is not my case. Does anybody knows alternative utilities? May be I can
> go trough pdf to merge everything?

A much better job does ghostscript. For Unix, I use:
gs -q -dNOPAUSE -dBATCH -sDEVICE=pswrite -sOutputFile=- -c save pop -f file1 file2 ...

Thomas

RockMover

unread,
Dec 24, 2000, 6:54:55 PM12/24/00
to
Hello,


Thomas Esser wrote:
> Bomber72 <tullio....@aquila.infn.it> wrote:
> > This is not my case. Does anybody knows alternative utilities? May be I
can
> > go trough pdf to merge everything?

BTW, psmerge in my teTeX 0.9 is completely broken, it does not work
correctly regardless of what documents as feed it with. Is it fixed in the
latest teTeX?

> A much better job does ghostscript. For Unix, I use:
> gs -q -dNOPAUSE -dBATCH -sDEVICE=pswrite -sOutputFile=- -c save pop -f
file1 file2 ...

And BTW, can one explain me about this "save pop" thing, is this a trick?
If so, is it dirty? How does it work?

> Thomas

Thank you.

WBR, RockMover
I am The Master of Flame...

Heiko Oberdiek

unread,
Dec 25, 2000, 3:15:29 AM12/25/00
to
On Mon, 25 Dec 2000 01:54:55 +0200, "RockMover"
<rmo...@golovolomka.net> wrote:

> BTW, psmerge in my teTeX 0.9 is completely broken, it does not work
>correctly regardless of what documents as feed it with. Is it fixed in the
>latest teTeX?

A very long time ago teTeX jumped over the 1.0 wall.
So an update is not a bad idea.

>> A much better job does ghostscript. For Unix, I use:
>> gs -q -dNOPAUSE -dBATCH -sDEVICE=pswrite -sOutputFile=- -c save pop -f
>file1 file2 ...
>
> And BTW, can one explain me about this "save pop" thing, is this a trick?

Yes. The file ps2pdf of ghostscript uses the same trick.
The comment there says:
Doing an initial 'save' helps keep fonts from being
flushed between pages.
(Without the trick, the fonts are reloaded every page.)

Yours sincerely
Heiko <ober...@ruf.uni-freiburg.de>

Thomas Esser

unread,
Dec 25, 2000, 11:00:19 AM12/25/00
to
RockMover <rmo...@golovolomka.net> wrote:
> BTW, psmerge in my teTeX 0.9 is completely broken, it does not work

psmerge is not part of teTeX.

Thomas

RockMover

unread,
Dec 25, 2000, 4:12:15 PM12/25/00
to
Hello,

Heiko Oberdiek wrote:
> On Mon, 25 Dec 2000 01:54:55 +0200, "RockMover"
> <rmo...@golovolomka.net> wrote:
>
> > BTW, psmerge in my teTeX 0.9 is completely broken, it does not work
> >correctly regardless of what documents as feed it with. Is it fixed in
the
> >latest teTeX?
>
> A very long time ago teTeX jumped over the 1.0 wall.
> So an update is not a bad idea.

I will.

> >> A much better job does ghostscript. For Unix, I use:
> >> gs -q -dNOPAUSE -dBATCH -sDEVICE=pswrite -sOutputFile=- -c save
pop -f
> >file1 file2 ...
> >
> > And BTW, can one explain me about this "save pop" thing, is this a
trick?
>
> Yes. The file ps2pdf of ghostscript uses the same trick.
> The comment there says:
> Doing an initial 'save' helps keep fonts from being
> flushed between pages.
> (Without the trick, the fonts are reloaded every page.)

Yes I saw this in ps2pdf script but my basic knowlege of postscrips is not
enough to understand why saving the state (w/o restoring it!) has such an
effect.

> Yours sincerely
> Heiko <ober...@ruf.uni-freiburg.de>

Merry Christmas, and Happy New Year, New Century and New Millenium!

RockMover

unread,
Dec 25, 2000, 4:06:15 PM12/25/00
to
Hello,

Really it is not, I forgot it, sorry. I have well tuned teTeX 0.9 but I
will certainly upgrade to the last version soon. In next millenium...

> Thomas

So, merry Xmas! and happy New Year.

Victor Wagner

unread,
Dec 25, 2000, 12:59:44 AM12/25/00
to
Bomber72 <tullio....@aquila.infn.it> wrote:
: I desperately need to merge various .ps files in a single .ps file.


ghostscript.

gs -sDEVICE=pswrite -sOutputFile=merged.ps file1.ps file2.ps ...

Add -dBATCH, -dNOPAUSE and -q according to taste.

Aladdin Ghostscript >= 6.0 is recommended.

--
The core is not frozen, but slushy.
-- Larry Wall in <1997051019...@wall.org>

Bomber72

unread,
Dec 26, 2000, 4:18:08 AM12/26/00
to
> gs -sDEVICE=pswrite -sOutputFile=merged.ps file1.ps file2.ps ...
>
> Add -dBATCH, -dNOPAUSE and -q according to taste.
>
> Aladdin Ghostscript >= 6.0 is recommended.
>
> --

I tied with the suggested methods, but it seems it does not work.
In particular, one ot the file I need to attach is readable through gv, but
gives errors if opened with gs.
For those who want to help me further (PLEASE!!) the above file can be
downloaded here

http://www.iop.org/EJ/S/UNREG/abstract/0953-8984/12/37/302

Thanks again to everybody.
Tullio

PS I use gs 5.50, is this the problem??


Heiko Oberdiek

unread,
Dec 26, 2000, 7:40:08 AM12/26/00
to
On Tue, 26 Dec 2000 09:18:08 GMT, "Bomber72"
<tullio....@aquila.infn.it> wrote:

>> gs -sDEVICE=pswrite -sOutputFile=merged.ps file1.ps file2.ps ...

>I tied with the suggested methods, but it seems it does not work.

command not found, error message, ...?

>In particular, one ot the file I need to attach is readable through gv, but
>gives errors if opened with gs.

gv is only a front-end for ghostscript.

>PS I use gs 5.50, is this the problem??

6.01 or higher is a better choice.

Yours sincerely
Heiko <ober...@ruf.uni-freiburg.de>

Bomber72

unread,
Dec 26, 2000, 2:35:36 PM12/26/00
to
I downloaded again the .ps file and now it works.
It seems it depends on the way I download it.
Windows and Unix download and subsequent unzipping gives the same positive
result for gv BUT NOT FOR gs !

Thanks again to everybody...
TS


Ulrich Scholz

unread,
Dec 27, 2000, 7:18:09 AM12/27/00
to
Thomas Esser wrote:
>
> A much better job does ghostscript. For Unix, I use:
> gs -q -dNOPAUSE -dBATCH -sDEVICE=pswrite -sOutputFile=- -c save pop -f file1 file2 ...
>
> Thomas

This helps to merge the files. Unfortunately, this also prevents
antialiasing. Is it possible to do both at once?

Uli

--
Ulrich Scholz

sch...@informatik.tu-darmstadt.de
http://www.intellektik.informatik.tu-darmstadt.de/~scholz/

Victor Wagner

unread,
Dec 31, 2000, 7:05:43 AM12/31/00
to
Ulrich Scholz <sch...@informatik.tu-darmstadt.de> wrote:

: Thomas Esser wrote:
:>
:> A much better job does ghostscript. For Unix, I use:
:> gs -q -dNOPAUSE -dBATCH -sDEVICE=pswrite -sOutputFile=- -c save pop -f file1 file2 ...
:>
:> Thomas

: This helps to merge the files. Unfortunately, this also prevents
: antialiasing. Is it possible to do both at once?

Do you use Ghostscript 6.0 or newer?
: Uli

: --
: Ulrich Scholz

: sch...@informatik.tu-darmstadt.de
: http://www.intellektik.informatik.tu-darmstadt.de/~scholz/

--
The documentation is in Japanese. Good luck.
-- Rich $alz

Ulrich Scholz

unread,
Jan 2, 2001, 8:06:59 AM1/2/01
to
Victor Wagner wrote:
>

> Thomas Esser wrote:
> Do you use Ghostscript 6.0 or newer?

Yes I do:

%!PS-Adobe-3.0
%%Pages: (atend)
%%BoundingBox: 51 137 570 788
%%HiResBoundingBox: 51.400000 137.500000 569.300000 787.300000
%...................................
%%Creator: AFPL Ghostscript 650 (pswrite)
%%CreationDate: 2001/01/02 14:05:13
%%DocumentData: Clean7Bit
%%LanguageLevel: 2
%%EndComments

0 new messages