Why does a PS-File not open via command line?

Post questions on how to use or achieve an effect in Inkscape.
theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Why does a PS-File not open via command line?

Postby theozh » Wed Dec 21, 2016 12:42 am

You can convert a PDF via Inkscape to SVG via the following code:

Code: Select all

inkscape.exe -z -f "Input.pdf" -l "Output.svg"

With the GUI you can also open a PS file and save it as SVG. No Problem!

Why does the command line option not work for PS-Files?

Code: Select all

inkscape.exe -z -f "Input.ps" -l "Output.svg"

Even opening a PS-File starting with the command line actually using the GUI (i.e. without option -z) will result in an error message and the GUI will open with an empty file.

Code: Select all

inkscape.exe -f "Input.ps"

How can I make it work? I dont' want to convert all the PS to PDF first!
Win7/64, Inkscape 0.92.2

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Why does a PS-File not open via command line?

Postby Moini » Wed Dec 21, 2016 2:29 am

What's the error message you get? Can you post a file that demonstrates the problem?
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: Why does a PS-File not open via command line?

Postby theozh » Wed Dec 21, 2016 2:57 am

As I said, importing the same PS with the GUI is no problem.
It just doesn't work with the command line.

That's what I get:
Inkscape_PS-CmdLine-Import_Error1.png
Inkscape_PS-CmdLine-Import_Error1.png (4.8 KiB) Viewed 1242 times

Inkscape_PS-CmdLine-Import_Error2.png
Inkscape_PS-CmdLine-Import_Error2.png (3.51 KiB) Viewed 1242 times
Win7/64, Inkscape 0.92.2

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Why does a PS-File not open via command line?

Postby Moini » Wed Dec 21, 2016 7:40 am

Can you also post a file that demonstrates the problem, so we have something to test with?
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: Why does a PS-File not open via command line?

Postby theozh » Wed Dec 21, 2016 8:06 am

Hmm, pretty strange...
As I said with PDF it works:

Code: Select all

inkscape.exe -z -f "DoReMi.pdf" -l "DoReMi.svg"

with PS it doesn't work:

Code: Select all

inkscape.exe -z -f "DoReMi.ps" -l "DoReMi.svg"

However, what I found now the following with PS works:

Code: Select all

inkscape -z -f "DoReMi.ps" -l "DoReMi.svg"

Find the difference!
Why should the extension .exe make a difference but only with PS files?
Please, let me know if you observe the same thing or if I am crazy.
Bug or feature?

Edit: don't be surprised if the .ps file looks strange, because you won't have the music symbol font.

Obviously, I cannot attach .ps files. So, remove the pdf from DoReMi_File.ps.pdf
Attachments
DoReMi_FILE.ps.pdf
(36.36 KiB) Downloaded 159 times
DoReMi_FILE.pdf
(5.62 KiB) Downloaded 143 times
Win7/64, Inkscape 0.92.2

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Why does a PS-File not open via command line?

Postby Moini » Wed Dec 21, 2016 8:30 am

Works for me, must be a Windows-only problem... as is indicated by the .exe thing. Could be worth investigating what kind of difference it makes if you call inkscape.exe vs. inkscape only (or any other program) on Windows. I don't know enough about this, sorry.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)


Return to “Help with using Inkscape”