How can I import a EPS file into Inkscape?

Post questions on how to use or achieve an effect in Inkscape.
CharlieD
Posts: 45
Joined: Wed Oct 07, 2009 9:29 am

Re: How can I import a EPS file into Inkscape?

Postby CharlieD » Fri Jan 08, 2010 3:00 pm

GS_ Prog in Variable Name, C:\Program Files\gs\gs8.70\lib;C:\Program Files\gs\gs8.70\bin in Variable value, but still no joy with Inkscape and opening ESP files. However, if i point variable value to C:\Program Files\gs\gs8.70\bin\gswin32.exe i can import EPS into Gimp


:? :?

davidh
Posts: 4
Joined: Thu Jan 21, 2010 8:47 am

Re: How can I import a EPS file into Inkscape?

Postby davidh » Thu Jan 21, 2010 8:57 am

Hi,

I wanted to thank eelke also for explaining how to do this. I discovered Inkscape today, after searching for too long for my misplaced CorelDraw 8 install disc. I haven't had to edit vector graphics recently, apparently.

eelke wrote:Inkscape's PS and EPS import now uses Ghostscript instead of pstoedit. If you need to open files of these types, install Ghostscript and make sure the directory with the ps2pdf utility from Ghostscript installation is in your PATH. On importing a file, you will see a preferences dialog, similar to PDF import; for multipage PS files, this dialog allows you to select which page to open.

It works only when you put both links; "bin"and "lib" from Ghostscript in : exc. C:\Program Files\gs\gs8.70\lib;C:\Program Files\gs\gs8.70\bin
Start -> Control Panel -> System -> Advanced; Click on Environment Variables, under System Variables, find PATH (or make it in the new..), and click on it. In the Edit windows

Now it works..


For those of you who might be new to this, here's what I did. Hope this helps Windows users and others:

1. Installed InkScape 0.47 from http://downloads.sourceforge.net/inkscape/Inkscape-0.47-3.exe.
2. Installed GhostScript 0.64 from http://sourceforge.net/projects/ghostscript/files/. I chose gs864w64.exe even though v0.70 was available. Also note that I chose a 64-bit version since I'm running Windows 7 x64.
3. I followed eelke's directions and added the path to the ps2pdf utility that is installed by GhostScript to the existing PATH environment variable.

