Code

Import. dEPSCrop option added to EPS to PDF convertion (Bug #649842: import from...
[inkscape.git] / share / extensions / ps2pdf-ext.py
index d3bc3d052776452470060492a54af7fed22e5f3d..3d137e9b4d220b7eb9966133711e08cec47f055e 100644 (file)
@@ -24,6 +24,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 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