Reputation: 27855
At least with gs 9.06 ps2pdf does not work like this any more:
cat foo1.ps foo2.ps | ps2pdf - out.pdf
How can I convert several Postscript files to one PDF?
Upvotes: 0
Views: 1692
Reputation: 27855
I found the solution here: ps2pdf Docs
This works, here called from Python:
import subprocess
cmd=['gs', '-q', '-dSAFER', '-dNOPAUSE', '-dBATCH',
'-dDisableFAPI',
'-sOutputFile=%s' % pdf,
'-sDEVICE=pdfwrite',
'-c', '.setpdfwrite', '-f'
]
cmd.extend(ps_files)
subprocess.check_call(cmd)
Upvotes: 1