Navigate Start -> Control Panel -> System -> Advanced (in Windows 7 it's called "Advanced system settings" and is in the left column). In the Advanced tab of the System Properties dialog box, click the Environment Variables... button. In the Environment Variables dialog, locate the "Path" variable in the "System Variables" section and click "Edit..."

Click in the "Variable value:" field and add a semi-colon (";") followed by the path to the "lib" directory (i.e. ";C:\Program Files\gs\gs8.64\lib") then another semi-colon (";") followed by the path to the "bin" directory (i.e. ";C:\Program Files\gs\gs8.64\bin"). In the extremely unlikely case where you don't have a "Path" variable yet, click "New" to add "Path" and then insert the two directories, but without the initial semi-colon, which is used to separate directories from each other (i.e. "C:\Program Files\gs\gs8.64\lib;C:\Program Files\gs\gs8.64\bin").

Note that the path will likely be different on your computer. To find the correct one, open "My Computer" (an Explorer window) and navigate/browse to "C:\". From there, click "Program Files" and look for the directory/folder called "gs". If it's not there, go back to "C:\" (substitute the correct drive letter if Windows is not installed at "C:" on your computer) and look for another "Program Files" directory. There may be more than one [i.e. "Program Files (x86)"].

In the "gs" directory you should see a directory for the version of ghostscript you've installed. Mine is "gs8.64". And in there, among other things, are the "bin" and "lib" directories. Click into either one and copy the location from the Explorer address bar (i.e. "C:\Program Files\gs\gs8.64\bin") to get the correct path to one of them. Enter that path as described above and substitute "lib" for "bin", in this example, and add that path also.

Once done, click "OK" to close the "Edit" dialog, "OK" to close the "Environment Variables" dialog and "OK" to close the "System Properties" dialog. Close the Control Panel window also if you'd like.

* Although I haven't determined if this is necessary, it's good practice: if Inkscape is already running, close it and re-open it. If it's not running, open it now.
* Click File -> Open or File -> Import. I assume that Open starts a fresh drawing, while Import loads the file into the existing drawing.
* If you've navigated to a directory that contains EPS files, they should already appear in the list.
* To verify that these steps are working, locate the "files of type" dropdown box at the bottom of the dialog window. About halfway down the list you'll see "Encapsulated Postscript (*.eps)" which definitely wasn't there before.

Opening/importing the EPS file will launch python in an empty (black) command window, which you may not even see, and then you'll be presented with a "PDF Import Settings" dialog. Click "OK" when the settings are the way you want them. The contents of your file will appear. (Optional: select the object, right-click and choose "Ungroup". This will distinguish it from a bitmap object.)

Kudos to the Inkscape team. And thanks, of course, to the Ghostscript group.

Good luck!

David

CharlieD
Posts: 45
Joined: Wed Oct 07, 2009 9:29 am

Re: How can I import a EPS file into Inkscape?

Postby CharlieD » Thu Jan 21, 2010 11:34 am

Tried as i described in above post and uninstalled gs8.7 and installed gs8.64 and tried C:\Program Files\gs\gs8.64\lib;C:\Program Files\gs\gs8.64\bin and tried it with semi colon at start, but still get "failed to load requested file" message


Can some explain this

I followed eelke's directions and added the path to the ps2pdf utility that is installed by GhostScript to the existing PATH environment variable.



Do i need to put a PATh to this as well as "lib" and "bin" ???



If i change the PATH to those above from the .... \bin\gswin32.exe PATH , GIMP will no longer import EPS files.


:? :?

davidh
Posts: 4
Joined: Thu Jan 21, 2010 8:47 am

Re: How can I import a EPS file into Inkscape?

Postby davidh » Thu Jan 21, 2010 1:39 pm

Hi Charlie,

Sure, I'll explain it. If you go to the folder "C:\Program Files\gs\gs8.64\lib" in an explorer window, you should find ps2pdf there. That's all it means.

Do this: Navigate Start -> Control Panel -> System -> Advanced (in Windows 7 it's called "Advanced system settings" and is in the left column). In the Advanced tab of the System Properties dialog box, click the Environment Variables... button. In the Environment Variables dialog, locate the "Path" variable in the "System Variables" section and click "Edit..."

Copy and Paste EVERYTHING that you find on that line and post it here. Let's start with that.

David

CharlieD
Posts: 45
Joined: Wed Oct 07, 2009 9:29 am

Re: How can I import a EPS file into Inkscape?

Postby CharlieD » Fri Jan 22, 2010 6:21 am

Hi david

I'm using windows Vista

In Edit System Variables i have GS_PROG in Variable name box and i have tried the lib and bin PATH mentioned above in this thread.

I've also tried C:\Program Files\gs\gs8.64\lib\ps2pdf; C:\Program Files\gs\gs8.64\bin PATH and a couple of other concoctions as variable value wth no joy


However, if i input variable value PATH as C:\Program Files\gs\gs8.64\bin\gswin32.exe i can get Gimp to import EPS files, but not Inkscape







Also, this "Encapsulated Postscript (*.eps)" does not appear in any attempts in the drop down box.


As you can probably understand i'm :? :? as to why lib and bin will not work for me, but seems to do for others

CharlieD
Posts: 45
Joined: Wed Oct 07, 2009 9:29 am

Re: How can I import a EPS file into Inkscape?

Postby CharlieD » Fri Jan 22, 2010 6:58 am

Here is what i' have currently in System Variable

Variable Name: GS_PROG
Variable Value : C:\Program Files\gs\gs8.64\lib;C:\Program Files\gs\gs8.64\bin


I've also tried it with the Semi Colon at the start too, but still get the "Failed" message from Inkscape

CharlieD
Posts: 45
Joined: Wed Oct 07, 2009 9:29 am

Re: How can I import a EPS file into Inkscape?

Postby CharlieD » Fri Jan 22, 2010 7:49 am

OK


I cleared errors log and then tried again usinglib and bin PATH above

(Windows Vista OS and Inkscape o.47)



I have no idea what all this means, but here is report from errors log for those who may know.



Extension "Dia Input" failed to load because a dependency was not met.
Dependency:
type: executable
location: extensions
string: dia2svg.sh
description: The dia2svg.sh script should be installed with your Inkscape distribution. If you do not have it, there is likely to be something wrong with your Inkscape installation.

Extension "Dia Input" failed to load because a dependency was not met.
Dependency:
type: executable
location: path
string: dia
description: In order to import Dia files, Dia itself must be installed. You can get Dia at http://live.gnome.org/Dia

Extension "DXF Output" failed to load because a dependency was not met.
Dependency:
type: executable
location: extensions
string: ps2dxf.sh

Extension "DXF Output" failed to load because a dependency was not met.
Dependency:
type: executable
location: path
string: pstoedit
description: pstoedit must be installed to run; see http://www.pstoedit.net/pstoedit

Extension "EPS Input" failed to load because a dependency was not met.
Dependency:
type: executable
location: path
string: ps2pdf

Extension "LaTeX formula" failed to load because a dependency was not met.
Dependency:
type: executable
location: path
string: latex

Extension "LaTeX formula" failed to load because a dependency was not met.
Dependency:
type: executable
location: path
string: dvips

Extension "LaTeX formula" failed to load because a dependency was not met.
Dependency:
type: executable
location: path
string: pstoedit

Extension "XFIG Input" failed to load because a dependency was not met.
Dependency:
type: executable
location: path
string: fig2dev

Extension "GIMP XCF" failed to load because a dependency was not met.
Dependency:
type: executable
location: path
string: gimp

Extension "Text Outline Input" failed to load because a dependency was not met.
Dependency:
type: executable
location: path
string: perl

Extension "PostScript Input" failed to load because a dependency was not met.
Dependency:
type: executable
location: path
string: ps2pdf

Extension "Sketch Input" failed to load because a dependency was not met.
Dependency:
type: executable
location: extensions
string: sk2svg.sh

Extension "Sketch Input" failed to load because a dependency was not met.
Dependency:
type: executable
location: path
string: skconvert

Extension "Text Input" failed to load because a dependency was not met.
Dependency:
type: executable
location: path
string: perl
Last edited by CharlieD on Fri Jan 22, 2010 7:57 am, edited 3 times in total.

davidh
Posts: 4
Joined: Thu Jan 21, 2010 8:47 am

Re: How can I import a EPS file into Inkscape?

Postby davidh » Fri Jan 22, 2010 7:51 am

Hi Charlie,

OK. I'm not sure how you got to where you're at, but we can get you to where you want to be.

I skipped Vista, instead going from XP to Win7, so my apologies if I can't give you precise instructions. But, I think you're already where you need to be so don't fret.

You have an "Environment Variables" dialog box that has a "System variables" section, yes? Under that section there is an "Edit..." button?

Inside that section is a list of variables and their corresponding values. To get to where you said:

CharlieD wrote:Variable Name: GS_PROG
Variable Value : C:\Program Files\gs\gs8.64\lib;C:\Program Files\gs\gs8.64\bin


...you must have clicked on the line that contains GS_PROG and then the "Edit..." button. If not, please explain.

Anyway, the variable GS_PROG is not the variable you want. I don't know where it came from or if you need it--and you might--but I don't have that variable listed at all. The name GS_PROG certainly seems like it's GhostScript related, so maybe some other aspect of GhostScript, or a program on your system utilizing GhostScript, is using it.

Instead, you want to click on the variable "Path" and then click the "Edit..." button. In that case, you should have the "Edit System Variable" dialog box with two fields: 1) Variable name and 2) Variable Value.

