Solved

How do I convert an EMF image to RTF file?

Posted on 2009-04-14
9
627 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

746 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now