Dashed line export to emf

Asked by Luca

Hi everyone!

I'm trying to use Inkscape to convert a PDF/svg file to an .emf Enhanced MetaFile with a command like

inkscape ~/Desktop/temp_plot.svg --export-file ~/Desktop/temp_plot.emf

Everything works well, except from when I use dashed lines in the figure. In such cases the emf file opens correctly in Inkscape and emfexplorer, but in PowerPoint the file won't render at all: it shows a very low resolution (<100px by the looks of it), looking like a sort of low res preview.
I assume that someone already tackled this issue, since in the GUI I see the option to convert dashed/dotted lines to single lines when saving to emf, however this is not a solution for me.
Isn't there a better solution to keep the original dashed aspect?

In case no solution is already implemented I'll share here some hints from where an improvement could start (please keep in mind that I am no emf file expert, so don't be mad at me if I get it completely wrong)
To further investigate the issue I tried to save the same file directly in emf (from Matlab) and compare it with the converted one.
I inspected the emf files obtained using emfexplorer and noticed that the converted one has a ton of EMR_LINETO records to draw the dashed lines.
On the contrary (from what I can understand) the Matlab exported one uses the EMR_CREATEDIBPATTERNBRUSHPT, which creates a brush from bitmap pattern.
Would it be possible to replicate this working principle?

Question information

Language:
English Edit question
Status:
Answered
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Hachmann (marenhachmann) said :
#1

Hi,

you can read more about this here:

https://bugs.launchpad.net/inkscape/+bug/888793

If you want to make a feature request for adding an option that saves dashed lines in a specific way so it is compatible with software that doesn't support the complete standard, please open an issue for it at https://inkscape.org/report .

Can you help with this problem?

Provide an answer of your own, or ask Luca for more information if necessary.

To post a message you must log in.