Reference

mswordview(1)

convert word 8 files to html

NAME

mswordview - convert word 8 files to html

SYNOPSIS

mswordview [-v] [--version] [-n] [--nocredits] [-c] [--corehtmlonly] [-t seconds] [--timeout seconds] [-f points] [--defaultfontsize points] [-w type] [--horizontalwhite type] [-u type] [--verticalwhite type] [-s url] [--symbolurl url] [-p url] [--patternurl url] [-d url] [--wingdingurl url] [-h] [--ignoreheadings] [-a] [--noannotations] [-m] [--mainonly] [-b] [--riskbadole] [-e] [--nofontfaces] [-o filename] [--outputfile filename] [-g erroroutputfile] [--errorfile erroroutputfile] [-y tabvalue] [--tabsize tabvalue] [-i dir] [--imagesdir dir] [-j url] [--imagesurl url] [-k] [--notablewidth] [-r] [--norevisions] [-x truetypedir] [--truetypedir truetypedir] [-z configfile] [--configfile configfile] filename

DESCRIPTION

mswordview breaks the OLE Word document into its component streams, and then converts the document and its graphics to html.

OPTIONS

-v, --version

Output program version.

-n, --nocredits

Don't append credits at end of the html output.

-c, --corehtmlonly

Don't put <html> and </html> around output.

-f points, --defaultpointsize points

The base pointsize for mswordview is 10 (like MS Word), you can change this to a different size if you feel that your output is too large, otherwise e.g. a 12 point font becomes a html font+2, which can look too big. An aside here... many of the files that mswordview outputs are tagged as being in unicode, often this turns out to be unnecessary, but there's no sure way to know sometimes (short of examining every single character in advance to see if it falls into the ASCII range) if this header is necessary. Thus netscape will use a unicode font, as most European readers won't ever have read a document in this font they won't have customized the unicode base font size as they might have done the western font size. So if you have set your usual language encoding fontsize away from the default, then do the same for your unicode font, sorry about the long entry ;-)

-w type, --horizontalwhite type

attempting to convert formatting done in Word with whitespace such as space and tab is quite difficult. In html output there's no easy way to get nice lined up text using spaces so white space padding looks awful but of course so does no attempt to do formatting. So I have given five options, the default type is 0 but I am beginning to think that 2 is the best option really.
0 convert runs of more than one space into hard-coded spaces i.e. &nbsp; and convert tabs into a clear gif with width equal to the tabsize option.
1 convert runs of more than one space into hard-coded spaces i.e. &nbsp; and convert tabs into a run of &nbsp;'s
2 convert runs of more than one space into hard-coded spaces i.e. &nbsp; but don't convert tabs into anything.
3 don't convert spaces into anything at all but convert tabs into a clear gif with width equal to the tabwidth option.
4 don't convert spaces into anything at all but convert tabs into a run of &nbsp;'s
5 don't convert spaces into anything at all and don't convert tabs into anything at all.

-u type, --verticalwhite type

what to do with multiple line breaks is set here. There are three options for type i.e
0 the default, a single line break becomes a <br>, but if there's a run of more than one, then the first two are transformed into a <p>, if there's more then they are outputted as <br>, the intention here is to retain the meaning that Word usually associates with two line breaks, which is that thats the end of the paragraph, but to be aware and support the fact that the users of Word often whack away madly at the return key to try and force formatting decisions by that mechanism.
1 replaces each line break one for one with a <br>
2 replaces a single line break with <br>, and a run of more than one (no matter how long) with a single <p>

-t seconds, --timeout seconds

time out after so many seconds, useful if you use this as a web gateway, coz there's no one watching the conversion process to realize that it's gone into a busy loop.

-s url, --symbolurl url

this is the url that will be used to find the gif pics that are used for displaying the MS symbol font. Not the tidiest of solutions for the problem, but it works.

-d url, --wingdingurl url

this is the url that will be used to find the gif pics that are used for displaying the MS wingding font. Not the tidiest of solutions for the problem, but it works.

-p url, --patternurl url

this is the url that will be used to find the background patterns that mswordview can use as backdrops for cells of a table, this is hardly the most important of mswordview features, but there's always someone bleating for some feature that appears ridiculous to me to be included, so here this one is in all its glory. This dir is also used for any extra graphics that mswordview might use, e.g. the clear gif optionally used for tab.

-h, --ignoreheadings

