Write to F00165 with a specific font

marc_pfa

Member
I List,

We are converting data from World(F12093) to XE(F00165). Is there a way to write to media object with a specific font like system function do ?

Regards,

Marc

XE sp23 DB2
 
Marc:

Greetings.

If you want to get familiar with the RTF 1.6 specifications, you can do an extraordinary amount of formatting in media object text attachments.

I have put together a simple example of creating an attachment for my Address Book entry in application P01012. My address book number is 100039.

UPDATE dvdta.f00165
SET gdtxvc =
'{\rtf1\ansi{\fonttbl{\f0\fcharset0 Arial;}{\f1\fcharset0 Courier New;}{\f2\fcharset0 Tahoma;}}\par\b\f0\fs48 Test at 48 with Arial \par \b0\f1\fs36 Test at 36 with Courier New \par \b\f2\fs24 Test at 24 with Tahoma \par\plain Back to normal!! }'
WHERE gdobnm ='ABGT' AND GDTXKY = '100039'

Here is the break down of the attachment text:

{ Begins RTF document
\rtf1 denotes RTF data
\ansi Use ANSI character set
{ Begin block for font table
\fonttbl Denotes beginning of font
{ Begin block for first font
\f0 Assign font number 0
\fcharset0 Keyword to select font character set
Arial; Font face name, terminated with semi-colon
} Denotes end of font
{ Begin block for first font
\f1 Assign font number 0
\fcharset0 Keyword to select font character set
Courier New; Font face name, terminated with semi-colon
} Denotes end of font
{ Begin block for first font
\f2 Assign font number 0
\fcharset0 Keyword to select font character set
Tahoma; Font face name, terminated with semi-colon
} Denotes end of font
} Denotes end of font table

\par Keyword for beginning of paragraph
\b Keyword for bold
\f0 Keyword to use font 0 from table
\fs48 Keyword for font size, 48
Test at 48 wi... Text to be displayed
\par Keyword for beginning of paragraph
\b0 Keyword for bold, 0 to turn off
\f1 Keyword to use font 1 from table
\fs36 Keyword for font size, 36
Test at 36 wi... Text to be displayed
\par Keyword for beginning of paragraph
\b Keyword for bold
\f2 Keyword to use font 2 from table
\fs24 Keyword for font size, 24
Test at 24 wi... Text to be displayed
\par Keyword for beginning of paragraph
\plain Keyword for to reset formatting back to normal
Back to norma... Text to be displayed

} Denotes end of RTF document


Here is a link to Microsoft’s RTF 1.6 documentation:

http://msdn.microsoft.com/library/en-us/dnrtfspec/html/rtfspec.asp

Hope this helps.
Best regards,

Roby
 
Back
Top