opening EPS, PS and SK files on Ubuntu Breezy (may work on other distros)
As asked on the Jabber Conference Room and IRC channel, it seems some people (and I was one of them too) can't open EPS files in Inkscape.
I realised that the *.eps option didn't even show up in the masking filetypes during File/open.
So I tried to find why and found what to do in order to make this work. Some (All) of these steps can be easily done on every linux distro I think
Could someone else try these steps to give feedback ?
I don't really know where to say this, so I try here, maybe someone will be kind enough to complete, test and put it somewhere on the wiki for desperate users...
mtou
--------------------------------------------------------- * In order to be able to open *.eps files, you need gs (ghostscript) installed AND to be able to open *.ps files (as read in share/extensions/eps_input.inx)
* In order to be able to open *.ps files, you need pstoedit installed AND to be able to open *.sk files (as read in ps_input.inx)
* In order to be able to open *.sk files, you need skconvert, which comes with sketch, which as been recently renamed to skencil I think (as read in sk_input.inx)
So, what I done on my ubuntu breezy distro was to install all that was missing in these dependencies.
sudo apt-get install gs pstoedit sketch
Now, *.eps, *.ps and *.sk filetypes can be opened in the breezy inkscape package.
But...
some error still occur during the conversion from an sk file to the final svg file. In fact, to open an eps file, we ask gs to convert it to a *.ps file, pstoedit to convert it to an *.sk file and then skconvert (via ../inkscape/share/extensions/sk2svg.sh) to convert it to an *.svg file inkscape can open and edit.
the first 2 conversion worked very well, but the last one, using skconvert was broken.
The guilty is the sketch version (0.6.15-1ubuntu2 as I speak) which has a broken feature while reading the file and trying to parse the sk file (sketch bug report here : https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1025599...)
So I uninstalled the "broken" sketch package, and tried to install the debian unofficial package from http://www.nongnu.org/skencil/download.html
Its dependencies were broken because it needed python2.3 and the 2.4 version is already installed on my computer, so I threw it away not to mess up with my libraries.
Last thing that could have been done was to compile the last sketch(skencil) version from source So I downloaded the skencil-0.6-17.tar.gz tar ball from http://www.nongnu.org/skencil/download.html copied it in my /usr/src and then untarred it (for ubuntu users : make sure you are in group src to be able to write in the /usr/src directory) then go to the skencil sources directory and try the setup to configure
my system lacked python, tcl and tk development packages, so I need to install them sudo apt-get install python2.4-dev tcl8.4-dev tk8.4-dev
after that, when you try to configure (./setup.py configure), it works like a charm
you then need to compile (./setup.py build) and install (./setup.py install)
if you want to install this in the directory you want (and I highly recommend that no to mess up with the package system), you just need to pass an --prefix option to setup.py
when it's fully installed, the skconvert works very well and inkscape load eps, ps and sk files without a hitch
----------------------- For developpers now :
The errors reported when the import does not work is really not user friendly When sketch isn't installed, the only thing inkscape tells us is that the tempfile /tmp/XXXXXXsdfgjndrg.svg is not found
Could someone look to change the *.inx files to require a _working_ version of sketch and no only the skconvert utility ? Is it hard to do ?
On 8 déc. 05, at 11:53, Mathieu Dimanche wrote:
For developpers now :
The errors reported when the import does not work is really not user friendly When sketch isn't installed, the only thing inkscape tells us is that the tempfile /tmp/XXXXXXsdfgjndrg.svg is not found
Could someone look to change the *.inx files to require a _working_ version of sketch and no only the skconvert utility ? Is it hard to do ?
the other solution would be to drop the sk conversion. indeed pstoedit is capable of producing svg from eps and ps with the plot- svg backend. but it seems that plot-svg isn't available everywhere. I was supposed to look a little in this problem but haven't had the time to do it. what I can say is that plot-svg is available in: - pstoedit version 3.40 / DLL interface 108 (build Oct 10 2005 : fink package for OS X - pstoedit version 3.33 / DLL interface 108 (build Jul 29 2004 : debian sarge package. if it is on a stable debian I guess that it is probably available in nearly every distro now. so maybe the inx files could be changed. this works for me:
ps_input.inx: ---------------------------------------- <inkscape-extension> <_name>Postscript Input</_name> <id>org.inkscape.input.ps</id> <dependency type="executable">pstoedit</dependency> <input> <extension>.ps</extension> <mimetype>image/x-postscript</mimetype> <_filetypename>Postscript (*.ps)</_filetypename> <_filetypetooltip>Postscript</_filetypetooltip> <output_extension>org.inkscape.output.ps</output_extension> </input> <script> <command reldir="path">pstoedit -f plot-svg</command> </script> </inkscape-extension> --------------------------------------
and maybe: eps_input.inx -------------------------------------- <inkscape-extension> <_name>EPS Input</_name> <id>org.inkscape.input.eps</id> <dependency type="executable">pstoedit</dependency> <input> <extension>.eps</extension> <mimetype>image/x-encapsulated-postscript</mimetype> <_filetypename>Encapsulated Postscript (*.eps)</_filetypename> <_filetypetooltip>Encapsulated Postscript</_filetypetooltip> <output_extension>org.inkscape.output.eps</output_extension> </input> <script> <command reldir="path">pstoedit -f plot-svg</command> </script> </inkscape-extension> -------------------------------------- though current eps_input.inx works also.
this leads to perfect looking svg files. the only problem is with editing these files as explained here: http://wiki.inkscape.org/cgi-bin/wiki.pl?XML_Repair in the example files section. The simple workaround is to copy paste the entire graphics in a new file.
JiHO --- Windows, c'est un peu comme le beaujolais nouveau : a chaque nouvelle cuvee on sait que ce sera degueulasse, mais on en prend quand meme par masochisme. --- http://jo.irisson.free.fr/
jiho wrote:
the other solution would be to drop the sk conversion. indeed pstoedit is capable of producing svg from eps and ps with the plot- svg backend. but it seems that plot-svg isn't available everywhere. I was supposed to look a little in this problem but haven't had the time to do it. what I can say is that plot-svg is available in:
- pstoedit version 3.40 / DLL interface 108 (build Oct 10 2005 : fink
package for OS X
- pstoedit version 3.33 / DLL interface 108 (build Jul 29 2004 : debian
sarge package. if it is on a stable debian I guess that it is probably available in nearly every distro now. so maybe the inx files could be changed. this works for me:
Bryce, were you ever able to get this working in Gentoo?
--Ted
On Thu, Dec 08, 2005 at 09:43:50AM -0800, Ted Gould wrote:
jiho wrote:
the other solution would be to drop the sk conversion. indeed pstoedit is capable of producing svg from eps and ps with the plot- svg backend. but it seems that plot-svg isn't available everywhere. I was supposed to look a little in this problem but haven't had the time to do it. what I can say is that plot-svg is available in:
- pstoedit version 3.40 / DLL interface 108 (build Oct 10 2005 : fink
package for OS X
- pstoedit version 3.33 / DLL interface 108 (build Jul 29 2004 : debian
sarge package. if it is on a stable debian I guess that it is probably available in nearly every distro now. so maybe the inx files could be changed. this works for me:
Bryce, were you ever able to get this working in Gentoo?
Yes, it did, but remember at the time I was looking at doing pdf2svg, and I found going pdf->ps->svg caused more lossage than I thought was feasible. In particular, I was trying to get text to come through as text objects, but as I recall, all the test cases at the time would convert to each letter being a separate path object, and many of those paths weren't accurate representations of the letters. I recall there were some other issues with embedded images and so forth but don't remember the specifics. Overall, while it worked, I was quite dissatisfied with the output.
I also tested the same through Scribus. If I remember right, I wasn't able to load the PDF in scribus directly, but was able to convert it to ps with the commandline pdf/ps converter and then use Scribus to create the SVG. For my test cases, this approach produced the best results, although it wasn't perfect. I don't remember if Scribus was able to preserve the text as text in any of the cases, but at least the results were readable.
This was all a month or two and my recollection's a bit fuzzy, so I may be completely misremembering the situation.
Bryce
participants (4)
-
Bryce Harrington
-
jiho
-
Mathieu Dimanche
-
Ted Gould