Page 1 of 1

Inkscape doesn't exit after being called from Powershell Script

Posted: Tue Jul 04, 2017 9:19 am
by Aido
I've tried calling Inkscape with both

Code: Select all

inkscape.exe --export-png "$filedir\$filename.png" -w 512 "$filedir\$filename.svg"
and

Code: Select all

"--export-png `"$filedir\$filename.png`" -w 512 `"$filedir\$filename.svg`"`nexit" | inkscape.exe --shell
from a Powershell ps1 script, but after both, it never exits. What am I doing wrong?

Re: Inkscape doesn't exit after being called from Powershell Script

Posted: Wed Jul 05, 2017 12:48 am
by Moini
Add a --FileQuit at the end to close the opened file and all windows of the current Inkscape instance.

The other option is --FileClose, which will only close the current file, but keep at least one Inkscape window open.


Edit: See below for correct info!

Re: Inkscape doesn't exit after being called from Powershell Script

Posted: Thu Jul 06, 2017 10:31 pm
by ~suv
Off topic:
Moini wrote:Add a --FileQuit at the end to close the opened file and all windows of the current Inkscape instance.

The other option is --FileClose, which will only close the current file, but keep at least one Inkscape window open.
Not really:

Code: Select all

** (inkscape:10311): WARNING **: Invalid option --FileQuit

** (inkscape:10324): WARNING **: Invalid option --FileClose
FileQuit and FileClose are verbs (usage would be '--verb=FileQuit' or '--verb=FileClose'), not command line options. Verbs are not relevant when exporting to PNG via command line (they even can cause Inkscape to crash in the context of 'real' command line options like '--export-png').


It seems likely to me that Aido experiences a variation of Bug #1659172 “command line sometimes freezes”.

Re: Inkscape doesn't exit after being called from Powershell Script

Posted: Thu Jul 06, 2017 11:44 pm
by Moini
Mmh. Thanks, V!