Graphics and rtftohtml

rtftohtml will generate a separate file for each picture found in your RTF source. The type of the picture file depends on how it was added to the RTF. If your word processor runs on Microsoft Windows, you will probably get a WMF (Windows Metafile Format) graphic. If your word processor runs on a Macintosh, you will get a PICT file. Since neither WMF nor PICT graphics are supported formats on the WWW, you will want to convert these files to GIF format. The following programs will convert to GIF format.
Name                       Platform                   Input formats              
netpbm                     UNIX                       PICT                       
HiJaak Pro                 Windows                    WMF                        
 Graphic Workshop          Windows                    WMF                        
wmf2bmp                    Windows                    WMF                        
Graphic Converter          Mac                        PICT and WMF               
GIF Converter              Mac                        PICT                       
Paint Shop Pro             Windows                    WMF                        

HiJaaK Pro

Hijaak Pro is made by

Inset Systems, 71 Commerce Drive, Brookfield CT 06804-3405, Phone

203-740-2400, Fax 203-775-5634 They also have a toll free number

800-374-6738 (800 DR INSET). They have a BBS, 203-740-0063 and are on

CompuServe (GO INSET).

The program runs under Microsoft Windows and says it can

Graphic Workshop

The Graphic Workshop is a shareware program ($40) for MS Windows. It

can be found at ftp://uunorth.north.net/pub/alchemy/gwswin11.zip It looks

really nice. It can convert a lot of graphic formats including .wmf.

GIFConverter 2.3.7

Kevin A. Mitchell <74017.2573@compuserve.com>

Kevin A. Mitchell

P.O. Box 803066

Chicago, IL 60680-3066 USA

License: Shareware ($40 + shipping)

GIFConverter, by Kevin A. Mitchell, reads and writes the following graphics file formats: GIF, MacPaint, PICT,

RIFF, RLE, Thunderscan, Startup Screen, TIFF and JPEG (with or without QuickTime). In addition, it writes EPSF

files. Also provided are image enhancement, cropping, color table selection, and dithering features.

GraphicConverter 2.0.2

Thorsten Lemke <thorsten_lemke@pe2.escape.de>

Thorsten Lemke

Insterburger Str. 6

31228 Peine

Germany

License: Shareware ($35)

GraphicConverter, by Thorsten Lemke, imports PICT, Startup-Screen, MacPaint, TIFF (uncompressed, packbits,

CCITT3/4 and lzw), RIFF, PICS, 8BIM, 8BPS/PSD, JPEG/JFIF, GIF, PCX/SCR, GEM-IMG/-XIMG, BMP (RLE

compressed BMP<<s also), ICO/ICN, PIC (16 bit), FLI/FLC, TGA, MSP, PIC (PC Paint), SCX (ColoRIX), SHP,

WPG, PBM/PGM/PPM, CGM (only binary), SUN (uncompressed), RLE, XBM, PM, IFF/LBM, PAC, Degas,

TINY, NeoChrome, PIC (ATARI), SPU/SPC, GEM-Metafile, Animated NeoChrome, Imagic, ImageLab/Print

Technic, HP-GL/2, FITS, SGI, DL, XWD, WMF, Scitex-CT, DCX and KONTRON.

GraphicConverter exports PICT, Startup-Screen, MacPaint, TIFF (uncompressed, packbits and lzw), GIF, PCX,

GEM-IMG/-XIMG, BMP, IFF/LBM, TGA, PSD, JPEG/JFIF, HP-GL/2, EPSF, Movie (QuickTime), SUN, PICS,

PICT in Resource and PBM/PGM/PPM.

JPEGView 3.3

Aaron Giles <giles@med.cornell.edu>

Aaron Giles

182 E. 95th Street 11E

New York, NY 10128 USA

License: Freeware (Send a Postcard)

Master Site: ftp://ftp.med.cornell.edu/pub/jpegview

JPEGView, by Aaron Giles, is a flexible image utility designed to allow quick, high-quality viewing of the most

common image formats, including JPEG, JFIF, GIF, PICT, Baseline and LZW-compressed TIFF, Windows BMP,

StartupScreen, and MacPaint.

JPEGView can also convert between QuickTime JPEG and JFIF-standard JPEG files.

Version 3.0 added a number of substantial new features, including full AppleScript support, new high-quality

dithering routines, a greatly improved slide show, floating windows, etc.

JPEGView is now distributed only as a "fat binary", i.e. a program containing both 68K and Power PC code, thereby

enabling it to run flat-out on both normal Macintoshes and the new Power Macintoshes.

Paint Shop Pro

It is shareware.

I found it on CI$

Character Sets and Translation

1. Introduction

Text characters in an RTF file may be specified as literal characters or using \'xx notation, where xx is the hex value of the character. RTF files also contain a control word that specifies the character set that's used within the document and governs the interpretation of character values. The charset control words are:

