• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 700
  • Last Modified:

How do I convert an EMF image to RTF file?

Hi,

As I didn't find it on the web, I'd like to develop a tool to convert emf files into rtf.

Does anyone have an idea to embed the image in an rtf file with C# code ?

Thanks in advance
0
JulienVan
Asked:
JulienVan
  • 4
  • 3
2 Solutions
 
abelCommented:
EMF (Enhanced MetaFile) is used for spooling and sometimes for images and is a binary format. In general, image formats cannot be converted to word-processor formats, unless you use some type of OCR package to extract the readable text from the EMF.

RTF (Rich Text Format) is a format (text-based, not binary) to write markup of word-processing documents. It can contain EMF files as embedded objects and it can be viewed if the reader of the RTF file contains a viewer for EMF, but they cannot be converted.

-- Abel --
0
 
JulienVanAuthor Commented:
Hi abel, thanks for your comment.
I'd like to embed the image in a rtf file, would you know a way to do that with C# code?
0
 
JulienVanAuthor Commented:
I'm going to create the rtf documents with office automation, by opening word, creating a new document, paste the image, and save as rtf.
If anybody has another idea, thanks in advance.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
abelCommented:
That's a good way of doing it, of course, but if you want to bundle it you can only have your program used by people having Office. I wouldn't mind trying the EMF embedding for you, shouldn't be too hard in C# or any other .NET language.
0
 
abelCommented:
This q. was answered in the first comment, which covers that EMF is not a good choice for embedded images in RTF and should be avoided. Please accept http:#24139048 as answer.
0
 
abelCommented:
See my prev. comment, please. There are no other experts on this thread, no need to wait for them ;-)
0
 
JulienVanAuthor Commented:
Sorry for the delay abel, all your comments were accurate so I accept them as multiple solutions.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now