Page 1 of 1

wmf/emf export

Posted: Thu Nov 02, 2006 3:16 pm
by das
I couldn't find this issue in an existing post so...

I am using a macro to save out wmf and emf files (FileSaveAs) of my xy plots. The problem I have is that when I open them in other applications (powerpoint, microsoft picture viewer, word, etc) the background of the plot is blue or grey. If I manually copy the image from dplot and paste as a metafile, then the background is the correct white color. Any ideas?

Thanks!

Posted: Thu Nov 02, 2006 4:29 pm
by DPlotAdmin
Metafiles don't have a background, so this is a PowerPoint or Word setting. Right-click on the picture, select 'Format Picture'. On the 'Colors and Lines' tab, select 'No Fill' for Color (or whatever color you want).

Posted: Wed Feb 21, 2007 1:47 pm
by richpauir
I have a newbie question related to saving a graph as an emf. I have having trouble making my legend text and legend text box save exactly as they appear on the monitor. When saving as a raster file, such as a png, there is no problem with the legend text and legend box.

For example, here is a simple xy graph with a legend.
http://www.rjhoffpauir.com/test.grf

I tried working with the Copy Dimensions for metafiles, and the Specify Plot Size under Extents/Intervals/Size, but no luck. Any suggestions?

Posted: Wed Feb 21, 2007 4:03 pm
by DPlotAdmin
Richard,
I'm not entirely sure what's going on there, but (on my system at least) I have the same problem with Verdana used in the legend, but the expected results with Arial.

It doesn't appear to be anything goofy that Word is doing (like making its own font substitutions) because I get the same problem to a lesser degree if I Copy and look at the result in Clipbook Viewer.

To add a little weirdness to the problem, I tried a dozen other fonts and all of them worked correctly. So far Verdana is the only one where the box is sized incorrectly. So maybe you just got lucky :)

I'll look into this. In the meantime don't use Verdana for the legend, notes, or numbers (the numbers font is also used in framed point labels).

Posted: Wed Feb 21, 2007 4:56 pm
by richpauir
Thanks! :D

Posted: Wed Feb 21, 2007 5:04 pm
by richpauir
I notice the legend box still has some sizing problems, depending if I save as a Windows Metafile versus an Enhanced Metafile. The wmf works as expected, whereas the emf still results in the legend box being too short even with all fonts in the graphic changed to arial.

The wmf works fine for me, but I was just curious is there is something I'm missing regarding the emf export option.

Posted: Wed Feb 21, 2007 5:28 pm
by jsc
I think some of this scaling is the "well known" but entirely frustrating condition of Truetype fonts and Windows. Lots of applications have this scaling problem. Like David says, just try other fonts. Also, I think if you Options>Extents/etc/>"Specify plot size" the graph on the screen to match the size as the pasting area, you might have a better chance of getting it right. At least you can move things around so they look right in DPlot, then export to wmf/emf, and it will be scaled as close to correct as windows can do.

Posted: Wed Feb 21, 2007 6:02 pm
by richpauir
jsc wrote:I think some of this scaling is the "well known" but entirely frustrating condition of Truetype fonts and Windows. Lots of applications have this scaling problem. Like David says, just try other fonts. Also, I think if you Options>Extents/etc/>"Specify plot size" the graph on the screen to match the size as the pasting area, you might have a better chance of getting it right. At least you can move things around so they look right in DPlot, then export to wmf/emf, and it will be scaled as close to correct as windows can do.
Thanks for these suggestions too. :D I played around with the fonts and "Specify Plot Size" and resizing the child window until things worked they way I needed. I also read up on the history of Truetype fonts. :shock:

Posted: Wed Feb 21, 2007 7:54 pm
by DPlotAdmin
Richard,
I'm glad you got this worked out; sorry for all the pain. You'll definitely always want to "Specify plot size" before saving as either metafile format or copying to the Clipboard.

You mentioned PowerPoint earlier - if you're just producing PowerPoint slides you might be happier with the bitmap format (Copy, Paste Special->Device independent bitmap). Since presumably whatever output device you use to display the slides won't have considerably better resolution than your monitor, there's no real advantage to using a metafile in this case. For best results with Copy/Paste and bitmaps, select Edit>Copy>Dimensions and set the bitmap width and height to 0. When you do that the bitmap copied to the clipboard will be exactly (not approximately, really, really exactly :)) what you see on your screen.

Posted: Wed Feb 21, 2007 9:34 pm
by richpauir
DPlotAdmin wrote:Richard,
I'm glad you got this worked out; sorry for all the pain. ...
There's no pain at all. I can completely appreciate the learning curve associated with all software of any level of sophistication. I'm slowly incorporating DPlot into my business and academic products and have already recommended it to a few of my colleagues. :)