Solved

How do I convert an EMF image to RTF file?

Posted on 2009-04-14
9
637 Views
Last Modified: 2012-05-06
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
Comment
Question by:JulienVan
  • 4
  • 3
9 Comments
 
LVL 39

Accepted Solution

by:
abel earned 500 total points
ID: 24139048
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
 
LVL 2

Author Comment

by:JulienVan
ID: 24139109
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
 
LVL 2

Author Comment

by:JulienVan
ID: 24139404
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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 39

Assisted Solution

by:abel
abel earned 500 total points
ID: 24139429
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
 
LVL 39

Expert Comment

by:abel
ID: 25185963
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
 
LVL 39

Expert Comment

by:abel
ID: 25193940
See my prev. comment, please. There are no other experts on this thread, no need to wait for them ;-)
0
 
LVL 2

Author Closing Comment

by:JulienVan
ID: 31569942
Sorry for the delay abel, all your comments were accurate so I accept them as multiple solutions.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question