开发者

How to convert a Word file content (with images and tables) into RFC 822 format using c#?

开发者 https://www.devze.com 2022-12-22 03:09 出处:网络
I want to read a Word file (contains images and table). After that i want to convert it\'s content into \"RFC 822 format \".
  1. I want to read a Word file (contains images and table).
  2. After that i want to convert it's content into "RFC 822 format ".

Loo开发者_如何学Cking for some APIS and sample code for above.


Start with the Open XML SDK 2.0 for Microsoft Office to read the Word file.


RFC 822 is not the specification you're looking for.

The abstract for RFC 5322 reveals one reason:

   This document specifies the Internet Message Format (IMF), a syntax
   for text messages that are sent between computer users, within the
   framework of "electronic mail" messages.  This specification is a
   revision of Request For Comments (RFC) 2822, which itself superseded
   Request For Comments (RFC) 822, "Standard for the Format of ARPA
   Internet Text Messages", updating it to reflect current practice and
   incorporating incremental changes that were specified in other RFCs.

This paragraph from section 1.1 ("Scope") reveals another:

   This document specifies a syntax only for text messages.  In
   particular, it makes no provision for the transmission of images,
   audio, or other sorts of structured data in electronic mail messages.
   There are several extensions published, such as the MIME document
   series ([RFC2045], [RFC2046], [RFC2049]), which describe mechanisms
   for the transmission of such data through electronic mail, either by
   extending the syntax provided here or by structuring such messages to
   conform to this syntax.  Those mechanisms are outside of the scope of
   this specification.

I think that you actually want the answer to a different question, like:

How can I convert a Word message to a MIME-based format that will look nice in a variety of mail user-agents?

If I'm wrong, and you really are asking how to convert Word documents to plain text emails, you should probably take a look at antiword, a highly featureful tool for converting Word documents to plain text, PostScript, PDF, or docbook. (There's no indication that it can do anything with images when outputting plain text, though — yet, anyway.)

0

精彩评论

暂无评论...
验证码 换一张
取 消