Created
June 3, 2017 10:21
-
-
Save anbara/11ec16a0152e0b3b1a8fc95007430d40 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
from subprocess import Popen | |
import os | |
os.mkdir('eps') | |
file = glob.glob('ps/*') | |
print(file) | |
for num in range(len(file)): | |
print(num) | |
cmd = 'ps2eps ' + file[num] | |
popen = Popen(cmd, shell=True) | |
popen.wait() | |
badeps = glob.glob('ps/*.eps') | |
for num2 in range(len(badeps)): | |
print(num2) | |
ok = os.path.basename(badeps[num2]) | |
cmd2 = 'gswin64c -o eps/' + ok + ' -dNoOutputFonts -sDEVICE=eps2write ps/' + ok | |
popen2 = Popen(cmd2, shell=True) | |
popen2.wait() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment