Copy and paste the simple C and VB. NET code into the project. NET and Silverlight. It supports C , VB. Program Guide for. Convert Word to XML. Convert Word to PDF. Convert Word to Text. Convert XML to Word. Convert Word to RTF. Convert Word to Tiff. Convert Word to EPub. Convert Word to Emf. Load a plain text txt files and save it. Convert RTF to Image and reset image resolution.
By clicking sign up, I agree that I would like information, tips, and offers about Microsoft Store and other Microsoft products and services. Privacy Statement. See System Requirements. Available on HoloLens. People also like. Coolle Office Suite for Windows 10 Free. What's new in this version Version 2. Published by CoolLeGet Inc. What makes the rtf format different from other text formats? MiniTool will show you in the following content. You can only store the plain text with a normal text file, while you are allowed to store different formatting such as italics, bold, fonts, sizes, and images with a rtf file.
This feature makes rtf unique over other text formats. The rtf even becomes the default format for Microsoft WordPad. In addition, rtf files were used as the basis of Windows help files before they were replaced by HTML files. However, Microsoft stopped updating rtf since Even so, this text format is still supported by applications on almost every operating system.
So, you can continue running your rtf files on older or other platforms. It is rather easy to open rtf files. In theory, this is the default for RTF. The document is in the MacAscii character set, the usual character set under old pre versions of Mac OS.
That is about the only use that CP sees these days. The bad news is that you may be using codes outside that range without noticing it, such as smart quotes, long dashes, or the like. What font the number N actually indicates is defined in the font table that follows. For example, this is a very common prolog, which declares the RTF document to be in the ANSI character set, and picks font 0 as the default font:.
A font table lists all the fonts that can be used in this document and associates a number with each one. The font table is required, although some programs will tolerate a file that has no font table. The RTF specification suggests that the declaration is syntactically needed, but hardly any word processors actually require it; for sake of brevity, almost all the examples in this book leave out the declaration.
The color table is where you define all the colors that might be used in this document. Each declaration has this basic syntax:. This convention is used for the first entry in the color table. This example color table declares entry 0 with the default text color, entry 1 as red, entry 2 as blue, entry 3 as white, and entry 4a as black:. See the Changing Text Color section for a further discussion of color commands. In hardcopy, there is no difference, because the default color for print is black.
But on screen, the default color can be anything. For example, suppose MSWindows is running and the Display Properties: Appearance control panel is set to make the default window style appear as white text on a dark blue background. And given that the background color is dark blue, that black text will be quite hard to read—unless, of course, the RTF document also specifies a different background color such as yellow , in which case, the text will display more readably, as black on yellow.
A stylesheet is where you declare any styles that you might use in the document. A stylesheet is optional. The semantics and usage of stylesheets is discussed in detail later in the Styles section, so we will focus just on the syntax here. A paragraph style definition has this syntax:. Avoid using commas or semicolons in the style name. The formatting commands here should be just character-formatting commands, without any paragraph-formatting commands.
See the Styles section for more details. Incidentally, in both paragraph style and character style definitions, the formatting commands section is free to consist of nothing at all.
Those two styles could be part of a complete stylesheet that looks like this:. The optional info group stores document metadata. Metadata is information that describes the document, but is not actually in the document such as would appear when paging through the document on screen or in hardcopy.
The RTF specification defines about two dozen metadata field-name commands as well as a syntax for declaring additional field-names , but here we discuss only the following common fields:. Note that no formatting commands are allowed in info group values. Declares when this document was first created as opposed to merely modified. For example, in the unlikely event that a document was created at the moment that the first person set foot on the moon, at July 20, , at p.
Stores any miscellaneous comments about the document. Useful information to store includes things like the name and version number of the program that produced or translated the document possibly the versions of libraries used , what options were used in generating that document including what files were the source of the document data , and some expression of the creation time that includes the timezone.
Get out and vote! However, most word processors provide some way of viewing and probably editing the metadata. The Summary tab window is shown in Figure Recall that name and affiliation are generally entered when MSWord is first installed. This section can be left empty, but here is a commonly useful string to provide:. The number is U. Moreover, language numbers are discussed in greater detail in the Language Tagging section. It also resets the font size to 12 points.
And finally, it turns off all character-formatting features such as underlining, italic, superscript, et cetera. Finally, the last line is a construct for turning on page numbering in the form of a flush-right point number, in whatever is font number 0 in the font table.
This section is optional, in the sense that you could have a document with no content such as a document template. This section covers all sorts of odds and ends about RTF. Therefore, developers can use new commands whether new in the standard, or just for private use with the certainty that existing RTF programs will react by predictably ignoring the unknown commands—instead of crashing, complaining to the user, or interpreting the command as literal text.
But what does this language-tagging actually do? To keep those distractions away from foreign words, use language tagging. Consider how this text would be interpreted by an old program and a new program:. English, the language of the surrounding text. Other, rarer word-processor features might use language tagging. Language tagging may also be needed if you are sending text to a speech synthesizer or to a Braille printer.
RTF also supports a quite different feature with a similar name: newspaper columns. When the word processor instead breaks the content into several columns, filling the first before adding text to the second, the format is newspaper columns. A layout with newspaper columns is can make pages with small print or frequent linebreaks much easier to read. By default, there is no line between the columns.
By default, the columns are separated by a distance of twips—i. The last page of text laid out that way will look something like Figure But this is not actually the case: wherever the command occurs, it affects the whole section. Sections are not discussed elsewhere in this book, because they only come up in certain formatting features that are beyond the scope of this condensed guide.
The only notable exceptions are page header settings and newspaper columns. Follow these rules of thumb in order to avoid bothering with sections:. The document would look like this:. The default is to create endnotes. For a full discussion of footnote numbering styles and the complexities of endnote placement, refer to the RTF specification. When formatted as part of a larger document, this code looks like Figure The Color Table section in Document Structure discussed the syntax for declaring color tables.
See the end of the Color Table section for a discussion of the rationale for this. If you also want to make it blue, add a color-change command, as from the above section, like this:. Indenting in this sense means the distance from the left or right margin of the page. To control the placement of the margins, use the following commands in a document. They should go in the Preliminaries section, presumably before page numbering is turned on:.
Few RTF documents need to stipulate the size of the page that they were formatted for. But to print in landscape mode i. To print a document in landscape mode on U. If you want to print in two-up format i. Note that in each case, the margin settings the middle line in each are simply an initial recommendation; you may actually want larger or smaller margins.
And when printing in two-up format, you will almost definitely want to use a smaller font size than the default point. RTF has a happily large but regrettably convoluted system for representing graphics primitives such as lines, arcs, circles, polygons, and so on.
The simple task of representing a 5-inch horizontal rule requires this much code:. That line can be made longer or shorter by replacing the three instances of with some other length in twips. If you want more complex graphics in RTF, the simplest method is probably to just embed a real image, as covered in the next section. Also, have a look at the Origami CD Case example in Chapter 3 , which involves plotting lines between arbitrary points on the page, using a variant of the code shown above.
That code is rather more compact, but also works in a basically different way. Where the previous code inserts a paragraph containing an attached line-drawing primitive, this approach inserts a blank paragraph with a border along its bottom; then a borderless blank paragraph is inserted so that there will be as much space below the line as above it.
For example, this code draws a horizontal line that starts 4cm 2, twips in from the left margin and ends 1cm twips in from the right margin:. The actual length of the resulting line depends on the current settings for the page margin or, the document is in columns, the current column size. Whether you use the first or second approach might simply depend on which is best supported in a particular word processor.
For example, WordPerfect 8 understands the first line-drawing approach much better. If you want to insert images in an RTF file, you have three options.
0コメント