don't convert Word heading types into html heading levels, sometimes users use heading types inappropriately, if the user used heading types but changed the attributes to make the heading type inappropriate for html heading levels, use this option.

-a, --noannotations

By default mswordview will output annotations, but MS Word itself doesn't print annotations when outputting to paper, so to not have them included use this option.

-m, --mainonly

With this option then no footers or headers are shown.

-b, --riskbadole

With this option on then mswordview will attempt to decode files whose OLE tables are corrupt, more than likely the broken Word file will crash mswordview, and crash it hard.

-e, --nofontfaces

With this option set mswordview won't insert fontface tags, as it stands fontfaces are on by default, but this feature is alpha so it is only supported for ASCII based languages (i.e western European only) and then only under certain conditions , as it is surprisingly difficult to be sure which of a few choices is the correct font to use otherwise.

-o filename, --outputfile filename

set the filename to place output in, use - as the filename to output to standard output (the screen). The default is that output is put into a file the same name as the input file with a .html ending. Any graphic files created have the same prefix as this file.

-g filename, --errorfile filename

set the filename to place error messages in. The default is the stderr (the screen)

-y tabvalue, --tabsize tabvalue

specifies either the amount of pixels of indentation that a tab should be translated into, or the amount of hard spaces to replace one with, multiples of 8 only work in the second case. Read the horizontalwhite entry to understand which one will get used. Pixels is the default measurement. This is messy because tabs are obviously messy things under html, and wed all be better off if they didn't exist at all, but we live in a world where they get used for indentation, and worse, alignment, which you'll basically just be damn lucky if you see any hint of that in the html output :-) Tabs basically just don't work.

-i directory, --imagesdir directory

Specifies the dir into which the graphics will be saved into, the default is the same dir that the html file is placed in. If you use this but intend to move the graphics before viewing the html information, or for some other reason you want the html to link to the graphics with some custom img src url then use --imageurl in conjunction with this

-j url, --imagesurl url

Specifies the url in which the graphics from the Word doc can be found, the default is the same dir that mswordview put the graphics itself.

-k, --notablewidth

With this on, table widths are not specified.

-r, --norevisions

With this on, no revision marks are displayed

-x dir, --truetypedir dir

Specifies the dir in which truetype fonts can be found to be used in the libwmf conversion of wmf files to gif. The default is the ttf subdir of the install dir of mswordview

-z file, --configfile file

Specifies the configuration file of mswordview. The default is the install dir of mswordview. See the example config file for details of its format. mswordview can function fully without a config file.

BUGS

I appear to have gone a little mad on the number of command line options, I have only 4 letters left l,q,x & z. Some of these options aren't really needed, I don't use any of them myself :-)

mswordview can be incredibly slow when a document is fastsaved and has many tables.

MORE INFORMATION

More information may be got at http://www.gnu.org/~caolan/docs/MSWordView.html or http://skynet.csn.ul.ie/~caolan/docs/MSWordView.html

SEE ALSO

laola(1), lls(1), elser(1), catdoc(1), word2x(1)

AUTHOR

Caolan McNamara
WWW: http://www.csn.ul.ie/~caolan/
Mail: [email protected]

History

--configfile since Debian 2.2 (Potato); --errorfile since Debian 2.2 (Potato); --horizontalwhite since Debian 2.2 (Potato); --imagesdir since Debian 2.2 (Potato); --imagesurl since Debian 2.2 (Potato); --nofontfaces since Debian 2.2 (Potato); --norevisions since Debian 2.2 (Potato); --notablewidth since Debian 2.2 (Potato); --outputfile since Debian 2.2 (Potato); --patternurl since Debian 2.2 (Potato); --riskbadole since Debian 2.2 (Potato); --tabsize since Debian 2.2 (Potato); --truetypedir since Debian 2.2 (Potato); -b since Debian 2.2 (Potato); -e since Debian 2.2 (Potato); -g since Debian 2.2 (Potato); -i since Debian 2.2 (Potato); -j since Debian 2.2 (Potato); -k since Debian 2.2 (Potato); -o since Debian 2.2 (Potato); -p since Debian 2.2 (Potato); -r since Debian 2.2 (Potato); -x since Debian 2.2 (Potato); -y since Debian 2.2 (Potato); -z since Debian 2.2 (Potato).

--nohorizontalwhite until Debian 2.1 (Slink).