What is rich text format in microsoft word

Rich Text Format (RTF) is a file format that lets you exchange text files between different word processors in different operating systems.rtf” file name suffix), and send it to someone who uses WordPerfect 6.0 on Windows 3.1 and they will be able to open the file and read it.

Contents

  • 1 What is the difference between Microsoft Word document and Rich Text Format?
  • 2 What is RTF format used for?
  • 3 Is Rich Text the same as txt?
  • 4 Is Rich Text Format still used?
  • 5 What is Rich Text value?
  • 6 What does rich text format look like?
  • 7 What is the difference between RTF and DOCX?
  • 8 What is meant by TXT and RTF file format?
  • 9 What is a rich document?
  • 10 How do I convert RTF to word?
  • 11 Can an RTF file contained a virus?
  • 12 How do I edit rich text format?
  • 13 What is the difference between HTML and rich text format?
  • 14 What are rich texts?
  • 15 What is Rich Text format in Outlook?
  • 16 Should I use RTF?
  • 17 What is TXT format?
  • 18 What is Rich Text content control?
  • 19 How do I convert rich text to DOCX?
  • 20 How do I open a rich text file in Windows 10?

What is the difference between Microsoft Word document and Rich Text Format?

Although Microsoft Word is able to handle a variety of file formats, DOC is the default. RTF is an older file format that was also developed by Microsoft for Word but has since fallen at the wayside.RTF files are encoded as text files that contain extra keywords for the formatting.

What is RTF format used for?

RTF stands for Rich Text Format and is a universal document file format and is easily read by many of the word-processing packages. It is particularly useful to those using a different word-processing package from those used on campus.

Is Rich Text the same as txt?

RTF and TXT are two file formats used to store simple documents which have fallen to the wayside in favor of other popular formats like DOC. The main difference between RTF and TXT is their feature list. RTF is a lot more powerful than the very simplistic TXT format.TXT files cannot retain any sort of formatting.

Is Rich Text Format still used?

It’s also widely used in other types of apps, such as email clients. Microsoft discontinued the development of RTF in 2008, but it’s still widely supported by apps on almost every operating system.

RichTextValue. A stylized text string used to represent cell text. Substrings of the text can have different text styles. A run is the longest unbroken substring having the same text style.

What does rich text format look like?

Rich text is more exciting than plain text. It supports text formatting, such as bold, italics, and underlining, as well as different fonts, font sizes, and colored text. Rich text documents can also include page formatting options, such as custom page margins, line spacing, and tab widths.

What is the difference between RTF and DOCX?

DOCX is the newest incarnation of the DOC. Comparing with DOC format, RTF has less formatting than DOC. RTF can only support formats like italics, font sizes, types, and boldface. RTF can’t store such large data like DOC.

What is meant by TXT and RTF file format?

Key difference: TXT stands for plain text. Plain text is text that has no formatting, including any bold, italics or different font sizes.RTF stands for Rich text format. Rich text files can contain text attributes such as bold, italics and different fonts and colored text.

What is a rich document?

The Rich Text Format (often abbreviated RTF) is a proprietary document file format with published specification developed by Microsoft Corporation from 1987 until 2008 for cross-platform document interchange with Microsoft products.Most word processors are able to read and write some versions of RTF.

How do I convert RTF to word?

How to Convert RTF to DOC

  1. Launch Microsoft Word from its main desktop or Start menu shortcut.
  2. Click the “File” menu, followed by “Open.” Browse for the RTF file you wish to convert using the dialog box, and then double-click to open it.
  3. Click the “File” menu once again, and then select the “Save As” option.

Can an RTF file contained a virus?

RTF (Rich Text Format) files aren’t designed to carry any computer code that can be run to start a virus infection. So they would seem to be ‘safe’ from virus infection. Sadly, that doesn’t stop hackers using RTF’s maliciously. RTF documents can still be used to compromise a computer.

How do I edit rich text format?

  1. Open Microsoft Works Word Processor.
  2. Click “File,” then “Open.” Select “Rich Text Format” from the “Files of Type” menu. Browse through your files to select an RTF file.
  3. Select the text you want to edit.
  4. Select the text for which you want to change the formatting.
  5. Click “File,” then “Save” to preserve your changes.

What is the difference between HTML and rich text format?

HTML, or Hypertext Markup Language, is the primary formatting for web pages, that are used on the internet.Rich Text lacks certain features that are related to internet use, such as linking to files, other web pages, and other protocols like emails.

What are rich texts?

R. (1) Text that includes formatting commands for page layout such as fonts, bold, underline, italic, etc. It may also refer to a multimedia document that can include images, audio and video. See rich media, multimedia and HTML email.

What is Rich Text format in Outlook?

RTF: Rich text formatting (RTF), Outlook’s proprietary message format, is somewhat of a middle ground. It supports text formatting, including bullets, alignment, and linked objects. You can use it when sending to other Outlook and Exchange users, but Microsoft recommends sending in HTML regardless.

Should I use RTF?

There are several reasons why you may want to save files in Rich Text Format (RTF): RTF is readable across many programs and platforms. Although many applications can import Microsoft Word® DOC files, older programs may not be able to import or convert newer versions of Word.

What is TXT format?

TXT is a file extension for a text file, used by a variety of text editors.There is no standard definition of a text file, though there are several common formats, including ASCII (a cross-platform format), and ANSI (used on DOS and Windows platforms). TXT stands for TeXT. MIME type : text/plain. Learn more about .

What is Rich Text content control?

A rich text control can contain custom formatted text or other items, such as tables, pictures, or other content controls.Prohibits users from inserting any other Word objects or any text. Combo Box. Contains a drop-down selection of list entries that users can select and text box that user can edit directly.

How do I convert rich text to DOCX?

How to convert RTF to DOCX

  1. Upload rtf-file(s) Select files from Computer, Google Drive, Dropbox, URL or by dragging it on the page.
  2. Choose “to docx” Choose docx or any other format you need as a result (more than 200 formats supported)
  3. Download your docx.

How do I open a rich text file in Windows 10?

Right-click a blank area in File Explorer or Windows 10 desktop, select New -> Rich Text Format, and then press ENTER. You just created a blank . rtf file. If you have an existing document that’s currently associated with Word, but you prefer to open it in WordPad, you can skip this step and go to the next step 2.

Rich Text Format

Filename extension

.rtf

Internet media type

text/rtf[1]
application/rtf[2]

Type code 'RTF.'[3][4][5]
Uniform Type Identifier (UTI) public.rtf
Magic number {rtf
Developed by Microsoft
Initial release 1987; 36 years ago
Latest release

1.9.1
19 March 2008; 15 years ago

Type of format Document file format
Open format? No

The Rich Text Format (often abbreviated RTF) is a proprietary[6][7][8] document file format with published specification developed by Microsoft Corporation from 1987 until 2008 for cross-platform document interchange with Microsoft products. Prior to 2008, Microsoft published updated specifications for RTF with major revisions of Microsoft Word and Office versions.

Most word processors are able to read and write some versions of RTF.[9] There are several different revisions of RTF specification; portability of files will depend on what version of RTF is being used.[7][10]

RTF should not be confused with enriched text[11] or its predecessor Rich Text,[12][13] nor with IBM’s RFT-DCA (Revisable Format Text-Document Content Architecture), as these are different specifications.

History[edit]

Richard Brodie, Charles Simonyi, and David Luebbert, members of the Microsoft Word development team, developed the original RTF in the middle to late 1980s. The first RTF reader and writer shipped in 1987 as part of Microsoft Word 3.0 for Macintosh, which implemented the RTF version 1.0 specification. All subsequent releases of Microsoft Word for Macintosh, as well as all Windows versions, can read and write in RTF format.

Microsoft maintains RTF. The final version was 1.9.1 in 2008, which implemented features of Office 2007. Microsoft has discontinued enhancements to the RTF specification, so features new to Word 2010 or a later version will not save properly to RTF.[14] Microsoft anticipates no further updates to RTF, but has stated willingness to consider editorial and other non-substantive modifications of the RTF Specification during an associated ISO/IEC 29500 balloting period.[15]

RTF files were used to produce Windows Help files, though these have since been superseded by Microsoft Compiled HTML Help files.

RTF specifications for Microsoft Word[16][17]

RTF version Publication date Microsoft Word version MS Word release date Notes
1.0 1987 Microsoft Word 3 1987 The latest revision came in June 1992.[18][19] The 1992 revision defined support for Microsoft Object Linking and Embedding (OLE) objects and Macintosh Edition Manager subscriber objects. It also supported inclusion of the Windows Metafile, PICT, Windows device-dependent bitmap, Windows device-independent bitmap and OS/2 Metafile image types in RTF.
1.1 Microsoft Word 4 1989 Allowed for font embedding, which lets font data to be located inside the file.
1.2 1993 Microsoft Word 5 1991 [20][21]
1.3 January 1994 Microsoft Word 6 1993 1/94 GC0165; for device-independence and interoperability, encouraged embedding bitmaps within Windows Metafiles,[22][23] instead of using Windows device-independent bitmaps or Windows device-dependent bitmaps.
1.4 September 1995 Microsoft Word 95/Word 7 1995 [24]
1.5 April 1997 Microsoft Word 97/Word 8 1997 Introduced Unicode RTF, which supports 16-bit Unicode character encoding scheme; defined inclusion of PNG, JPEG and EMF picture types in hexadecimal (the default) or binary format in a RTF file.[25] Also contained a Japanese local RTF specification called RTF-J for the Japanese version of Word; RTF-J is somewhat different from the standard RTF specification.[25]
1.6 May 1999 Microsoft Word 2000/Word 9 1999 Included Pocket Word and Exchange (used in RTF-HTML conversions).[3]
1.7 August 2001 Microsoft Word 2002/Word 10 2001 8/2001– Word 2002 RTF Specification[26][27]
1.8 April 2004 Microsoft Word 2003/Word 11 2003 10/2003– Word 2003 RTF Specification[4]
1.9.1 19. March 2008
(RTF 1.9 – published in January 2007)[28]
Microsoft Word 2007/Word 12 2006 Allowed XML markup – Custom XML Tags, SmartTags, Math elements in an RTF document, password protection, elements corresponding to Office Open XML Ecma-376 Part 4[29]

Code syntax[edit]

It is programmed using groups, a backslash, a control word and a delimiter. Groups are contained within curly braces ({}) and indicate which attributes should be applied to certain text.

The backslash () introduces a control word, which is a specifically programmed command for RTF. Control words can have certain states in which they are active. These states are represented by numbers. For example,

b0
indicates that the Bold text is off
b1
indicates that the Bold text is on

A delimiter is one of three things:

  1. A space
  2. A digit or hyphen (e.g. -23, 23, 275)
  3. A character other than a digit or letter (e.g. , /, }) [30]

