Add ai, pdf output formats, tweak dxf and plt

This commit is contained in:
Florian Festi 2016-07-22 22:58:18 +02:00
parent 284857d94a
commit 21948ade3b
1 changed files with 4 additions and 3 deletions

View File

@ -12,9 +12,11 @@ class Formats:
formats = { formats = {
"svg" : None, "svg" : None,
"ps" : None, "ps" : None,
"dxf" : "-f dxf -mm".split(), "dxf" : "-flat 0.1 -f dxf:-mm".split(),
"gcode" : "-f gcode".split(), "gcode" : "-f gcode".split(),
"plt" : "-f hpgl".split(), "plt" : "-f plot-hpgl".split(),
"ai" : "-f ps2ai".split(),
"pdf" : "-f pdf".split(),
} }
http_headers = { http_headers = {
@ -68,7 +70,6 @@ class Formats:
else: else:
fd, tmpfile = tempfile.mkstemp() fd, tmpfile = tempfile.mkstemp()
cmd = [self.pstoedit] + self.formats[fmt] + [filename, tmpfile] cmd = [self.pstoedit] + self.formats[fmt] + [filename, tmpfile]
print(cmd)
err = subprocess.call(cmd) err = subprocess.call(cmd)
if err: if err:
# XXX show stderr output # XXX show stderr output