From 020a37e330fd5c663ee8ba2738dbaed5177bf7b4 Mon Sep 17 00:00:00 2001 From: JazzyNico Date: Fri, 8 Oct 2010 14:42:42 +0200 Subject: [PATCH] Import. dEPSCrop option added to EPS to PDF convertion (Bug #649842: import from EPS ignores bounding box) --- share/extensions/eps_input.inx | 1 + share/extensions/ps2pdf-ext.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) 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 -- 2.30.2