\ansi	ANSI (default) - Used by Word for Windows
\mac	Apple Macintosh
\pc	IBM PC
\pca	IBM PC page 850, used by IBM Personal System/2

Although the four charsets don't appear to differ for characters in the ASCII range (below 128), they differ considerably above the ASCII range (128-255). For example, the ANSI, Macintosh, and PC charsets represent the degree sign ("deg.") as \'b0, \'a1, and \'f8 respectively. Furthermore, even for a given charset, character values in the Symbol font represent different characters than they do generally. For example "a" in Symbol font is the greek letter alpha.

rtftohtml uses a translation model that divides translation into two parts. When the RTF file is read each character is mapped to an standard character name. This mapping is controlled by the files:

ansi-gen             Input mapping for ANSI, all fonts except symbol             
ansi-sym             Input mapping for ANSI, symbol font                         
mac-gen              Input mapping for Macintosh, all fonts except symbol        
mac-sym              Input mapping for Macintosh, symbol font                    
pc-gen               Input mapping for IBM PC, all fonts except symbol           
pc-sym               Input mapping for IBM PC, symbol font                       
pca-gen              Input mapping for IBM PS2, all fonts except symbol          
pca-sym              Input mapping for IBM PS2,, symbol font                     

General and symbol charset maps are stored in the text files ansi-gen, ansi-sym, mac-gen, mac-sym, pc-gen, pc-sym, pca-gen, and pca-sym. Each line of a charset file associates an RTF character value (field 2) with the standard character name to which the RTF character corresponds (field 1). Here's a sample from ansi-gen:

parenleft	(
parenright	)
space		" "
quotedbl	'"'
quoteright	"'"
quoteleft	"`"
a		a
b		b
c		c
bullet		0x95
emdash		0x96
endash		0x97

Character values may be given as a single character (in which case the ASCII value is used), or as a hex number 0xyy. Single or double quotes may be used to quote values containing whitespace or quotes (e.g., use single quotes to quote a double-quote).

Lines with a "#" in column one are taken as comments. Comments and blank lines are ignored.

When the HTML file is written, each standard character name is mapped to an ascii string. This mapping is controlled by the file html-map. The format of this file is

(i) field 1 is the standard character name, just as in the charset maps;

(ii) field 2 is the output sequence to produce for the character named in field 1

Lines with a "#" in column one are taken as comments. Comments and blank lines are ignored.

Here's part of the html-map file:

a		a
b		b
c		c
ampersand	&amp;
less		&lt;
equal		=
greater		&gt;
trademark	(TM)
AE		&AElig;
Aacute		&Aacute;
Acircumflex	&Acirc;

Error Conditions and Remedies

First Things First - Determine the character set.

1. Identify which character set you are using by looking at the top of the RTF file. You should see one of the character sets identifiers, either \ansi, \mac, \pc, or\pca . If you do not see any of these then \ansi is your character set.

