Merging PostScript (.ps) files
I recently had to merge the output of a bunch of academic papers I had written in Latex. Each file uses a document class from a range of academic journals (has its own title, abstract, bibliography etc).
I could have made a single Latex file and shoe horned each individual file into it, but I knew there had to be a better (less labour intensive) way.
Using Latex you can create pdf (using dvipdfm) or ps (using dvips) files. There are various ways to merge pdf files (pdfsam) and ps files (using ghostscript).
However the quality of the merged file I produced was always very poor. Eventually (after much googling) I found a solution
gswin32c.exe -dNOCACHE -dNOPAUSE -sDEVICE=pswrite -dBATCH -sOutputFile=Output.ps Input1.ps Input2.ps Input3.ps Input4.ps
The “-dNOCACHE” option preserves the quality of the output file. The output file however is very large.
To ensure the page numbers in the merged document are continuous you can use the Latex command “\setcounter{page}{X}”
Leave a Reply
Want to join the discussion?Feel free to contribute!