views:

16

answers:

0

I'm having an issue in a WPF application using the RichTextBox where content being pasted in from Microsoft Word is mangled. To work around the issue, I found that Word includes a metafile on the clipboard, and I can get the metafile from the clipboard using interop (WPF wouldn't properly import the metafile either). My problem, though, is that a metafile is scalable and so whether a user pastes a whole page of content or a small amount, the metafile claims that its Width is 4390. However, if I strip the clipboard of everything but the metafile and paste it into MSPaint, the resulting bitmap in paint has properly scaled the pasted metafile, so it seems to me that there must be some information somewhere that indicates the real size. Does anyone know how to get the proper expected size of the Metafile?