hello I have many pdf files and I eant to convert to .eps using python.
I have find some codes but don't work for me that codes execute without some error but I don't take some .eps file .
any idea ?
I have python 2.7.13
code 1 :
from glob import *
from os import system
fileList = glob('*.pdf')
for f in fileList:
system('pdftops -eps {0}'.format(f))
code 2 :
import os, re, sys
dirList = os.listdir( '.' )
try:
os.mkdir( 'EpsFigs' )
except:
pass
for f in dirList:
m = re.match('([\w\-]+).(|jpg|jp2|png|pdf|)$',f)
if m:
cmd = 'convert %s EpsFigs/%s.eps'%( f, m.group(1) )
os.system(cmd)