| |
@@ -73,13 +73,13 @@
|
| |
filename = os.path.join(os.getenv("PWD"), filename)
|
| |
try:
|
| |
if output_format == 'png':
|
| |
- run_command(['inkscape', '-C', '-z', '-d', str(dpi), '-e',
|
| |
+ run_command(['inkscape', '-C', '-z', '-d', str(dpi), '-o',
|
| |
filename, svgfilename])
|
| |
elif output_format == 'pdf':
|
| |
- run_command(['inkscape', '-C', '-z', '-T', '-A', filename,
|
| |
+ run_command(['inkscape', '-C', '-z', '-T', '-o', filename,
|
| |
svgfilename])
|
| |
elif output_format == 'eps':
|
| |
- run_command(['inkscape', '-C', '-z', '-T', '-E', filename,
|
| |
+ run_command(['inkscape', '-C', '-z', '-T', '-o', filename,
|
| |
svgfilename])
|
| |
else:
|
| |
os.remove(svgfilename)
|
| |
@@ -102,10 +102,11 @@
|
| |
"""
|
| |
filename = os.path.join(os.getenv("PWD"), filename)
|
| |
svgfilename = svg_to_file(xmlstring)
|
| |
- args = ['inkscape', '-C', '-z', '-T', '-E', '/dev/stdout', svgfilename]
|
| |
- eps = run_command(args)[0]
|
| |
+ args = ['inkscape', '-C', '-z', '-T', '--export-type=eps', svgfilename]
|
| |
+ run_command(args)[0]
|
| |
+ epsfilename = svgfilename[0:-3] + 'eps'
|
| |
if converter:
|
| |
- eps = eps_cmyk_convert(eps, converter)
|
| |
+ eps = eps_cmyk_convert(epsfilename, converter)
|
| |
width = int(math.ceil(convert(user_width + (user_bleed * 2), unit, 'in') *
|
| |
dpi))
|
| |
height = int(math.ceil(convert(user_height + (user_bleed * 2), unit, 'in')
|
| |
@@ -115,14 +116,15 @@
|
| |
'-sOutputFile=%s' % filename, '-', '-c', 'quit']
|
| |
|
| |
run_command(args, eps)
|
| |
+ os.remove(epsfilename)
|
| |
os.remove(svgfilename)
|
| |
return True
|
| |
|
| |
|
| |
def eps_cmyk_convert(epsdata_in, converter):
|
| |
# first, normalize the output through eps2eps
|
| |
- args = ['eps2eps', '/dev/stdin', '/dev/stdout']
|
| |
- epsdata = run_command(args, epsdata_in)[0]
|
| |
+ args = ['eps2eps', epsdata_in, '/dev/stdout']
|
| |
+ epsdata = run_command(args)[0]
|
| |
epsdata_new = ''
|
| |
# go through each line and check for color commands
|
| |
for line in epsdata.decode().split('\n'):
|
| |
The CLI changed ... Effective in f32