Error: Invalid Character Code \`xx - outputting &#ooo;

If you get this error, that means that a character appeared in the RTF input that has no standard character name. You fix this by adding that code (in this case the Hex Code xx) to your input character mapping file. Which file you use depends on your character set:
\ansi	ansi-gen and ansi-sym
\pc	pc-gen and pc-sym
\mac	mac-gen and mac-sym
\pca	pca-gen and pca-sym

1) Detemine what character set you are using as described above.

2) find the character code in your source and determine what it looks like when it is displayed by your word processor. Also check to see if it is a character in the symbol font.

3) Add \'e4 to the input translation file:

If you are using ansi and the character code is in the symbol font then you should edit ansi-sym and add:

somename        0xe4
The name that you use depends on what e4 looks like on your screen. If it is a bullet, then use
bullet          0xe4
This tells the filter to treat this character code as a bullet.

The complete list of standard character names is here:

Error: No output translation for :bullet

If you get this error, this means that the filter has no output mapping for the standard character name "bullet". To fix this, edit the html-map file and add a line

describing what to output for a bullet. For example:

bullet	*

What to do when you want to change a character translation

Start with html-map. Find the standard character name that you want to have translated, and then edit the corresponding string.

Standard Character Names

The complete list of standard character names is:
"nothing",
"space",
"exclam",
"quotedbl",
"numbersign",
"dollar",
"percent",
"ampersand",
"quoteright",
"parenleft",
"parenright",
"asterisk",
"plus",
"comma",
"hyphen",
"period",
"slash",
"zero",
"one",
"two",
"three",
"four",
"five",
"six",
"seven",
"eight",
"nine",
"colon",
"semicolon",
"less",
"equal",
"greater",
"question",
"at",
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q",
"R",
"S",
"T",
"U",
"V",
"W",
"X",
"Y",
"Z",
"bracketleft",
"backslash",
"bracketright",
"asciicircum",
"underscore",
"quoteleft",
"a",
"b",
"c",
"d",
"e",
"f",
"g",
"h",
"i",
"j",
"k",
"l",
"m",
"n",
"o",
"p",
"q",
"r",
"s",
"t",
"u",
"v",
"w",
"x",
"y",
"z",
"braceleft",
"bar",
"braceright",
"asciitilde",
"exclamdown",
"cent",
"sterling",
"fraction",
"yen",
"florin",
"section",
"currency",
"quotedblleft",
"guillemotleft",
"guilsinglleft",
"guilsinglright",
"fi",
"fl",
"endash",
"dagger",
"daggerdbl",
"periodcentered",
"paragraph",
"bullet",
"quotesinglbase",
"quotedblbase",
"quotedblright",
"guillemotright",
"ellipsis",
"perthousand",
"questiondown",
"grave",
"acute",
"circumflex",
"tilde",
"macron",
"breve",
"dotaccent",
"dieresis",
"ring",
"cedilla",
"hungarumlaut",
"ogonek",
"caron",
"emdash",
"AE",
"ordfeminine",
"Lslash",
"Oslash",
"OE",
"ordmasculine",
"ae",
"dotlessi",
"lslash",
"oslash",
"oe",
"germandbls",
"Aacute",
"Acircumflex",
"Adieresis",
"Agrave",
"Aring",
"Atilde",
"Ccedilla",
"Eacute",
"Ecircumflex",
"Edieresis",
"Egrave",
"Eth",
"Iacute",
"Icircumflex",
"Idieresis",
"Igrave",
"Ntilde",
"Oacute",
"Ocircumflex",
"Odieresis",
"Ograve",
"Otilde",
"Scaron",
"Thorn",
"Uacute",
"Ucircumflex",
"Udieresis",
"Ugrave",
"Yacute",
"Ydieresis",
"aacute",
"acircumflex",
"adieresis",
"agrave",
"aring",
"atilde",
"brokenbar",
"ccedilla",
"copyright",
"degree",
"divide",
"eacute",
"ecircumflex",
"edieresis",
"egrave",
"eth",
"iacute",
"icircumflex",
"idieresis",
"igrave",
"logicalnot",
"minus",
"multiply",
"ntilde",
"oacute",
"ocircumflex",
"odieresis",
"ograve",
"onehalf",
"onequarter",
"onesuperior",
"otilde",
"plusminus",
"registered",
"thorn",
"threequarters",
"threesuperior",
"trademark",
"twosuperior",
"uacute",
"ucircumflex",
"udieresis",
"ugrave",
"yacute",
"ydieresis",
"Alpha",
"Beta",
"Chi",
"Delta",
"Epsilon",
"Phi",
"Gamma",
"Eta",
"Iota",
"Kappa",
"Lambda",
"Mu",
"Nu",
"Omicron",
"Pi",
"Theta",
"Rho",
"Sigma",
"Tau",
"Upsilon",
"varUpsilon",
"Omega",
"Xi",
"Psi",
"Zeta",
"alpha",
"beta",
"chi",
"delta",
"epsilon",
"phi",
"varphi",
"gamma",
"eta",
"iota",
"kappa",
"lambda",
"mu",
"nu",
"omicron",
"pi",
"varpi",
"theta",
"vartheta",
"rho",
"sigma",
"varsigma",
"tau",
"upsilon",
"omega",
"xi",
"psi",
"zeta",
"nobrkspace",
"nobrkhyphen",
"lessequal",
"greaterequal",
"infinity",
"integral",
"notequal",
"radical",
"radicalex",
"approxequal",
"apple",
"partialdiff",
"opthyphen",
"formula",
"lozenge",
"universal",
"existential",
"suchthat",
"congruent",
"therefore",
"perpendicular",
"minute",
"club",
"diamond",
"heart",
"spade",
"arrowboth",
"arrowleft",
"arrowup",
"arrowright",
"arrowdown",
"second",
"proportional",
"equivalence",
"arrowvertex",
"arrowhorizex",
"carriagereturn",
"aleph",
"Ifraktur",
"Rfraktur",
"weierstrass",
"circlemultiply",
"circleplus",
"emptyset",
"intersection",
"union",
"propersuperset",
"reflexsuperset",
"notsubset",
"propersubset",
"reflexsubset",
"element",
"notelement",
"angle",
"gradient",
"product",
"logicaland",
"logicalor",
"arrowdblboth",
"arrowdblleft",
"arrowdblup",
"arrowdblright",
"arrowdbldown",
"angleleft",
"registersans",
"copyrightsans",
"trademarksans",
"angleright",
"mathplus",
"mathminus",
"mathasterisk",
"mathnumbersign",
"dotmath",
"mathequal",
"mathtilde",
"newline",