As an example, the following RTF code

 {rtf1ansi{fonttblf0fswiss Helvetica;}f0pard
 This is some {b bold} text.par
 }

would be rendered as follows:

This is some bold text.

Character encoding[edit]

A standard RTF file can only consist of 7-bit ASCII characters, but can use escape sequences to encode other characters.[31] The two character escapes are code page escapes and, starting with RTF 1.5, Unicode escapes. In a code page escape, two hexadecimal digits following a backslash and typewriter apostrophe denote a character taken from a Windows code page. For example, if the code page is set to Windows-1256, the sequence 'c8 will encode the Arabic letter bāʼ ب. It is also possible to specify a «Character Set» in the preamble of the RTF document and associate it to a header. For example, the preamble has the text f3fnilfcharset128, then, in the body of the document, the text f3'bd'f0 will represent the code point 0xbd 0xf0 from the Character Set 128 (which corresponds to the Shift-JIS code page), which encodes «金».

RTF Character Set Code Page Description
0 Windows-1252 Latin alphabet, Western Europe / Americas
1 0 Default Windows API code page for system locale
2 42 Symbol (PUA-mapped)[32] character set
77 2 Default Macintosh-compatibility code page for system locale
128 Windows-932 Japanese, Shift JIS (Windows version)
129 Windows-949 Korean, Unified Hangul Code (extended Wansung)
130 Windows-1361 Korean, Johab (ASCII-based version)
134 Windows-936 Chinese, GBK (extended GB 2312)
136 Windows-950 Chinese, Big5
161 Windows-1253 Greek
163 Windows-1254 Latin alphabet, Turkish
177 Windows-1258 Latin alphabet, Vietnamese
178 Windows-1255 Hebrew
186 Windows-1256 Arabic
204 Windows-1257 Baltic
222 Windows-1251 Cyrillic
238 Windows-1250 Latin alphabet, Eastern Europe
255 1 Default OEM code page for system locale

For a Unicode escape, the control word u is used, followed by a 16-bit signed integer which corresponds to the Unicode UTF-16 code unit number. For the benefit of programs without Unicode support, this must be followed by the nearest representation of this character in the specified code page. For example, u1576? would give the Arabic letter bāʼ ب, but indicates that older programs which do not support Unicode should render it as a question mark instead.

The control word uc0 can be used to indicate that subsequent Unicode escape sequences within the current group do not specify the substitution character.

