From: JazzyNico Date: Fri, 8 Oct 2010 12:42:42 +0000 (+0200) Subject: Import. dEPSCrop option added to EPS to PDF convertion (Bug #649842: import from... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=020a37e330fd5c663ee8ba2738dbaed5177bf7b4;p=inkscape.git Import. dEPSCrop option added to EPS to PDF convertion (Bug #649842: import from EPS ignores bounding box) --- diff --git a/share/extensions/eps_input.inx b/share/extensions/eps_input.inx index 14f33764d..411d82cd8 100644 --- a/share/extensions/eps_input.inx +++ b/share/extensions/eps_input.inx @@ -5,6 +5,7 @@ org.inkscape.input.pdf ps2pdf ps2pdf-ext.py + true .eps image/x-encapsulated-postscript diff --git a/share/extensions/ps2pdf-ext.py b/share/extensions/ps2pdf-ext.py index d3bc3d052..3d137e9b4 100644 --- a/share/extensions/ps2pdf-ext.py +++ b/share/extensions/ps2pdf-ext.py @@ -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