문제

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?

도움이 되었습니까?

해결책

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)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top