Make sure the "Variable name:" listed is "Path". Then, click in the "Variable value:" field and APPEND to the END of that line the appropriate path to the ps2pdf "bin" and "lib" directories, which appears to be "C:\Program Files\gs\gs8.64\lib;C:\Program Files\gs\gs8.64\bin". Remember to put a semicolon between each specific path, so if using the two paths in the preceding sentence, you will need to append ";C:\Program Files\gs\gs8.64\lib;C:\Program Files\gs\gs8.64\bin" (without the quotes) to the end of the existing "Variable value:" field.

I hope that's all clear, but if not, indicate where you are and we'll take it from there. Of course, you need to OK the Edit System Variable dialog, OK the Environment Variables dialog and you should OK the System Properties dialog too.

Keep in mind that it's best not to have Inkscape loaded and running during this process. Then, load it up and check to see if the EPS option suddenly exists.

If it doesn't, then post here the entire field value lsted in the "Variable Value" field for the "Variable name:" that is "Path".

Best,

David

CharlieD
Posts: 45
Joined: Wed Oct 07, 2009 9:29 am

Re: How can I import a EPS file into Inkscape?

Postby CharlieD » Fri Jan 22, 2010 8:05 am

AH, AH


THE GS_ PROG in Variable Name was the PROBLEM




Variable NAME box = PATH
Variable Value box = C:\Program Files\gs\gs8.64\lib;C:\Program Files\gs\gs8.64\bin






