Problem: you have a bunch of .ps files that you want to
combine (concatenate) into a single file.
Intuitive solution: Use href=“http://www.cs.virginia.edu/cgi-bin/manpage?section=1&topic=psmerge”>psmerge.
But because psmerge only works if the same program created
all of the .ps files, this isn’t a general solution.
Real solution: I found the solution (for the second time, I’ve
had to do this before) on href=“http://www.stanford.edu/~moonhawk/technical/C1912567120/E1617423044/”>this
site. Instead of psmerge, you use href=“http://www.cs.virginia.edu/cgi-bin/manpage?section=1&topic=gs”>gs,
which produces almost exactly what we want:
gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=output.pdf *.ps
It’s almost what we want because this produces a .pdf file,
not a .ps file. One could change the command to
gs -dBATCH -dNOPAUSE -sDEVICE=pswrite -sOutputFile=output.ps *.ps
...but that makes the output look awful (on the one set of documents
on which I tried it). As does running output.pdf through
There’s probably a moral to this story, but I can’t think of it at the