#native_company# #native_desc#
#native_cta#

Using PHP for RTF Page 5

By Sujith Nair
on May 22, 2002

Here are some of the syntaxes for formatting text.
  • b = Bold
  • caps = All capitals.
  • i = Italic.
  • outl = Outline.
  • scaps = Small capitals.
  • strike = Strikethrough.
  • ul = Continuous underline.
  • ul0 = turns off all underlining.
  • ulnone = Stops all underlining.
  • cfN = Foreground color (the default is 0).
  • cbN = Background color (the default is 0).
  • rtlch = The character data following this control word will be treated
    as a right-to-left run.
  • ltrch = The character data following this control word will be treated
    as a left-to-right run (the default).
  • csN = Designates character style. If a character style is specified,
    style properties must be specified with
    the character run. N refers to an entry in the style table.
  • cchsN = Indicates any characters not belonging to the default document
    character set and tells
    which character set they do belong to. Macintosh character sets are
    represented by values greater than 255.
    The values for N correspond to the values for the fcharset control
    word.
  • langN = Applies a language to a character. N is a number corresponding
    to a language. The plain control
    word resets the language property to the language defined by deflangN
    in the document properties.

There are more of them, but for this I would suggest you go through an
RTF tutorial.

It’s easy … isn’t it? Only if you don’t have to complete all this in a
couple of hours 😉
Many of you will conclude that its not worth going through the RTF
source. Best way to go
about it is to develop predefined templates. But what about flexibility.
What if the client
asks for changes in format, or flexibility in format. I think there is
no harm in spending a
little time understanding the very basics of your work before you start
with it, rather than
revisiting it after most of it has been done. Then it becomes really
difficult to work over
it or do the research work in a short span of time.
–Sujith Nair

1
|
2
|
3
|
4
|
5