Thank you very much David for helping me here. 8-) 8-)

davidh
Posts: 4
Joined: Thu Jan 21, 2010 8:47 am

Re: How can I import a EPS file into Inkscape?

Postby davidh » Fri Jan 22, 2010 8:15 am

Charlie,

That's great. It sounds from your recent message that it's now working. Congratulations!

But, umm, if that's the entire value of your Path variable, you might find that other things are now broken...

For example, my path variable value reads "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\EgisTec\MyWinLocker 3\x86;C:\Program Files (x86)\EgisTec\MyWinLocker 3\x64;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\gs\gs8.64\lib;C:\Program Files\gs\gs8.64\bin".

You'll notice how the ps2pdf paths are appended to the end and don't replace the entire line. If I replace the path with that information, I can expect that MyWinLocker, Windows Power Shell, some ATI utilities, and other things, including Windows itself, might encounter problems.

I hope that's not what happened and that you just described it differently. I have no idea how to recover what might have existed in the path variable before it was overwritten. It's possible that rebooting your computer might restore it, or restoring to an earlier system point could help, but that's out of the scope of my ability to assist.

Best,

David

CharlieD
Posts: 45
Joined: Wed Oct 07, 2009 9:29 am

Re: How can I import a EPS file into Inkscape?

Postby CharlieD » Fri Jan 22, 2010 8:28 am

Thanks David

I didn't see another Variable Name which equaled PATH and system still seems ok, but if i have any problems i'll try a System Restore.

CharlieD
Posts: 45
Joined: Wed Oct 07, 2009 9:29 am

Re: How can I import a EPS file into Inkscape?

Postby CharlieD » Fri Jan 22, 2010 9:41 am

OK

To try and make sure i had not messed up my System as David mentioned i did a System restore and it did reveal an over-write.

So for clarity and to stop people making silly mistakes i did.

Go to Enviroment Variables and Find Variable Name Path, Click to highlight and then Click Edit, then add ;C:\Program Files\gs\gs8.70\lib;C:\Program Files\gs\gs8.70\bin (or whatever Path of GS lib and bin you have)to the end of the existing Variable Value like in David's post above and your Inkscape should have EPS Import capability.


Me being a bit thick where this kind of thing is concerned, it took a while to get there :shock: :D but with some help from Inkscapeforum members i got there.


Cheers guys and thanks for sharing your knowledge.

istarlome
Posts: 7
Joined: Mon Oct 08, 2007 9:49 am

Re: How can I import a EPS file into Inkscape?

Postby istarlome » Fri Jan 22, 2010 1:16 pm

i use to open the .eps file in gimp and turn it into a .png. then trace in inkscape.

CharlieD
Posts: 45
Joined: Wed Oct 07, 2009 9:29 am

Re: How can I import a EPS file into Inkscape?

Postby CharlieD » Sun Jan 24, 2010 11:22 am

Inkscape EPS Import

Image

GS View

Image


Gimp EPS Import

Image



Anyone know what the problem is and fix for the Inkscape Import

CharlieD
Posts: 45
Joined: Wed Oct 07, 2009 9:29 am

Re: How can I import a EPS file into Inkscape?

Postby CharlieD » Mon Jan 25, 2010 2:22 am

Not sure if problem is a bug of some kind, but i've put a link to this thread on a similar bug report from 08 on Lauchpad https://bugs.launchpad.net/inkscape/+bug/190424 .

If your suffering a similar problem to me please add your information for the developers.

User avatar
sas
Posts: 404
Joined: Sat Oct 06, 2007 5:42 am

Re: How can I import a EPS file into Inkscape?

Postby sas » Mon Jan 25, 2010 2:50 am

That bug report is unrelated, since EPS import is completely different in Inkscape 0.47 than in Inkscape 0.46. The 0.47 method is to convert the EPS file to PDF (using ps2pdf) and then import the PDF file. It's unlikely that ps2pdf is doing anything wrong, so this is probably a PDF import problem.

CharlieD
Posts: 45
Joined: Wed Oct 07, 2009 9:29 am

Re: How can I import a EPS file into Inkscape?

Postby CharlieD » Mon Jan 25, 2010 3:44 am

As i stated on comment i wasn't sure where to raise this.


Interesting you mention PDF though sas. When i try to open using Open with > Inkscape i get a pop up stating


Inkscape has received additional data from the script executed. The script did not return an error, but this may indicate the results will not be as expected.
ps2pdf failed:



