Pregunta

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?

¿Fue útil?

Solución

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)
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top