Skip to main content
2 of 5
The workaround is unreliable
Verbeia
  • 34.5k
  • 10
  • 110
  • 225

Setting non-standard ImageResolution for EMF export as default

Mathematica has a bug in that BarCharts and ListPlots with Filling will export as a pixelated bitmap, not a vector graphic when exporting as EMF format.

There is a workaround, which is to set ImageResolution to be 1300 or higher in the Export command, like this:

testdata = RandomReal[{5, 10}, 20];
bg1 = BarChart[{testdata}]
Export["bg1400.emf", bg1, ImageResolution -> 1400]

(No, you don't get a huge file if you set ImageResolution this high. It somehow tricks it into using vector graphics. However the workaround is a bit unreliable, depending on the graph in question.)

How can I make this option the default? SetOptions[Export]={ImageResolution -> 1400} produces an error message that it's not a recognised option to Export. I also tried:

SetOptions[$FrontEndSession, ConversionOptions -> {"ExportOptions" -> {"EMF" -> 
  {"IncludeSpecialFonts" -> True, ImageResolution -> 1400}}}]

But that doesn't seem to do anything.

How do I set these export options as the default, e.g. in a package? Alternatively, how do I force this hidden vector capability?

Verbeia
  • 34.5k
  • 10
  • 110
  • 225