Access is denied.


Access is denied.


Access is denied.


Access is denied.


Unable to open command line file _.at




Opens using Open with > GS and Gimp

alvinpenner
Posts: 8
Joined: Tue Dec 18, 2007 10:43 pm

Re: How can I import a EPS file into Inkscape?

Postby alvinpenner » Mon Jan 25, 2010 4:03 am

could you submit a bug report to Inkscape and attach the .ps file?

CharlieD
Posts: 45
Joined: Wed Oct 07, 2009 9:29 am

Re: How can I import a EPS file into Inkscape?

Postby CharlieD » Mon Jan 25, 2010 4:09 am

File has been uploaded to https://bugs.launchpad.net/inkscape/+bug/190424 Alvin.

User avatar
sas
Posts: 404
Joined: Sat Oct 06, 2007 5:42 am

Re: How can I import a EPS file into Inkscape?

Postby sas » Mon Jan 25, 2010 5:44 am

As I've pointed out on Launchpad, the things that are omitted when opening in Inkscape are outside the bounding box of the EPS file, so it seems reasonable for them to be discarded - they are not part of the EPS image itself, just extraneous junk.

You can make Inkscape import everything in the EPS file by editing ps2pdf-ext.py (in the Inkscape extensions directory) so that the -dEPSFitPage option is used when calling ps2pdf. However, this would mean that an EPS file opened in Inkscape would have the wrong page size in many cases, so it would not be a good thing to do in general.

tatankam
Posts: 14
Joined: Mon Jan 11, 2010 8:08 pm

Re: How can I import a EPS file into Inkscape?

Postby tatankam » Tue Jan 26, 2010 1:48 am

I have windows XP.

have a folder "pippo" where I have read permission.

If I choose File->Import and I select an eps file from that folder I obtain:
"Access is denied.
Access is denied.
Access is denied.
Access is denied.
Unable to open command line file _.at"

because it isn't able to create .at file.

If I have write permission on that folder it works.


Instead, if I use File-<Open and I choose the same file it is able to open it.


What could I do to solve this?

Thanks

Mario

User avatar
sas
Posts: 404
Joined: Sat Oct 06, 2007 5:42 am

Re: How can I import a EPS file into Inkscape?

Postby sas » Tue Jan 26, 2010 5:21 am

The problem seems to be that ps2pdf tries to write a temporary file to the current directory (instead of to the temp directory). If the current directory isn't writeable, then this will fail.

tatankam wrote:What could I do to solve this?

Try the following:

In the share\extensions subdirectory of your Inkscape directory there is a file called run_command.py. (You might want to make a back-up of it before continuing.) Edit this file, and add the line

os.chdir(tempfile.gettempdir())

after the line

msg = None

Indent the new line with four spaces (not a tab), so that it aligns with the surrounding lines. Save your changes to run_command.py, and try importing an EPS file in Inkscape.

tatankam
Posts: 14
Joined: Mon Jan 11, 2010 8:08 pm

Re: How can I import a EPS file into Inkscape?

Postby tatankam » Tue Jan 26, 2010 5:49 pm

Great!!!!

Your solution solved the problem!!!

Thanks thanks thanks a lot for your help!

Mario

I signed it as a bug and mentioned you for the solution:
https://bugs.launchpad.net/inkscape/+bug/512681

Guest

Re: How can I import a EPS file into Inkscape?

Postby Guest » Sat Apr 03, 2010 12:35 pm

davidh wrote:Hi,

I wanted to thank eelke also for explaining how to do this. I discovered Inkscape today, after searching for too long for my misplaced CorelDraw 8 install disc. I haven't had to edit vector graphics recently, apparently.
.........

Kudos to the Inkscape team. And thanks, of course, to the Ghostscript group.

Good luck!

David


thanks Soooooooooooooooooooooo much! I installed ghostscript 7 and your instructions worked PERFECTLY! i appreciate it. i KNEW there was a way to import EPS files. :D

User avatar
druban
Posts: 1570
Joined: Fri Nov 20, 2009 10:48 pm

Re: How can I import a EPS file into Inkscape?

Postby druban » Sun Apr 04, 2010 9:35 pm

Many many thanks to Eelke and to DavidH for laying it out so neatly. :D
I really appreciate it. i was using gsview and Neevia now I don't have to.
Your mind is what you think it is.


Return to “Help with using Inkscape”

Who is online

Users browsing this forum: Google [Bot] and 6 guests