Inkscape on Win32 Server

Setting up inkscape (or svg rendering, for that matter) on a win32 installation of mediawiki may prove tricky. I have found that the following works (mediawiki 1.7.1, inkscape 0.44, assuming that inkscape is installed in the default location)


$wgSVGConverters['inkscapeshell'] = \
 'C:\bin\svgtopng.bat $input $output $width';
$wgSVGConverter = 'inkscapeshell';


@echo off
set APP=C:\Program Files\Inkscape\inkscape.exe
set FROM=%1
set TO=%2
set WIDTH=%3
copy %FROM% C:\input.svg
"%APP%" -w %WIDTH% --export-png C:\output.png C:\input.svg
copy C:\output.png %TO%

MediaWiki 1.15.0Edit

I got this working in Windows XP on MediaWiki 1.15.0 by simply adding inkscape's install folder to the PATH and restarting the machine, then setting $wgSVGConverter = 'inkscape';.

Setting $wgSVGConverterPath did not work at all in Windows XP and seemed to make the entire wiki hang.