anatomy of an rtf file george tisdale april 30, 2005

21
Anatomy of an RTF File George Tisdale April 30, 2005

Upload: cody-barnes

Post on 27-Mar-2015

224 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Anatomy of an RTF File George Tisdale April 30, 2005

Anatomy of an RTF File

George Tisdale

April 30, 2005

Page 2: Anatomy of an RTF File George Tisdale April 30, 2005

Basic Components

Lead in Font table Color table Style sheet Information Data

Page 3: Anatomy of an RTF File George Tisdale April 30, 2005
Page 4: Anatomy of an RTF File George Tisdale April 30, 2005
Page 5: Anatomy of an RTF File George Tisdale April 30, 2005

Lead In

Identifies the file as an RTF file Sets the default language

Page 6: Anatomy of an RTF File George Tisdale April 30, 2005
Page 7: Anatomy of an RTF File George Tisdale April 30, 2005

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

Page 8: Anatomy of an RTF File George Tisdale April 30, 2005
Page 9: Anatomy of an RTF File George Tisdale April 30, 2005

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

Page 10: Anatomy of an RTF File George Tisdale April 30, 2005
Page 11: Anatomy of an RTF File George Tisdale April 30, 2005

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

Page 12: Anatomy of an RTF File George Tisdale April 30, 2005
Page 13: Anatomy of an RTF File George Tisdale April 30, 2005

RTF Document

RTF reader (Word) has interpreted the file and translated it into a formatted document.

Page 14: Anatomy of an RTF File George Tisdale April 30, 2005

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

Page 15: Anatomy of an RTF File George Tisdale April 30, 2005

Syntax

FNRTF( MAT TYPES$, MAT STYLES$, MAT DATA$, RTFFILE; LMARGIN, RMARGIN)

(LMARGIN and RMARGIN are optional)

Page 16: Anatomy of an RTF File George Tisdale April 30, 2005

TYPES$

Matrix of single character codes H – header F – footer D – data T – Total

These are examples and not required usage

Page 17: Anatomy of an RTF File George Tisdale April 30, 2005

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|td4.0|tl4.2|td4.6|tl4.8|td5.4|Data"

Page 18: Anatomy of an RTF File George Tisdale April 30, 2005

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"

Page 19: Anatomy of an RTF File George Tisdale April 30, 2005

RTFFILE

Existing open display file Open with

recl=32000 EOL=none

Page 20: Anatomy of an RTF File George Tisdale April 30, 2005

Margins

RTF reader will use its default margins Overrides can be set for WORD using

LMARGIN RMARGIN

Page 21: Anatomy of an RTF File George Tisdale April 30, 2005