I am trying to convert SVGs to EMFs, to include them in PowerPoint slides. I can do this now with:
inkscape --file $file.svg -T -M $file.emf
However, dashed lines appear to be solid. I've seen that you can convert the dashed lines to single lines of you export using the GUI, but I need to convert dozens of files, so I would prefer to automate this. Is there a way to use the dashed lines conversion from the command line? I think I could potentially change the defaults in the source and then recompile, but if there is an easier way that would be great!
Also, changing the defaults in the source and recompiling did work, so it is possible to do it from the command line, it's just a question of whether or not it's possible to set those EMF export options from the command line.
Hello,
I am trying to convert SVGs to EMFs, to include them in PowerPoint slides. I can do this now with:
However, dashed lines appear to be solid. I've seen that you can convert the dashed lines to single lines of you export using the GUI, but I need to convert dozens of files, so I would prefer to automate this. Is there a way to use the dashed lines conversion from the command line? I think I could potentially change the defaults in the source and then recompile, but if there is an easier way that would be great!
Thanks,
Kyle
I'd use a unix/text editor like Notepad++ to batch replace all the instances of dash arrays to solid.
Where the files have stroke-dasharry: n,n; (or similar), I'd replace with stroke-dasharry: none;
A typical text editor will allow find/replace across documents.
I would like the dashed lines to stay dashed, not become solid. They become solid by themselves after importing into powerpoint right now.
Also, changing the defaults in the source and recompiling did work, so it is possible to do it from the command line, it's just a question of whether or not it's possible to set those EMF export options from the command line.
inkscape --export-type="emf" my_file.svg does the job.
The emf dashes however are interpreted differently in Powerpoint.
I opened them in Powerpoint online via my hotmail account and also in Office Professional Plus 2016.
In each image on the right hand side you can see the original dashed path vs a Path>Convert Stroke to Path version above it.
If you open the emf in Inkscape, you should see the dashes are correct.
I've attached the .svg / .emf / . pptx
That seems to do it, thanks for your help!