Man page <-> HTML <-> Postscript Conversion
We have a utility for converting man page format files into HTML and a utility for converting HTML into Postscript.
These are available on the SGI machines.
The man pages (in html format) for these two utilities follow.
- man2html - filter to convert a man page to HTML
- man2html [ section ] title
- man2html filename
- man2html converts formatted nroff man pages to HTML. If multiple man
pages have the same title and section, an index of the matching pages is
- html2ps - convert HTML to PostScript
- html2ps [ -2aCcFgLnOtUuvX ] [ -B 0|1|2 ] [ -b URL ] [ -cw program ] [ -f
font ] [ -hn scalefactor ] [ -i scalefactor ] [ -IM text ] [ -l length ]
[ -LM size ] [ -m scalefactor ] [ -MM size ] [ -N num ] [ -o file ] [ -p
scalefactor ] [ -PS size ] [ -s scalefactor ] [ -tn style ] [ -TM size ]
[ -w width ] [ -x 0|1|2 ] [ -zl string ] [ -zl string ] [ URL|file ]
- The program html2ps converts HTML to PostScript. The HTML code can be
retrieved from a URL or a local file, specified as a parameter on the
command line. If no parameter is given, html2ps reads from standard
- It is currently used by the infosearch(1) application when printing a
- html2ps is being distributed under the terms and conditions set forth in
the GNU General Public License.
- IMPORTANT: To avoid unnecessary network traffic, one can rebuild an
already generated PostScript file with new options. This is done by
running html2ps with the new options, and with the old PostScript file as
input. (Not applicable for the options -b, -C, -c, -cw, -g and -t.)
- The current version does not support the <ISINDEX>, <FORM>
and <TABLE> tags.
- Two column (2-up) output. The default is one column per page.
- Do not interpret nested highlighting tags additively. For example
"<B><I>some text</I></B>" will normally produce bold italic text.
With the -a option, the text will be italic but not bold (only the
innermost tag is interpreted).
- -B 0|1|2
- Specifies whether images should be surrounded by a box or not. Give
the value 0(default) for no boxes, 1 for boxes only around images
that are links, and 2 for boxes around every image.
- -b URL
- Use the URL as a base to expand relative references for in-line
images. This is useful if you have downloaded a document to a local
file. The URL should then be the URL of the original document.
- Check the syntax of the HTML file (using an external syntax
checker). No PostScript code is generated. The default is to not
make a syntax check.
- Like the -C option, but PostScript code is also generated. If you
use this option, you may also have to use the -o option, to avoid
getting the syntax checker output mixed with the PostScript code.
- -cw program
- Specifies which program the HTML syntax should be checked with. The
default is to use weblint.
- -f font
- The font used for normal text. The default font is n
(NewCenturySchlbk). Other choices are t (Times), h (Helvetica), hn
(Helvetica-Narrow), p (Palatino), a (AvantGarde) and b (Bookman).
New fonts can easily be added.
- Draw a frame around the text on each page. The default is to not
draw a frame.
- Convert color images to greyscale images. Note that the PostScript
code will be smaller and processed faster when the images are
converted to greyscale. The default is to generate color images.
- -hn scalefactor
- Scale the text in headers of level n (1..6) with a factor
scalefactor. The default is 1.
- -i scalefactor
- Scale in-line images with a factor scalefactor. The default is 1.
- -IM text
- Specifies which text should be written as a replacement for in-line
images, when running in text mode or when the image can not be
retrieved, and the <IMG> tag has no ALT attribute. The default text
- Generate code for printing in landscape mode. The default is
- -l length
- The maximum length of the text on each page in centimeters. The
default is 23 cm in portrait mode,15 cm in landscape and 2-up mode.
- -LM size
- The size of the left margin in centimeters. The default is 2.5 cm.
- -m scalefactor
- Scale mathematical formulas with a factor scalefactor. The default
- -MM size
- For two column output, the size of the middle margin in centimeters.
The default is 2 cm.
- -N num
- Specifies the starting page number, the default is 1.
- Insert page numbers. The default is to not number the pages.
- Use PostScript original images if they exist. For example, if a
document contains an image figure.gif, and an encapsulated
PostScript file named figure.ps exists in the same directory, that
file will be use instead. Note: this will not work if the
PostScript file contains sampled images.
- -o file
- Write the PostScript code to file. The default is to write to
- -p scalefactor
- Scale preformatted text with a factor scalefactor. The default is 1.
- -PS size
- The vertical size in centimeters of the paper the document will be
printed on. You may also give the names A4 (29.7 cm) or US (27.9
cm). The default size is A4. (This value is only used to get the
size of the top margin correct.)
- -s scalefactor
- Scale the entire document with a factor scalefactor. The default is
- Text mode, ignore images. The default is to include the images.
- -tn style
- Set the style of the text in headers of level n (1..6). Possible
choices are n (normal), b (bold), i (italic), bi (bold italic), f
(fixed), fb (fixed bold), fi (fixed italic) and fbi (fixed bold
italic). The default is b for all header levels.
- -TM size
- The size of the top margin in centimeters. The default is 3 cm.
Note: To get the size of the top margin correct (when printing in
portrait mode on other than the A4 paper size), you must also give
the -PS option.
- Print usage information.
- Do not underline anchor text. The default is to underline anchor
- Print information on the version of html2ps.
- -w width
- The maximum width of the text in centimeters. The defaults are 16 cm
in portrait mode, 24.5 cm in landscape mode, and 11.5 cm in 2-up
- Print debugging information. Not very interesting, but can be useful
to see what is going on when retrieving many images over the
network. Turned off by default.
- -x 0|1|2
- Generate PostScript code for printers with duplex (double-sided
printing) capacity. Give the value 0 (default) for single-sided
printing, 1 for normal double-sided, and 2 for "tumble mode"
(opposite side gets its orientation reversed).
- -zl text
- Place text as the left footer for each page.
- -zr text
- Place text as the right footer for each page.
- Jan Karrman, GNU Free Software Foundation