python Library
svg2pdf
Keine Erläuterungen gefunden.
import os, sys import glob #look for alls files with a specific extension import getopt opts, args = getopt.getopt(sys.argv[1:],"p:",["path="]) for o,a in opts: if o in ('-p','--path'): path = a else: path = "./convert/" fnames = glob.glob(path + "/*.svg") mode = "svg2pdf" #mode = "croppdf" for f in fnames: filename = f[0:f.rfind(".")].replace("\\", "/") if mode=="svg2pdf": outFile = filename + ".pdf" cmd = "inkscape --export-filename=" + outFile + " " + f else mode=="croppdf": cmd = "inkscape " + filename + ".svg --export-area-drawing --export-overwrite" os.system(cmd)
Index of Library
Der gesamte Sourcecode darf gemäß GNU General Public License weiterverbreitet werden.