summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 140cab8)
raw | patch | inline | side by side (parent: 140cab8)
author | JazzyNico <nicoduf@yahoo.fr> | |
Fri, 8 Oct 2010 12:42:42 +0000 (14:42 +0200) | ||
committer | JazzyNico <nicoduf@yahoo.fr> | |
Fri, 8 Oct 2010 12:42:42 +0000 (14:42 +0200) |
share/extensions/eps_input.inx | patch | blob | history | |
share/extensions/ps2pdf-ext.py | patch | blob | history |
index 14f33764db3507100c5b842e8e9b2faeabf7a03d..411d82cd8b0321417967269232efbb0f17c554d1 100644 (file)
<dependency type="extension">org.inkscape.input.pdf</dependency>
<dependency type="executable" location="path">ps2pdf</dependency>
<dependency type="executable" location="extensions">ps2pdf-ext.py</dependency>
+ <param name="dEPSCrop" type="boolean" gui-hidden="true">true</param>
<input>
<extension>.eps</extension>
<mimetype>image/x-encapsulated-postscript</mimetype>
index d3bc3d052776452470060492a54af7fed22e5f3d..3d137e9b4d220b7eb9966133711e08cec47f055e 100644 (file)
import sys
from run_command import run
-run('ps2pdf "%s" "%%s"' % sys.argv[1].replace("%","%%"), "ps2pdf")
+cmd = 'ps2pdf'
+if (sys.argv[1] == "--dEPSCrop=true"): cmd += ' -dEPSCrop '
+
+run((cmd+' "%s" "%%s"') % sys.argv[-1].replace("%","%%"), "ps2pdf")
# vim: expandtab shiftwidth=4 tabstop=8 softtabstop=4 encoding=utf-8 textwidth=99