View Issue Details

IDProjectCategoryView StatusLast Update
0015120ScribusScripterpublic2018-02-08 10:02
Reportertweller Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status newResolutionopen 
Product Version1.5.3 
Summary0015120: SVG export via Python scripting
DescriptionScribus can export SVG files via File/Export/Save as SVG... but it cannot export via Python.
Steps To Reproduceimport scribus
export=scribus.ImageExport()
print(export.allTypes)

SVG is not in the list of supported formats
TagsNo tags attached.
PatchNo

Activities

jurajF

2018-02-02 17:52

reporter   ~0044911

scribus.ImageExport() is equivalent to File>Export>Save as Image, and it support only images type as this dialog does.
File>Export>Save as SVG is implemented in plugin. I do not know how (or even if it is possible) to make binding in scriptplugin for functionality provided from another plugin.

ale

2018-02-05 19:24

manager   ~0044920

... somehow, i wonder if this is really needed.

just export to pdf and then convert the pdf to svg... or do you see any inconvenience in it?

tweller

2018-02-06 07:19

reporter   ~0044923

While googling the Internet on solutions for converting EPS file to SVG, I found that Scribus is the solution.
Scribus can open EPS files and export as SVG. That's exactly what I need.
It is already possible to export EPS to PDF and then convert PDF to SVG.
To answer the question: yes, the intermediate PDF step is quite inconvenient.

jurajF

2018-02-06 12:29

reporter   ~0044929

Scribus is not perfect tool to be used as image converter.
There is a program called 'convert' from imagemagic package that could serve you better.
Or you could try inkscape - it can open eps file and save as svg.

tweller

2018-02-07 07:28

reporter   ~0044933

Inkscape cannot open EPS files. That's why I am looking for a converter in the first place. I think I'm up to date with version 0.92. It's not possible to import EPS files. I have tried drag'n'drop as well as File/Import and File/Open. I tried with 7 different EPS files.

ImageMagick cannot convert vector graphics. It will rasterize the EPS first and then convert it into an SVG. I used mogrify -format svg *.eps

I'm sorry. I can understand that this scenario is not one of the main features of Scribus and I don't expect you to implement that soon. But if you find a way, some time, may ...

ale

2018-02-07 10:52

manager   ~0044937

so scribus will convert your eps to pdf and you will use inkscape to convert the pdfs to svg.

anyway, scribus *is not a conversion tool* but you're very welcome to abuse it for your needs.
the only sorrows i have: that abuses lead to bloat.

and inkscape *does* import eps, when correctly configured (or when installed on a good system : - )
https://inkscapetutorials.wordpress.com/2014/05/22/how-to-import-eps-into-inkscape-on-windows/

tweller

2018-02-07 11:13

reporter   ~0044938

That linked Ghostscript stuff may work, but it's brittle and will run through a PDF converter as well. Exporting to PDF is not trivial, there are many formats.
Inkscape will have losses in detail and in text (e.g. white space may be missing).
Sure, Scribus is not a conversion tool, so feel free to close this issue as invalid.
Anyway, Scribus is open source and maybe I can fork it in order to build a pure EPS to SVG converter.

jurajF

2018-02-07 13:31

reporter   ~0044942

On my system both of those 2 commands work:
$ convert file.eps file.svg
$ inkscape --verb=FileSaveAs file.eps
Unfortunately Inkscape pop up GUI.
Not sure how you would be satisfied with result.

tweller

2018-02-08 10:02

reporter   ~0044946

`convert file.eps file.svg` converts the EPS to SVG, that's true. Have you opened the SVG file? It's a SVG file that contains a bitmap graphic. It has been rasterized.
The inkscape command does not work on my machine: "Failed to load the requested file C:\...", the same error message that I get when I try to open the file manually. Perhaps you have already installed that Ghostscript stuff as linked before.

Issue History

Date Modified Username Field Change
2018-01-30 14:29 tweller New Issue
2018-01-30 14:43 jghali Priority high => normal
2018-02-02 17:52 jurajF Note Added: 0044911
2018-02-05 19:24 ale Note Added: 0044920
2018-02-06 07:19 tweller Note Added: 0044923
2018-02-06 12:29 jurajF Note Added: 0044929
2018-02-07 07:28 tweller Note Added: 0044933
2018-02-07 10:52 ale Note Added: 0044937
2018-02-07 11:13 tweller Note Added: 0044938
2018-02-07 13:31 jurajF Note Added: 0044942
2018-02-08 10:02 tweller Note Added: 0044946