Until RTF specification version 1.5 release in 1997, RTF only handled 7-bit characters directly and 8-bit characters encoded as hexadecimal (using 'xx). Since RTF 1.5, however, RTF control words generally accept signed 16-bit numbers as arguments. Unicode values greater than 32767 must be expressed as negative numbers.[25] If a Unicode character is outside BMP, it is encoded with a surrogate pair. Support for Unicode was made due to text handling changes in Microsoft Word – Microsoft Word 97 is a partially Unicode-enabled application and it handles text using the 16-bit Unicode character encoding scheme.[25] Microsoft Word 2000 and later versions are Unicode-enabled applications that handle text using the 16-bit Unicode character encoding scheme.[3]

Because RTF files are usually 7-bit ASCII plain text, they can be easily transmitted between PC-based operating systems. Converters that communicate with Microsoft Word for MS Windows or Macintosh generally expect data transfer as 8-bit characters and binary data which can contain any 8-bit values.[29]

Human readability[edit]

RTF is a data format for saving and sharing documents, not a markup language; it is not intended for intuitive and easy typing.[33][34] Nonetheless, unlike many word processing formats, RTF code can be human-readable. When an RTF file containing mostly Latin characters without diacritics is viewed as a plain text file, the underlying ASCII text is readable, provided that the author has kept formatting concise.

When RTF was released, most word processors used binary file formats; Microsoft Word, for example, used the .DOC file format. RTF was unique in its simple formatting control which allowed non-RTF aware programs like Microsoft Notepad to open and provide readable files. Today, most word processors have moved to XML-based file formats (Word has switched to the .docx file format). Regardless, these files contain large amounts of formatting code, so are often ten or more times larger than the corresponding plain text.[35][33]

To be standard-compliant RTF, non-ASCII characters must be escaped. Thus, even with concise formatting, text that uses certain dashes and quotation marks is less legible. Latin languages with many diacritics are particularly difficult to read in RTF, as they result in substitutions like ‘f1 for ñ and ‘e9 for é. Non-Latin scripts are illegible in RTF — u21563, for example, is used for 吻. From the beginning, RTF has also supported Microsoft OLE embedded objects and Macintosh Edition Manager subscriber objects, which are not human-readable.

Common uses and interoperability[edit]

Most word processing software support either RTF format importing and exporting for some RTF specification or direct editing, which makes it a «common» format between otherwise incompatible word processing software and operating systems. Most applications that read RTF files silently ignore unknown RTF control words.[36] These factors contribute to its interoperability, though it is still dependent on the specific RTF version in use.[7] There are several consciously designed or accidentally born RTF dialects.[36]

RTF is the internal markup language used by Microsoft Word.[33] Since 1987, RTF files have been able to be transferred back and forth between many old and new computer systems (and now over the Internet), despite differences between operating systems and their versions. This makes it a useful format for basic formatted text documents such as instruction manuals, résumés, letters, and modest information documents. These documents, at minimum, support bold, italic and underline text formatting. Also typically supported are left-, center- and right-aligned text, font specification and document margins.

Font and margin defaults, style presets and other functions vary according to program defaults. There may also be incompatibilities between different RTF versions, e.g. between RTF 1.0 1987 and later specifications, or between RTF 1.0-1.4 and RTF 1.5+ in use of Unicode characters.[37][38][39] And though RTF supports metadata like title and author, not all implementations support this. Nevertheless, the RTF format is consistent enough to be considered highly portable and acceptable for cross-platform use.

Objects[edit]

Microsoft Object Linking and Embedding (OLE) objects and Macintosh Edition Manager subscriber objects allow embedding of other files inside the RTF, such as tables or charts from spreadsheet application. However, since these objects are not widely supported in programs for viewing or editing RTF files, they also limit RTF’s interoperability.[40][41][42][43][44] If software that understands a particular OLE object is not available, the object is displayed using a picture of the object which is embedded along with it.[45][46]

Pictures[edit]

RTF supports inclusion of JPEG, PNG, Enhanced Metafile (EMF), Windows Metafile (WMF), Apple PICT, Windows device-dependent bitmap, Windows device-independent bitmap and OS/2 Metafile picture types in hexadecimal (the default) or binary format in a RTF file. Not all of these picture types are supported in all RTF readers, however. When a RTF document is opened in software that does not support the picture type of an inserted picture, the picture is not displayed. RTF writers usually either convert an inserted picture in an unsupported picture type to one in a supported picture type, or do not include picture at all.

For better compatibility with Microsoft products, some RTF writers include the same picture in two different picture types in one RTF file: one supported picture type to display, and one uncompressed WMF copy of the original picture to improve compatibility with some Microsoft applications like Wordpad.[47]

This method increases the RTF file size dramatically. The RTF specification does not require this method, and several implementations do not include the WMF copy (e.g. Abiword or Ted).

For Microsoft Word, it is also possible to set a specific registry value («ExportPictureWithMetafile=0») to prevent Word from saving the WMF copy.[47]

Fonts[edit]

RTF supports embedding of fonts used in the document, but this feature is not widely supported in software implementations.[48][49][50]

RTF also supports generic font family names used for font substitution: roman (serif), Swiss (sans-serif), modern (monospace), script, decorative and technical.[19] This feature is not widely supported either.

Annotations[edit]

Since RTF 1.0, the RTF specification has supported document annotations/comments.[19] The RTF 1.7 specification defined some new features for annotations, including the date stamp (there was previously only «time stamp») and parents of annotations.[27] When a RTF document with annotations is opened in an application that does not support RTF annotations, the annotations are not shown. Similarly, when a document with annotations is saved as RTF in an application that does not support RTF annotations, the annotations are not preserved in the RTF file. Some implementations, like Abiword (since version 2.8) and IBM Lotus Symphony (up to version 1.3), may hide annotations by default or require some user action to display them.

The RTF specification also supports footnotes, which are widely supported in RTF implementations (e.g. in OpenOffice.org, Abiword, KWord, Ted, but not in Wordpad). Endnotes are implemented as a variation on footnotes, so applications that support footnotes but not endnotes will render an endnote as a footnote.

Microsoft products do not support comments within footers, footnotes or headers. Similarly, Microsoft products do not support footnotes in headers, footers, or comments. Inserting a comment or a footnote in one of these disallowed contexts may result in a corrupted document.[29]

Drawing objects[edit]

The RTF 1.2 specification defined use of drawing objects, known as shapes, such as rectangles, ellipses, lines, arrows and polygons. The RTF 1.5 specification introduced many new control words for drawing objects.[25]

However, many RTF implementations, such as Apache OpenOffice, do not support drawing objects[51] (though they are supported in LibreOffice 4.0 on[52]) or Abiword.[53] Applications which do not support RTF drawing objects do not display or save the shapes. Some implementations will also not display any text inside drawing objects.[54][55]

Security concerns[edit]

Unlike Microsoft Word’s DOC format, as well as the newer Office Open XML and OpenDocument formats, RTF does not support macros. For this reason, RTF was often recommended over those formats when the spread of computer viruses through macros was a concern. However, having the .RTF extension does not guarantee a safe file, since Microsoft Word will open standard DOC files renamed with an RTF extension and run any contained macros as usual. Manual examination of a file in a plain text editor such as Notepad, or use of the file command in a UNIX-like systems, is required to determine whether or not a suspect file is really RTF.[9][56] Enabling Word’s «Confirm file format conversion on open» option can also assist by warning a document being opened is in a format that does not match the format implied by the file’s extension, and giving the option to abort opening that file. One exploit attacking a vulnerability was patched in Microsoft Word in April 2015.[57]

Since 2014 there have been malware RTF files embedding OpenXML exploits.[58]

Implementations[edit]

Each RTF implementation usually implements only some versions or subsets of the RTF specification.[7] Many of the available RTF converters cannot understand all new features in the latest RTF specifications.[37][59]

The WordPad editor in Microsoft Windows creates RTF files by default. It once defaulted to the Microsoft Word 6.0 file format, but write support for Word documents (.doc) was dropped in a security update. Read support was also dropped in Windows 7. WordPad does not support some RTF features, such as headers and footers.[60] However, WordPad can read and save many RTF features that it cannot create, including tables, strikeout, superscript, subscript, «extra» colors, text background colors, numbered lists, right or left indent, quasi-hypertext and URL linking, and various line spacings. RTF is also the data format for «rich text controls» in MS Windows APIs.[33]

The default text editor for macOS, TextEdit, can also view, edit and save RTF files as well as RTFD files, and uses the format as its default. As of July 2009, TextEdit has limited ability to edit RTF document margins. Much older Mac word processing application programs such as MacWrite and WriteNow had the same RTF abilities as TextEdit has.

The free and open-source word processors AbiWord, Apache OpenOffice, Bean, Calligra, KWord, LibreOffice and NeoOffice can view, edit and save RTF files. The RTF format is also used in the Ted word processor.

Scrivener uses individual RTF files for all the text files that make up a given «project».

SIL International’s freeware application for developing and publishing dictionaries uses RTF as its most common form of document output. RTF files produced by Toolbox are designed to be used in Microsoft Word, but can also be used by other RTF-aware word processors.

RTF can be used on some ebook readers because of its interoperability,[61] simplicity and low CPU processing requirements.

Libraries and converters[edit]

The open-source script rtf2xml can partially convert RTF to XML.[62][63]

GNU UnRTF is an open-source program to convert RTF into HTML, LaTeX, troff macros and other formats. pyth is a Python library to create and convert documents in RTF, XHTML and PDF format. Ruby RTF is a project to create Rich Text content via Ruby. RaTFink is a library of Tcl routines, free software, to generate RTF output, and a Cost script to convert SGML to RTF. RTF::Writer is a Perl module for generating RTF documents. PHPRtfLite is an API enabling developers to create RTF documents with PHP. Pandoc is an open source document converter with multiple output formats, including RTF. RTFGen is a project to create RTF documents via pure PHP. rtf.js is a JavaScript based library to render RTF documents in HTML.

The macOS command line tool textutil can convert files between rtf, rtfd, text, doc, docx, wordml, odt and webarchive formats.[64] The editor Ted can also convert RTF files to HTML and PS format.

Criticism[edit]

The Rich Text Format was the standard file format for text-based documents in applications developed for Microsoft Windows. Microsoft did not initially make the RTF specification publicly available, making it difficult for competitors to develop document conversion features in their applications. Because Microsoft’s developers had access to the specification, Microsoft’s applications had better compatibility with the format. Also, each time Microsoft changed the RTF specification, Microsoft’s own applications had a lead in time-to-market, because competitors had to redevelop their applications after studying the newer version of the format.

Novell alleged that Microsoft’s practices were anticompetitive in its 2004 antitrust complaint against Microsoft.[65][66]

See also[edit]

  • Rich Text Format Directory (.rtfd file type)
  • Enriched text format
  • List of document markup languages
  • Comparison of document markup languages
  • Revisable-Form Text (RFT), part of IBM’s Document Content Architecture (DCA)
  • TNEF, Transport Neutral Encapsulation Format, the Microsoft Outlook default message format

References[edit]

  1. ^ «Text Media Types». iana.org. 1993-06-08. Retrieved 2010-03-13.
  2. ^ «Application Media Types». iana.org. 2007-06-18. Retrieved 2010-08-20.
  3. ^ a b c Microsoft Corporation (May 1999). «Rich Text Format (RTF) Specification, version 1.6». Retrieved 2010-03-13.
  4. ^ a b Microsoft Corporation (2004-04-20). «Word 2003: Rich Text Format (RTF) Specification, version 1.8». Microsoft. Retrieved 2010-03-13.
  5. ^ John Siracusa (2005-04-28). «Mac OS X 10.4 Tiger – File types revisited». Retrieved 2010-03-13.
  6. ^ «tutorial: Rich Text Format (RTF)». Colorado State University. Archived from the original on 2012-06-30. Retrieved 2010-03-13. Like «.doc,» RTF is a proprietary file format, but it has been designed to be more widely compatible and transferable.
  7. ^ a b c d «4.3 Non-HTML file formats». e-Government Unit. May 2002. Archived from the original on 2007-04-02. Retrieved 2010-03-13. There are many different revisions of Microsoft’s proprietary Rich Text Format and portability of files will depend on what version of RTF is being used.
  8. ^ e-Government Unit (May 2002). «4.3 Non-HTML file formats (archived site)». Archived from the original on 2007-03-21. Retrieved 2011-01-12. There are many different revisions of Microsoft’s proprietary Rich Text Format and portability of files will depend on what version of RTF is being used.
  9. ^ a b «Benefits of Rich Text Format (RTF)». Desktop Publishing, Presentations & Word Processing. ETR Associates. Archived from the original on 2008-03-23.
  10. ^ «Sean M. Burke – RTF-Writer – The RTF Cookbook». Retrieved 2013-09-16.
  11. ^ Resnick, P.; Walker, A. «The text/enriched MIME Content-type».
  12. ^ Borenstein, N.; Freed, N. «MIME (Multipurpose Internet Mail Extensions): Mechanisms for Specifying and Describing the Format of Internet Message Bodies».
  13. ^ Borenstein, N.; Freed, N. «MIME (Multipurpose Internet Mail Extensions) Part One: Mechanisms for Specifying and Describing the Format of Internet Message Bodies».
  14. ^ Inc), Niveditha Narva (Beyondsoft Consulting. «Changes in Word 2010 (for IT pros». docs.microsoft.com.
  15. ^ Microsoft (2011-03-17), GS26 RS Referencing Explanatory Report (RER) for DR 10-0017, General: missing normative reference, for RTF, archived from the original (PDF) on 2014-05-12, retrieved 2011-04-02
  16. ^ «Information about the Rich Text Format (RTF) version specifications for various versions of Word». 2007-02-21. Retrieved 2010-03-13.
  17. ^ «Those who forget Santayana…». Rob Weir. 2007-12-20. Retrieved 2010-03-13.
  18. ^ Microsoft Corporation, Rich-Text Format (RTF) Specification – RTF Version 1.0 (RTF), retrieved 2010-03-13
  19. ^ a b c Microsoft Corporation (June 1992), Microsoft Product Support Services Application Note (Text File) – GC0165: Rich-Text Format (RTF) Specification (TXT), retrieved 2010-03-13
  20. ^ Microsoft Corporation, Rich Text Format Specification v. 1.2 (RTF), retrieved 2010-03-13
  21. ^ Rich Text Format Specification v. 1.2 (PDF), retrieved 2010-03-13
  22. ^ Microsoft Corporation (January 1994), Rich Text Format (RTF) Specification – RTF Version 1.3 (RTF), retrieved 2010-03-13
  23. ^ Microsoft Corporation (January 1994), Rich Text Format (RTF) Specification – RTF Version 1.3 (TXT), retrieved 2010-03-13
  24. ^ Microsoft Corporation. «RTF – Rich Text Format». Retrieved 2010-03-13.
  25. ^ a b c d e Microsoft Corporation. «Rich Text Format (RTF) Version 1.5 Specification». Retrieved 2010-03-13.
  26. ^ Word 2002 Tool: Rich Text Format Specification, archived from the original on November 12, 2010, retrieved 2012-09-26
  27. ^ a b Microsoft Corporation (2001-08-31), Word 2002 Tool: Rich Text Format Specification – 8/2001– Word 2002 RTF Specification, archived from the original (EXE (ZIP)) on 2016-06-10, retrieved 2010-03-13
  28. ^ «RTF 1.9 Specification (Word 2007)». Greg Duncan. 2007-01-09. Retrieved 2010-03-13.
  29. ^ a b c Microsoft Corporation (2008-03-20). «Word 2007: Rich Text Format (RTF) Specification, version 1.9.1» (PDF). Retrieved 2020-02-18.
  30. ^ «Rich Text Format (RTF) Version 1.5 Specification». www.biblioscape.com.
  31. ^ Microsoft RTF Syntax
  32. ^ Kaplan, Michael S (2005-11-08). «More than you ever wanted to know about CP_SYMBOL». Sorting It All Out.
  33. ^ a b c d Sean M. Burke (July 2003). «RTF Pocket Guide». Amazon UK. Retrieved 2010-03-13.
  34. ^ RTF Pocket Guide by O’Reilly Media, retrieved 2010-03-13
  35. ^ Sean M. Burke (2008-07-12). «Rich Text Format – MSWord generates some scary RTF». Retrieved 2010-03-13.
  36. ^ a b Mark de Does (2009-10-23). «Ted, an easy rich text processor». Retrieved 2010-03-13.
  37. ^ a b «How to Import Microsoft Word Files into WordPerfect for DOS». Retrieved 2010-03-13.
  38. ^ «Abiword Help – File Formats». Retrieved 2010-03-13.
  39. ^ «Opening Rich Text Format (RTF) files». Retrieved 2010-03-13.
  40. ^ Byfield, Bruce (2005-08-23). «FOSS word processors compared: OOo Writer, AbiWord, and KWord». Linux.com. The Linux Foundation. Retrieved 2020-09-29.
  41. ^ Byfield, Bruce (2005-07-28). «Sharing files between OpenOffice.org and Microsoft Office». Linux.com. The Linux Foundation. Retrieved 2020-09-29.
  42. ^ Sharma, Mayank (2008-11-20). «SoftMaker Office 2008 focuses on compatibility with Microsoft Office». Linux.com. The Linux Foundation. Retrieved 2020-09-29.
  43. ^ Byfield, Bruce (2006-11-21). «SoftMaker Office 2006 beta: Not a killer app». Linux.com. The Linux Foundation. Retrieved 2020-09-29.
  44. ^ Lagadec, Philippe (2006-11-30). «OpenOffice / OpenDocument and Microsoft Office 2007 / Open XML security» (PDF). PacSec 2006 Conference. Retrieved 2020-09-29.
  45. ^ Gong, Rhett (2005-09-05). «RE: OLE object — bitmap representation?». Newsgroup: microsoft.public.win32.programmer.ole. Usenet: iZFkEiesFHA.1204@TK2MSFTNGXA01.phx.gbl. Retrieved 2020-09-29.
  46. ^ «ACC: Why OLE Objects Cause Databases to Grow». Microsoft. 2007-01-19. Archived from the original on 2008-02-15.
  47. ^ a b «Document file size increases with EMF, PNG, GIF, or JPEG graphics in Word». Retrieved 2011-03-01.
  48. ^ «Embedded fonts are not displayed as expected in the documents that are saved as RTF in Word». Microsoft Corporation. 2007-02-20. Retrieved 2010-03-17.
  49. ^ «Embedding fonts in RTF file». 2005-04-23. Retrieved 2010-03-17.
  50. ^ «OpenOffice.org Issue – MS Interoperability: embedd fonts into the document». Retrieved 2010-03-17.
  51. ^ «Issue 3790 – RTF: Import Word 97-2000 RTF for Drawing Objects (Shapes)». Apache OpenOffice (AOO) Bugzilla. Apache Software Foundation. Retrieved 2014-10-27.
  52. ^ «LibreOffice 4.0 Release Notes». The Document Foundation. Retrieved 2014-10-27.
  53. ^ «Re: Drawing inside Abiword». 2006-03-15. Retrieved 2011-05-21.
  54. ^ «OOoForum.org – Problem opening RTF file in Writer». Archived from the original on 2011-09-28. Retrieved 2011-05-19.
  55. ^ «OpenOffice.org Bugzilla – Bug 113308 – Vertical text in border». Retrieved 2011-05-19.
  56. ^ «Avoiding Macro Viruses». Archived from the original on June 10, 2011. Retrieved 2015-06-06.
  57. ^ Paul Ducklin (8 September 2015). «Anatomy of a malicious email: Crooks exploiting recent Word hole – Naked Security». Sophos Web site. Retrieved 16 February 2016.
  58. ^ «malware tracker blog: Cryptam Document Analysis + OpenXML embedded in RTF». Blog.malwaretracker.com. Retrieved 16 February 2016.
  59. ^ Wilfried Hennings (2010). «Converters from PC Textprocessors to LaTeX – Overview – Converting from RTF». Retrieved 2010-03-13.
  60. ^ «Why does RTF not work properly in WordPad and NotePad?». FamilySearch. Archived from the original on 2009-08-05. Retrieved 2010-03-13.
  61. ^ «Handbook on Minimum Information Interoperability Standards (MIOS)» (PDF). Department of Public Service and Administration (South Africa). 2002-04-16. Retrieved 2010-07-11.
  62. ^ «rtf2xml: convert MS RTF to XML». Retrieved 2010-06-05.
  63. ^ «rtf2xml – The Man Page». Retrieved 2010-06-05.
  64. ^ «textutil man page». Retrieved 2013-06-25.
  65. ^ Novell (2004-11-12), Novell Files WordPerfect Antitrust Lawsuit against Microsoft (PDF), retrieved 2010-03-13
  66. ^ «The Novell Antitrust Complaint (as text) & A Law About Antitrust and Standards Writing». 2004-11-17. Archived from the original on 2005-12-30. Retrieved 2010-03-13.

External links[edit]

  • RTF 1.9.1 specification, March 2008, from Microsoft
  • RTF 1.9.1 specification, March 2008, via earlier download from Microsoft and Internet Archive
  • RTF 1.8 specification, April 2004, from ysagnier.free.fr
  • RTF 1.6 specification, May 1999, from Microsoft
  • RTF 1.5 specification, April 1997, from biblioscape.com
  • RTF 1.0, 1.2, 1.3, 1.5 and 1.7 specifications, from the RTF Tools open-source project
  • RTF 1.0 specification, June 1992, from the latex2rtf open-source project
  • RTF Pocket Guide, book homepage
  • RTF Character Set to Code Page, last edited June 2017

Microsoft’s RTF format allows files to be opened, shared and edited in various editors and word processors, even with text formatting features and embedded graphics. In addition, the Rich Text Format doesn’t use macros and is therefore less susceptible to malware when formatted texts are sent by email.

Contents

  1. Rich Text Format vs. plain text format
  2. What are the features of an RTF file?
  3. Where is RTF used?
  4. How do you open an RTF file?
  5. What are the advantages of RTF?

The Rich Text Format was developed by Microsoft in 1987 for Word 3.0. Many users will know RTF mainly as the standard format of WordPad in Windows. Unlike with plain text files, the Rich Text Format enables you to open and edit a text file including its formatting features across software and manufacturers.

What are the features of an RTF file?

Unlike a TXT file, the Rich Text Format can contain not only plain text characters but also various formatting features such as the size, type and markup of fonts, and even embedded graphics in the form of formatting instructions or text markup. Since an RTF file can be opened, read and edited by almost any word processing program, RTF functions as a universal text file format that can be used to exchange plain or formatted text files regardless of manufacturer or program.

Tip

Anyone who regularly works with text or media files should know the most important and safest file extensions. You’ll learn the most important things about file extensions at a glance in our guide.

Where is RTF used?

RTF can be used almost everywhere and with any word processor. In Microsoft Word, as well as in a free Word alternative, RTF files can be rendered together with text formatting. However, to avoid unwanted formatting errors, it’s recommended that RTF files are not provided with text formatting that’s too complex. For example, object anchors such as text frames or images and templates can result in the file contents not being displayed true to the original. Fonts should be pre-installed there for optimal display on the target system.

RTF is particularly widespread as the standard format of the Microsoft program WordPad. It can also be found in editors such as Apple’s TextEdit, which uses RTF as its default. Although RTF remains popular as an interchange format, better file format import filters and simplified markup languages such as Markdown mean that RTF is likely to become less common in the future.

How do you open an RTF file?

An RTF file can be opened with any text editor or word processor, by double-clicking or right-clicking and then selecting “Open with…”. To save a file in a format other than RTF, you usually go to “Save as” and select the appropriate file type or extension.

Note

Converting RTF files is also possible with a WYSIWYG web text editor or with files encoded according to ASCII or UTF-8.

What are the advantages of RTF?

In addition to the cross-system and cross-manufacturer exchange and the opening and editing of formatted RTF files, the RTF format has the advantage of being less susceptible to viruses and malware. The simple reason for this is that an RTF file doesn’t contain macros which could become a gateway for macro viruses when files are exchanged. A good example is the malicious program Emotet, which has since been rendered mostly harmless. Therefore, RTF files offer the chance to exchange files relatively securely via email.

What is an RTF document, is it safe, how to use in Microsoft Word and why is it still being used?

“I’m looking for a job and many employers are asking for my resume in RTF format. How do I do that and why can’t I just use a Word document?” Ian G.

RTF (Rich Text Format) is an older document format that’s been around for some time and still has a place. Microsoft Word can make and read RTF documents with little trouble.

It’s called ‘Rich Text’ to distinguish is from ‘plain text’ files. RTF documents can store a lot of formatting information like bold, italic, fonts, sizes etc. Some complex formatting available in Word can’t be saved in RTF format but for most purposes, like a resume, it’s more than enough.

RTF isn’t designed to carry computer code so it’s considered safer from virus infection than, say, .doc files.  However RTF isn’t totally immune from viruses because hackers can mess with an RTF to trick Word into running nasty programs on your computer. Microsoft sometimes has to patch Office or Windows to block a security hole via RTF files.

Save an RTF document

To make an RTF document, go to File | Save As and choose Rich Text Format from the long list of options.

You can work on an RTF document all the time or have a Word document and ‘Save As’ to RTF when you need a copy to send elsewhere.

Open an RTF

Word’s File | Open dialog defaults to showing a range of document types including RTF, so you should only have to point to the correct folder and .RTF documents will appear.

If you want to see only RTF documents in a folder choose ‘Rich Text Format (*.rtf)’ from the pull down list as shown above. This can be handy if you’ve trying to find an RTF document among many other files.

Word will open an RTF and let you edit it normally. It’ll show in the title bar as ‘Compatibility mode’ which is what Word will do with any document that isn’t in the most recent document type and version. Word will save back to RTF without any conversion dialogs.

Word editing an RTF file, always shows as ‘Compatibility Mode’.

Pros and Cons

RTF is a widely accepted document format across many operating systems and programs. Almost any word-processor or text editor can open an RTF document. So it’s a good choice when you don’t know what the receiver of a document can accept.

It also has no macro or programming capability. That means an RTF document can’t easily carry any kind of virus or nasty. There are some exploits that take advantage of RTF conversion to, say Microsoft Word.

The major downside is file size. RTF documents are not compressed so they are much larger than the same document saved in .docx or .odt formats that automatically shrink the file.

RTF documents have no password protection or encryption options to prevent prying eyes.

Why RTF?

Why do some companies ask for RTF resumes? We can only guess (we’d love to hear from some HR people for the inside scoop).

Most likely it’s for consistency. Dealing with many job applications can be difficult if people are sending documents in various different formats. Asking for resumes in single file format makes the process lot easier for the employer.

Asking for RTF means anyone should be able to comply, regardless of what software they are using. Even ‘old’ word processing software can make an RTF document.

The lower virus risk of RTF documents, combined with virus scans by the employer, reduces any risk of infection from a job applicant’s document.

Расширенный текстовый формат

Расширение имени файла

.rtf

Тип интернет-СМИ

текст /
приложение RTF / RTF

Типовой код «RTF».
Единый идентификатор типа (UTI) public.rtf
Магическое число {rtf
Разработано Microsoft
Первый выпуск 1987 ; 34 года назад
Последний релиз

1.9.1
(19 марта 2008 г . ; 13 лет назад )

Тип формата Формат файла документа
Открытый формат ? Нет

Rich Text Format (часто сокращенно RTF ) представляет собой собственный формат файла документа с опубликованной спецификации не разработанной корпорацией Microsoft с 1987 до 2008 года для кросс-платформенного обмена документами с продуктами Microsoft. До 2008 года Microsoft публиковала обновленные спецификации для RTF с основными исправлениями версий Microsoft Word и Office .

Большинство текстовых процессоров могут читать и писать некоторые версии RTF. Существует несколько различных редакций спецификации RTF; переносимость файлов будет зависеть от того, какая версия RTF используется.

RTF не следует путать с обогащенным текстом или его предшественником Rich Text или с IBM RFT-DCA (Revisable Format Text-Document Content Architecture), поскольку это разные спецификации.

История

Ричард Броди , Чарльз Симони и Дэвид Любберт, члены команды разработчиков Microsoft Word , разработали оригинальный RTF в середине-конце 1980-х годов. Первый считыватель и писатель RTF, выпущенный в 1987 году как часть Microsoft Word 3.0 для Macintosh , в котором реализована спецификация RTF версии 1.0. Все последующие выпуски Microsoft Word для Macintosh, а также все версии Windows могут читать и писать в формате RTF.

Microsoft поддерживает RTF. Последняя версия была 1.9.1 в 2008 году, в которой реализованы функции Office 2007 . Microsoft прекратила работу над улучшением спецификации RTF, поэтому новые функции Word 2010 или более поздней версии не будут правильно сохраняться в RTF. Microsoft не ожидает дальнейших обновлений RTF, но заявила о готовности рассмотреть редакционные и другие несущественные изменения спецификации RTF в течение соответствующего периода голосования по ISO / IEC 29500 .

Файлы RTF использовались для создания файлов справки Windows, хотя с тех пор они были заменены файлами справки Microsoft Compiled HTML Help .

Спецификации RTF для Microsoft Word

Версия RTF Дата публикации Версия Microsoft Word Дата выпуска MS Word Примечания
1.0 1987 г. Microsoft Word 3 1987 г. Последняя редакция вышла в июне 1992 года. В редакции 1992 года была определена поддержка объектов Microsoft Object Linking and Embedding (OLE) и объектов подписчика Macintosh Edition Manager. Он также поддерживает включение в RTF типов изображений метафайла Windows , PICT , зависящего от устройства Windows, независимого от устройства растрового изображения и типа изображения метафайла OS / 2 .
1.1 Microsoft Word 4 1989 г. Разрешено встраивание шрифтов , что позволяет размещать данные о шрифтах внутри файла.
1.2 1993 г. Microsoft Word 5 1991 г.
1.3 Январь 1994 Microsoft Word 6 1993 г. 1/94 GC0165; для независимости от устройств и взаимодействия рекомендуется встраивание растровых изображений в метафайлы Windows вместо использования независимых от устройств растровых изображений Windows или зависящих от устройств Windows.
1.4 Сентябрь 1995 г. Microsoft Word 95 / Word 7 1995 г.
1.5 Апрель 1997 г. Microsoft Word 97 / Word 8 1997 г. Введен Unicode RTF, который поддерживает 16-битную схему кодирования символов Unicode; определено включение типов изображений PNG , JPEG и EMF в шестнадцатеричном (по умолчанию) или двоичном формате в файл RTF. Также содержала японскую локальную спецификацию RTF под названием RTF-J для японской версии Word; RTF-J несколько отличается от стандартной спецификации RTF.
1.6 Май 1999 г. Microsoft Word 2000 / Word 9 1999 г. Включены Pocket Word и Exchange (используются в преобразованиях RTF-HTML).
1,7 Август 2001 г. Microsoft Word 2002 / Word 10 2001 г. 8 / 2001– Спецификация Word 2002 RTF
1,8 Апрель 2004 г. Microsoft Word 2003 / Word 11 2003 г. 10 / 2003– Спецификация Word 2003 RTF
1.9.1 19 марта 2008 г.
(RTF 1.9 — опубликовано в январе 2007 г.)
Microsoft Word 2007 / Word 12 2006 г. Разрешенная разметка XML — настраиваемые теги XML, смарт- теги, математические элементы в документе RTF, защита паролем, элементы, соответствующие Office Open XML Ecma-376, часть 4

Синтаксис кода

На синтаксис RTF повлиял язык набора текста TeX . Он программируется с использованием групп, обратной косой черты, управляющего слова и разделителя. Группы заключаются в фигурные скобки ({}) и указывают, какие атрибуты следует применять к определенному тексту.

Обратная косая черта () вводит управляющее слово, которое является специально запрограммированной командой для RTF. Контрольные слова могут иметь определенные состояния, в которых они активны. Эти состояния представлены числами. Например,

b0
указывает, что полужирный текст отключен
b1
указывает, что жирный текст включен

Разделитель — это одно из трех:

  1. Пространство
  2. Цифра или дефис (например, -23, 23, 275).
  3. Символ, отличный от цифры или буквы (например, , /,})

В качестве примера следующий код RTF

 {rtf1ansi{fonttblf0fswiss Helvetica;}f0pard
 This is some {b bold} text.par
 }

будет отображаться следующим образом:

Это какой-то жирный текст.

Кодировка символов

Стандартный файл RTF может состоять только из 7-битных символов ASCII , но может использовать escape-последовательности для кодирования других символов. Два escape-символа — это escape-символы кодовой страницы, а начиная с RTF 1.5, escape-символы Unicode . В escape-последовательности кодовой страницы две шестнадцатеричные цифры после обратной косой черты и апострофа пишущей машинки обозначают символ, взятый с кодовой страницы Windows. Например, если установлена ​​кодовая страница Windows-1256 , последовательность 'c8будет кодировать арабскую букву bāʼ ب. Также можно указать «Набор символов» в преамбуле документа RTF и связать его с заголовком. Например, в преамбуле есть текст f3fnilfcharset128, тогда в теле документа текст f3'bd'f0будет представлять кодовую точку 0xbd 0xf0 из набора символов 128 (который соответствует кодовой странице Shift-JIS), который кодирует «金».

Набор символов RTF Кодовая страница Описание
0 Окна-1252 Латинский алфавит, Западная Европа / Америка
1 0 Кодовая страница Windows API по умолчанию для языкового стандарта системы
2 42 Набор символов ( PUA-сопоставленный )
77 2 Кодовая страница совместимости с Macintosh по умолчанию для системной локали
128 Окна-932 Японский, Shift JIS (версия для Windows)
129 Окна-949 Корейский, Единый код хангыль (расширенный Wansung)
130 Окна-1361 Корейский, Johab (версия на основе ASCII)
134 Окна-936 Китайский, GBK (расширенный GB 2312 )
136 Окна-950 Китайская, Big5
161 Окна-1253 Греческий
163 Окна-1254 Латинский алфавит, турецкий
177 Окна-1258 Латинский алфавит, вьетнамский
178 Окна-1255 иврит
186 Окна-1256 арабский
204 Окна-1257 Балтийский
222 Окна-1251 Кириллица
238 Окна-1250 Латинский алфавит, Восточная Европа
255 1 Кодовая страница OEM по умолчанию для языкового стандарта системы

Для экранирования Unicode используется управляющее слово u, за которым следует 16-битовое целое число со знаком, которое соответствует номеру кодовой единицы Unicode UTF-16. Для программ без поддержки Unicode за ним должно следовать ближайшее представление этого символа в указанной кодовой странице. Например, u1576?дает арабскую букву bāʼ ب, но указывает, что старые программы, не поддерживающие Unicode, должны вместо этого отображать ее как вопросительный знак.

Управляющее слово uc0может использоваться, чтобы указать, что последующие escape-последовательности Unicode в текущей группе не определяют символ подстановки.

До выпуска спецификации RTF версии 1.5 в 1997 году RTF обрабатывал только 7-битные символы напрямую и 8-битные символы, закодированные как шестнадцатеричные (с использованием 'xx). Однако, начиная с RTF 1.5, управляющие слова RTF обычно принимают в качестве аргументов 16-разрядные числа со знаком. Значения Unicode больше 32767 должны быть выражены отрицательными числами. Если символ Unicode находится за пределами BMP , он кодируется суррогатной парой. Поддержка Unicode была сделана из-за изменений в обработке текста в Microsoft Word — Microsoft Word 97 — это приложение с частично поддержкой Unicode, которое обрабатывает текст с использованием 16-битной схемы кодировки символов Unicode . Microsoft Word 2000 и более поздние версии — это приложения с поддержкой Unicode, которые обрабатывают текст с использованием 16-разрядной схемы кодировки символов Unicode.

Поскольку файлы RTF обычно представляют собой 7-битный простой текст ASCII , их можно легко передавать между операционными системами на базе ПК. Конвертеры, которые взаимодействуют с Microsoft Word для MS Windows или Macintosh, обычно ожидают передачи данных в виде 8-битных символов и двоичных данных, которые могут содержать любые 8-битные значения.

Удобочитаемость

RTF — это формат данных для сохранения и обмена документами, а не язык разметки ; он не предназначен для интуитивно понятного и легкого набора текста. Тем не менее, в отличие от многих форматов обработки текстов, код RTF может быть читаемым человеком . Когда файл RTF, содержащий в основном латинские символы без диакритических знаков , рассматривается как простой текстовый файл, основной текст ASCII доступен для чтения при условии, что автор сохранил краткое форматирование.

Когда был выпущен RTF, большинство текстовых процессоров использовали двоичные форматы файлов; Microsoft Word, например, использовал формат файла .DOC . RTF был уникален своим простым управлением форматированием, которое позволяло программам, не поддерживающим RTF, таким как Microsoft Notepad, открывать и предоставлять читаемые файлы. Сегодня большинство текстовых процессоров перешли на форматы файлов на основе XML (Word перешел на формат файлов .docx ). Тем не менее, эти файлы содержат большой объем кода форматирования, поэтому часто в десять или более раз больше, чем соответствующий простой текст.

Чтобы быть совместимым со стандартом RTF, символы, отличные от ASCII, должны быть экранированы. Таким образом, даже при кратком форматировании текст, в котором используются определенные тире и кавычки, становится менее разборчивым. Латинские языки с большим количеством диакритических знаков особенно трудно читать в RTF, так как они приводят к заменам типа ‘f1 вместо ñ и ‘ e9 вместо é . Нелатинские шрифты в RTF неразборчивы — например, u21563 используется для吻. С самого начала RTF также поддерживал встроенные объекты Microsoft OLE и объекты подписчика Macintosh Edition Manager, которые не читаются человеком.

Общее использование и совместимость

Большинство текстовых редакторов поддерживают либо импорт и экспорт формата RTF для некоторых спецификаций RTF, либо прямое редактирование, что делает его «общим» форматом между несовместимыми в других отношениях программами для обработки текстов и операционными системами. Большинство приложений, которые читают файлы RTF, игнорируют неизвестные управляющие слова RTF. Эти факторы способствуют его совместимости , хотя он по-прежнему зависит от конкретной используемой версии RTF. Есть несколько сознательно разработанных или случайно созданных диалектов RTF.

RTF — это внутренний язык разметки, используемый Microsoft Word. С 1987 года файлы RTF можно передавать между многими старыми и новыми компьютерными системами (а теперь и через Интернет), несмотря на различия между операционными системами и их версиями. Это делает его полезным форматом для основных форматированных текстовых документов, таких как инструкции по эксплуатации, резюме, письма и небольшие информационные документы. Эти документы, как минимум, поддерживают форматирование текста жирным шрифтом, курсивом и подчеркиванием. Также обычно поддерживаются текст с выравниванием по левому, центру и правому краю, спецификация шрифта и поля документа.

Значения по умолчанию для шрифтов и полей, предустановки стилей и другие функции различаются в зависимости от настроек программы. Также может быть несовместимость между различными версиями RTF, например, между RTF 1.0 1987 и более поздними спецификациями или между RTF 1.0-1.4 и RTF 1.5+ при использовании символов Unicode. И хотя RTF поддерживает такие метаданные, как название и автор, не все реализации это поддерживают. Тем не менее, формат RTF достаточно согласован, чтобы считаться легко переносимым и приемлемым для кроссплатформенного использования.

Объекты

Объекты связывания и встраивания объектов Microsoft (OLE) и объекты-подписчики Macintosh Edition Manager позволяют встраивать в RTF другие файлы, например таблицы или диаграммы, из приложения для работы с электронными таблицами. Однако, поскольку эти объекты широко не поддерживаются в программах для просмотра или редактирования файлов RTF, они также ограничивают совместимость RTF. Если программное обеспечение, которое понимает объект OLE, недоступно, объект обычно заменяется растровым представлением объекта (т. Е. Изображением) или не отображается вообще.

Фотографий

RTF поддерживает включение JPEG, PNG, расширенного метафайла (EMF), метафайла Windows (WMF), Apple PICT, зависящего от устройства растрового изображения Windows, независимого от устройства растрового изображения Windows и типов изображений метафайла OS / 2 в шестнадцатеричном (по умолчанию) или двоичном формате в файле RTF. Однако не все эти типы изображений поддерживаются всеми считывателями RTF. Когда документ RTF открывается в программном обеспечении, которое не поддерживает тип вставленного изображения, оно не отображается. Создатели RTF обычно либо конвертируют вставленное изображение из неподдерживаемого типа изображения в изображение из поддерживаемого типа изображения, либо вообще не включают изображение.

Для лучшей совместимости с продуктами Microsoft некоторые средства записи RTF включают одно и то же изображение в два разных типа изображений в один файл RTF: один поддерживаемый тип изображения для отображения и одну несжатую копию исходного изображения в формате WMF для улучшения совместимости с некоторыми приложениями Microsoft, такими как Wordpad.

Этот метод значительно увеличивает размер файла RTF. Спецификация RTF не требует этого метода, а некоторые реализации не включают копию WMF (например, Abiword или Ted).

Для Microsoft Word также можно установить определенное значение реестра («ExportPictureWithMetafile = 0»), чтобы Word не сохранял копию WMF.

Шрифты

RTF поддерживает встраивание шрифтов, используемых в документе, но эта функция широко не поддерживается в программных реализациях.

RTF также поддерживает общие имена семейств шрифтов, используемые для замены шрифтов : римский (с засечками ), швейцарский ( без засечек ), современный ( моноширинный ), шрифт , декоративный и технический . Эта функция также широко не поддерживается.

Аннотации

Начиная с RTF 1.0, спецификация RTF поддерживает аннотации и комментарии к документам. Спецификация RTF 1.7 определила некоторые новые функции для аннотаций, включая отметку даты (раньше была только «отметка времени») и родительские элементы аннотаций. Когда документ RTF с аннотациями открывается в приложении, которое не поддерживает аннотации RTF, аннотации не отображаются. Точно так же, когда документ с аннотациями сохраняется как RTF в приложении, которое не поддерживает аннотации RTF, аннотации не сохраняются в файле RTF. Некоторые реализации, такие как Abiword (начиная с версии 2.8) и IBM Lotus Symphony (до версии 1.3), могут скрывать аннотации по умолчанию или требовать некоторых действий пользователя для их отображения.

Спецификация RTF также поддерживает сноски, которые широко поддерживаются в реализациях RTF (например, в OpenOffice.org, Abiword, KWord, Ted, но не в Wordpad). Концевые сноски реализованы как разновидность сносок, поэтому приложения, которые поддерживают сноски, но не концевые сноски, будут отображать концевую сноску как сноску.

Продукты Microsoft не поддерживают комментарии в нижних колонтитулах, сносках или заголовках. Точно так же продукты Microsoft не поддерживают сноски в верхних, нижних колонтитулах или комментариях. Добавление комментария или сноски в один из этих запрещенных контекстов может привести к повреждению документа.

Объекты рисования

Спецификация RTF 1.2 определяет использование объектов рисования, известных как формы, таких как прямоугольники, эллипсы, линии, стрелки и многоугольники. Спецификация RTF 1.5 представила много новых управляющих слов для рисования объектов.

Однако многие реализации RTF, такие как Apache OpenOffice , не поддерживают объекты рисования (хотя они поддерживаются в LibreOffice 4.0 on) или Abiword. Приложения, которые не поддерживают объекты чертежа RTF, не отображают и не сохраняют формы. Некоторые реализации также не будут отображать текст внутри объектов чертежа.

Проблемы безопасности

В отличие от формата DOC Microsoft Word, а также новых форматов Office Open XML и OpenDocument , RTF не поддерживает макросы . По этой причине RTF часто рекомендовали вместо этих форматов, когда распространение компьютерных вирусов через макросы было проблемой. Однако наличие расширения .RTF не гарантирует безопасность файла, поскольку Microsoft Word будет открывать стандартные файлы DOC, переименованные с расширением RTF, и запускать любые содержащиеся в них макросы как обычно. Ручная проверка файла в текстовом редакторе, таком как Блокнот , или использование fileкоманды в UNIX- подобных системах требуется, чтобы определить, действительно ли подозрительный файл является RTF. Включение параметра Word «Подтверждать преобразование формата файла при открытии» также может помочь, предупреждая, что открываемый документ имеет формат, который не соответствует формату, подразумеваемому расширением файла, и давая возможность прервать открытие этого файла. Один эксплойт, атакующий уязвимость, был исправлен в Microsoft Word в апреле 2015 года.

С 2014 года появились RTF-файлы вредоносных программ, в которые встроены эксплойты OpenXML .

Реализации

Каждая реализация RTF обычно реализует только некоторые версии или подмножества спецификации RTF. Многие из доступных конвертеров RTF не могут понять все новые функции в последних спецификациях RTF.

WordPad редактор Microsoft Windows создает RTF файлы по умолчанию. Когда-то по умолчанию использовался формат файла Microsoft Word 6.0, но поддержка записи для документов Word (.doc) была отключена в обновлении безопасности. Поддержка чтения также была прекращена в Windows 7. WordPad не поддерживает некоторые функции RTF, такие как верхние и нижние колонтитулы. Однако WordPad может читать и сохранять многие функции RTF, которые он не может создать, включая таблицы, зачеркивание, надстрочный индекс, подстрочный индекс, «дополнительные» цвета, цвета фона текста, нумерованные списки, отступ справа или слева, квазигипертекст и связывание URL-адресов, а также различные межстрочные интервалы. RTF также является форматом данных для «элементов управления отформатированным текстом» в API MS Windows.

Текстовый редактор по умолчанию для macOS , TextEdit , также может просматривать, редактировать и сохранять файлы RTF, а также файлы RTFD и использует формат по умолчанию. По состоянию на июль 2009 года TextEdit имеет ограниченные возможности редактирования полей документа RTF. Намного более старые Mac слово приложения обработки программы , такие как MacWrite и WriteNow имели ту же способность , как в формате RTF TextEdit имеет.

Бесплатные текстовые процессоры с открытым исходным кодом AbiWord , Apache OpenOffice , Bean , Calligra , KWord , LibreOffice и NeoOffice могут просматривать, редактировать и сохранять файлы RTF. Формат RTF также используется в текстовом процессоре Ted .

Scrivener использует отдельные файлы RTF для всех текстовых файлов, составляющих данный «проект».

Бесплатное приложение SIL International для разработки и публикации словарей использует RTF как наиболее распространенную форму вывода документов. Файлы RTF, созданные с помощью Toolbox, предназначены для использования в Microsoft Word , но также могут использоваться другими текстовыми процессорами, поддерживающими RTF.

RTF можно использовать на некоторых устройствах для чтения электронных книг из-за его функциональной совместимости, простоты и низких требований к процессору.

Библиотеки и конвертеры

Сценарий с открытым исходным кодом rtf2xml может частично преобразовывать RTF в XML.

GNU UnRTF — это программа с открытым исходным кодом для преобразования RTF в макросы HTML, LaTeX, troff и другие форматы. pyth — это библиотека Python для создания и преобразования документов в форматах RTF, XHTML и PDF. Ruby RTF — это проект для создания содержимого Rich Text через Ruby . RaTFink — это библиотека подпрограмм Tcl, бесплатное программное обеспечение для генерации вывода RTF и сценарий Cost для преобразования SGML в RTF. RTF :: Writer — это модуль Perl для создания документов RTF. PHPRtfLite — это API, позволяющий разработчикам создавать документы RTF с помощью PHP . Pandoc — это конвертер документов с открытым исходным кодом с несколькими выходными форматами, включая RTF. RTFGen — это проект по созданию документов RTF с помощью чистого PHP . rtf.js — это библиотека на основе JavaScript для рендеринга документов RTF в HTML.

Инструмент командной строки macOS textutil может конвертировать файлы между форматами rtf, rtfd, text, doc, docx, wordml, odt и webarchive. Редактор Ted также может конвертировать файлы RTF в форматы HTML и PS.

Критика

Rich Text Format был стандартным форматом файлов для текстовых документов в приложениях, разработанных для Microsoft Windows. Microsoft изначально не делала спецификацию RTF общедоступной, что затрудняло разработку конкурентами функций преобразования документов в своих приложениях. Поскольку разработчики Microsoft имели доступ к спецификации, приложения Microsoft были лучше совместимы с форматом. Кроме того, каждый раз, когда Microsoft меняла спецификацию RTF, собственные приложения Microsoft лидировали по времени выхода на рынок, потому что конкурентам приходилось заново разрабатывать свои приложения после изучения новой версии формата.

Novell заявила, что действия Microsoft были антиконкурентными, в своей антимонопольной жалобе против Microsoft в 2004 году.

По словам блогера Ханнеса Шмидта, в спецификациях RTF отсутствуют некоторые семантические определения, необходимые для чтения, записи и изменения документов.

Смотрите также

  • Каталог в расширенном текстовом формате ( тип файлов .rtfd )
  • Расширенный текстовый формат
  • Список языков разметки документов
  • Сравнение языков разметки документов
  • Текст в изменяемой форме (RFT), часть архитектуры содержимого документов IBM (DCA)
  • TNEF , Transport Neutral Encapsulation Format, формат сообщений Microsoft Outlook по умолчанию

использованная литература

внешние ссылки

  • Спецификация RTF 1.9.1 , март 2008 г., от Microsoft
  • Спецификация RTF 1.9.1 , март 2008 г., ранее загруженная из архива Microsoft и Интернета.
  • Спецификация RTF 1.8 , апрель 2004 г., с сайта ysagnier.free.fr
  • Спецификация RTF 1.6 , май 1999 г., от Microsoft
  • Спецификация RTF 1.5 , апрель 1997 г., с сайта biblioscape.com
  • Спецификации RTF 1.0, 1.2, 1.3, 1.5 и 1.7 из проекта с открытым исходным кодом RTF Tools
  • Спецификация RTF 1.0 , июнь 1992 г., из проекта с открытым исходным кодом latex2rtf
  • Карманный справочник RTF , домашняя страница книги
  • Набор символов RTF для кодовой страницы , последнее изменение — июнь 2017 г.

What to Know

  • An RTF file is a text document that supports rich text formatting.
  • Open one with Word or a text editor like Notepad++.
  • Convert to PDF, TXT, DOCX, etc., with FileZigZag.

This article explains what RTF files are and how they’re different from other text documents, as well as how to open one or convert one to a different format like PDF or DOCX.

What Is an RTF File?

A file with the .RTF file extension is a Rich Text Format file. It’s different from a plain text file in that it can hold formatting like bold and italics, plus different fonts and images.

RTF files are useful because lots of programs support them. This means you can build one through a macOS program, for example, and then open the same file in Windows or Linux and have it look basically the same.

RTF is short for several other tech-related things, but none of them have anything to do with a file format. Response to Forecast, Real-Time Feedback, Realtek Fast Ethernet, and Run-Time Fault are some examples.

How to Open an RTF File

The easiest way to open an RTF file in Windows is to use WordPad since it’s pre-installed. If you’re on a Mac, Apple TextEdit or Apple Pages will work.

Double-clicking the file should be all you need to do to trigger one of those programs to open it. If that doesn’t work, search for the app on your computer to launch it, and then use the menus, such as File > Open, to select the RTF file.

There are also other text editors and word processors that work in basically the same way, like LibreOffice, OpenOffice, AbleWord, Jarte, AbiWord, WPS Office, and SoftMaker FreeOffice.

Zoho Docs and Google Docs are two ways you can open and edit RTF files online. The benefit with online apps is that you don’t have to install anything! Just use the upload option to import your file, and then you can edit it, print it off, share it, etc.

Some other, not-free ways to open one include using Microsoft Word or Corel WordPerfect.

A few of those Windows RTF editors also work with Linux and Mac. If you’re on macOS, you can also use Apple TextEdit or Apple Pages to open the file.

Not every program that supports RTF files can view the file in the same way. This is because some programs don’t support newer specifications of the RTF format. More on that below.

How to Convert an RTF File

The fastest way to convert the file is to use an online tool like FileZigZag. You can save the RTF as a DOC, PDF, TXT, ODT, or HTML file, among several other supported formats. Another online method that supports RTF to PDF, or to PNG, PCX, or PS, is Zamzar.

Doxillion is a free document file converter that can save RTF to DOCX and a number of other document formats. Similarly, Filestar can convert an RTF file to dozens of formats.

Yet another method is to use one of the editors from above. With the file already open, use the File menu or some sort of Export option to save to a different file format.

More Information on the RTF Format

The RTF format was first used in 1987 but stopped being updated by Microsoft in 2008. Since then, there have been some revisions to the format. What defines whether one document editor will display the file in the same way as the one that built it depends on what version of RTF is being used.

For example, while you can insert an image in an RTF file, not all readers know how to display it because they aren’t all updated to the latest RTF specification. When this happens, images won’t be displayed at all.

RTF files were once used for Windows help files, but have since been replaced by Microsoft Compiled HTML Help files that use the CHM file extension.

The first version of the format was released in 1987 and used by MS Word 3. From 1989 to 2006, versions 1.1 through 1.91 were released, with the last RTF version supporting things like XML markup, custom XML tags, password protection, and math elements.

Because the RTF format is XML-based and not binary, you can actually read the contents when you open the file in a plain text editor like Notepad.

RTF files don’t support macros, but that doesn’t mean «.RTF» files are macro-safe. For example, an MS Word file that contains macros can be renamed to have the .RTF file extension so it looks safe, but then when opened in MS Word, the macros can still run normally since it’s not truly an RTF file.

Although their file extensions look similar, RTF files aren’t the same as WRF or SRF files.

FAQ

  • Can an RTF file be a virus?

    Yes, but rarely. As with most file formats, there have been cases of RTF files containing malware, so scan any files you download from the web with one of the free antivirus software programs.

  • How do I open an RTF file on Android?

    The official Dropbox, Google Drive, and Microsoft Office ​apps can open RTF files on Android. You can also find plenty of apps dedicated to opening RTF files in the Google Play Store.

  • How do I save a word document as an RTF file?

    In Microsoft Word, go to File > Save As > Save as Type and select Rich Text Format (*.rtf). To open an RTF file in Word, make sure All files is selected when browsing for the document.

Thanks for letting us know!

Get the Latest Tech News Delivered Every Day

Subscribe

RTF or Rich Text File format was formalized in 1987 by Charles Simonyi, Richard Brodie, and David Luebbert from the Microsoft Word development team, for document interchange over cross-platforms. So what is an RTF file? Let’s find out…

Did You Know?
RTF files basically consist of commands written in ASCII codes. A single file consists of only 7-bit ASCII characters.

Microsoft developed RTF to bridge the gap between word processing software and system compatibility. RTF 1.0 version syntax was based on ‘TeX’, a macro and token-based typesetting language. It was developed by Microsoft Corporation for the purpose of formatting documents. Besides RTF, other formatting languages are HTML (Hypertext Markup Language) and SGML (Standard Generalized Markup Language). HTML provides formatting to documents over the World Wide Web. SGML is a richer version of HTML.

Type of File Rich Text Format File
File Classification Type Text
File Extension .rtf
Uniform Type Identifier public.rtf
Strings Identified ASCII: {rtf
Hexadecimal: 5C, 7B, 72, 72, 66

In RTF files, the characters beyond ASCII range are encoded by using ‘escape sequences’. Escape sequences are classified into: ‘Unicode escapes’ and ‘code page escapes’.

Unicode Escapes: u is the control word used. This word is followed by a 16-bit signed decimal integer. This integer describes the Unicode UTF-16 unit number.

Code Page Escapes: ’c8 is the control word used. This word containing a backslash and apostrophe is followed by representation of a character used from the Windows code page.

These commands are mainly written to define factors such as text formatting, text font, images embedded within the text, margin, etc. Formatting is necessary for various documents, such as resumes, letters, user manuals, etc. The basic functionalities of RTF documents include bold, italic, underline, font styles, margin, and alignment (left, center, right).

Concept of RTF Reader and Writer
A software that converts an RTF file into a formatted file is called a ‘reader‘. A software which converts a formatted file into an RTF file is called a ‘writer‘. Its task (for an application) involves separating the control information code from the text component. It then writes a new file with the text and associated RTF groups.

RTF Code Example
{
rtf1ansi{fonttblf0fswiss Helvetica;}f0pard
This is some {b bold} text.par
}
This file, when read by a program that supports RTF, would display the following output.
This is some bold text.

Definition Of Code Components

  • {} (braces)
    The code snippet is written within curly braces. They define a group.

  • This character (backslash) is used to define the start of the control code of an RTF file.
  • rtf
    This is written to indicate that the RTF document is valid. A valid document is said to be the one in which the group starts with rtf control code.
  • b
    This indicates bold type text.
  • par
    This is a control code for indicating end of a paragraph.

The snippet { b bold } indicates that the scope of ‘bold’ style is limited to the word ‘bold’. Nesting of groups, that is a group within group, is allowed in RTF files.

RTF Versions Timeline

RTF Version Year MS Word Version
RTF 1.0 1987 Microsoft Word 93
RTF 1.1 1991 Microsoft Word 4
RTF 1.2 1993 Microsoft Word 5
RTF 1.3 1994 Microsoft Word 6
RTF 1.4 1995 Microsoft Word 95
RTF 1.5 1997 Microsoft Word 97
RTF 1.6 1999 Microsoft Word 2000
RTF 1.7 2001 Microsoft Word 2002
RTF 1.8 2004 Microsoft Office 2003 Editions
RTF 1.9.1 2008 Microsoft Office 2007 Suites, Microsoft Office Word 2007

Advantages of RTF Files
File Compatibility: The most important feature of an RTF file is its compatibility with numerous operating systems and word processing applications.

Free from Viruses: Attached files (with .doc extension) are less trusted by business organizations or email servers as they can contain viruses. Unlike .doc files, .rtf files don’t contain macros or viruses that can hamper the word documents.

File Size: If a file contains only text data, then saving the file with .doc extension results in a larger file size. However, if the same file is saved as a .rtf file, it is smaller than the .doc file. RTF files use text-based encoding. This is advantageous, because smaller files are easier to download/upload, and also save disk storage space.

Disadvantages of RTF Files
Security: RTF files cannot be password protected. If the file contains confidential data which needs security, then it is advisable to use Word.

File Size: If a file contains images, Word-Art, etc, the size of the file is incredibly larger than corresponding .doc file. This is disadvantageous as it consumes more download/upload time as well as occupies more disk space.

RTF File Conversion
Steps to Save a New File in RTF

  1. Create the file in a word processing software.
  2. Click on ‘File’ menu ►’Save As’ option.
  3. On clicking ‘Save As’, a selection box appears. Enter a suitable name for the file in the ‘File Name’ field.
  4. In the ‘Save as Type’, select the file type as Rich Text Format (*.rtf) from the drop-down list.
  5. Click on ‘Save’ to save the file.

Only one file will be created with .rtf extension.

Steps to Save a Different Extension File in RTF

  1. Open the already created file that needs to be saved in .rtf.
  2. Click on ‘File’ menu ► ‘Save As’ option.
  3. On clicking ‘Save As’, a selection box appears. Enter a suitable file name in the ‘File Name’ field.
  4. In the ‘Save as Type’, select the file type as Rich Text Format (*.rtf) from the drop-down list.
  5. Click on ‘Save’ to save the file.

A new file will be created with an .rtf extension, whereas, the old file will be retained with its original extension.

Steps for Creating an RTF File in Word 2007

  1. Click on the ‘Office’ button.
  2. Click on ‘Save As’. On clicking ‘Save As’, a selection box appears. Enter a suitable file name in the ‘File Name’ field.
  3. In the ‘Save as Type’, select the file type as Rich Text Format (*.rtf) from the drop-down list.
  4. Click on ‘Save’ to save the file.

An RTF file can be changed to different file formats too while saving the word document. Free ‘RTF Document Converters’ are available on the Internet which can convert documents and E-books to RTF files.

Подробности
ноября 07, 2014
Просмотров: 29619

RTF или Rich Text Формат файла был оформлен в 1987 году Чарльзом Симони, Ричардом Броди, и Дэвидом Luebbert от команды разработчиков Microsoft Word, для обмена документами через кросс-платформы. Так что же такое файл RTF? Давайте выясним…

Знаете ли Вы?
RTF файлы в основном состоят из команд, написанных на ASCII кодах. Один файл состоит всего из 7-битовых символов ASCII.

Microsoft разработала RTF, чтобы преодолеть разрыв между текстовым редактором и совместимостью системы. RTF синтаксис 1.0 версии был основан на основе маркеров языка верстки. Он был разработана корпорацией Microsoft с целью форматирования документов. Языки верстки это такие языки форматирования, как HTML (Hypertext Markup Language) и SGML (стандартный обобщенный язык разметки). HTML обеспечивает форматирование документов во Всемирной паутине. SGML является обогащенной версией HTML.

В RTF-файлах, символы за пределами диапазона ASCII кодируются с помощью «управляющей последовательности». Управляющие последовательности подразделяются на: «Unicode escapes» и «code page escapes».

Unicode Escapes: это слово сопровождается 16-битовым десятичным числом. Это число описывает номер устройства Unicode UTF-16.

Code page escapes: это слово, содержит обратный слэш и апостроф представления символа, используемого на странице кода Windows.

Эти команды в основном написаны для определения факторов, таких как форматирование текста, шрифт текста, изображений, встроенных в тексте, маржи и т.д. Форматирование необходимо для различных документов, таких как резюме, письма, руководства пользователя и т.д. Основные функции RTF документов включают жирный шрифт, курсив, подчеркивание, стили шрифтов, отступ и выравнивание (левый, центральный, правый).

Концепция RTF чтения и записи

Программное обеспечение, которое преобразует RTF-файл в отформатированный файл называется «reader». Программное обеспечение, которое преобразует форматированный файл в формат RTF называется «writer». Его задача (для приложения) включает отделение управления информационного кода из текстового компонента. Затем он записывает новый файл с текстом и связанные с ним RTF группы.

Пример кода RTF

 { rtf1ansi{fonttblf0fswiss Helvetica;}f0pard Это некоторый {b жирный} текст.par } 

Этот файл, когда считывается программой, поддерживающей формат RTF, будет выглядеть так.

Это некоторый жирный текст.

Определение кода компонентов

  •          {} (фигурные скобки)

Фрагмент кода написанный в фигурных скобках определяет группу.

  •         

Этот символ (косая черта) используется для определения начала управляющего кода для файла RTF.

  •          RTF

Это пишут, чтобы указать, что RTF документ действителен. Действительный документ один, в котором группа начинается с RTF управления кода.

  •          b

Это указывает на жирный шрифт текста.

  •          par

Это код управления для индикации конца абзаца.

Фрагмент { b жирный} указывает, что сфера «жирного» стиля ограничивается словом «жирный». Вложение групп допускается в RTF-файлов.

Преимущества RTF файлов

Совместимость файла: Самой важной особенностью файла RTF является его совместимость с многочисленными операционными системами и приложениями для работы с текстом.

Защита от вирусов: вложенным файлам (с расширением .doc) менее доверяют бизнес-организации или почтовые серверы, поскольку они могут содержать вирусы. В отличие от файлов .doc, .rtf файлы не содержат макросы или вирусы, которые могут содержать текстовые документы.

Размер файла: текстовый файл сохраненный в.rtf формате, занимает меньше места, чем файл .doc. RTF файлы используют текстовую кодировку. Это выгодно, потому что мелкие файлы легче скачивать и закачивать, а также сэкономят место для хранения на диске.

Недостатки RTF файлов

Безопасность: RTF файлы не могут быть защищены паролем. Если файл содержит конфиденциальную информацию, которой необходимо обеспечить защиту, то желательно использовать другие форматы.

Размер файла: Если файл содержит изображения, Word-Art и т.д., размер файла невероятно больше, чем соответствующий .doc файл. Это является недостатком, так как он потребляет больше времени для загрузки и выгрузки, а также занимает больше места на диске.

Читайте также

What Does Rich Text Format Mean?

Rich text format (RTF) is a specific type of word processing document format evolved by Microsoft. This universal format helps provide compatibility between different word processing applications and operating systems, which is important for a diversified system where text document files move from one user’s desktop to another.

Rich text format is also known simply as rich text.

Techopedia Explains Rich Text Format

The rich text format allows for encoding basic elements of the file, such as the size, color and font of text. This format may not support more nuanced visual features in specific word processing applications like a modern version of Microsoft Word, but it does preserve a lot of the core design of the document file as it has been rendered in a particular word processor. For example, proprietary formats such as .docx, .doc or .wp may not translate as well between different systems as an .rtf version. For that reason, rich text format is often used when emailing documents to a wide set of recipients or otherwise transporting them between different parties that may be using radically different word processing setups.

Понравилась статья? Поделить с друзьями:
  • What is relative and absolute in excel
  • What is regression analysis excel
  • What is spoken word performance
  • What is reduplication in word formation
  • What is spoken word artist