Download presentation
Presentation is loading. Please wait.
Published byCody Barnes Modified over 10 years ago
2
Anatomy of an RTF File George Tisdale April 30, 2005
3
Basic Components Lead in Font table Color table Style sheet Information Data
6
Lead In Identifies the file as an RTF file Sets the default language
8
Font Table Lists the fonts that are used Equates the fonts with an f# reference Example: f0 is Times New Roman in the previous slides
10
Color Table List of colors as a mix of red, green and blue Each item is separated by a semi-colon If an item is missing the default is used, but the semi-colon must be present
12
Style Sheet Mixes fonts, typeface sizes, boldness, indents, tabs and colors into a Style number Styles are \s## two digit number usually starting at 11 Numbers are set at 1440=1 inch Tab stops are defined \tqc\tx2160 sets a centering tab at 1.5 inches
14
RTF Document RTF reader (Word) has interpreted the file and translated it into a formatted document.
15
LIBRTF.DLL Prepares the skeleton of the file Converts simple annotations into RTF code Replaces imbedded instructions with RTF code Processes an RTF file from a passed matrix of data
16
Syntax FNRTF( MAT TYPES$, MAT STYLES$, MAT DATA$, RTFFILE; LMARGIN, RMARGIN) (LMARGIN and RMARGIN are optional)
17
TYPES$ Matrix of single character codes H – header F – footer D – data T – Total These are examples and not required usage
18
Styles Matrix of same size as TYPES$ that defines the styles being used Elements separated by pipes | STYLES$(1)="li0|ri0|fs18|cfBlue|tc3.25|Header " STYLES$(3)="li0.25|ri0|fs10||tl2.5|td3|tl3.2|t d4.0|tl4.2|td4.6|tl4.8|td5.4|Data"
19
DATA$ Text to be printed by RTF reader Fields separated by pipes | Pipes represent TAB characters Additional tabs embedded with \tab Grouped with { and } LET DATA$(1)="H|\b\tab Title Of Report"
20
RTFFILE Existing open display file Open with recl=32000 EOL=none
21
Margins RTF reader will use its default margins Overrides can be set for WORD using LMARGIN RMARGIN
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.