# Special File Handling

*HTML* | Print to HTML

## Format

OPEN (chan)"*HTML*"[;options]

Where:

chan | Channel or logical file number (e.g. open (1)"*html*").
options | The following options are supported either following the *HTML* filename or via OPT= on the OPEN:
BACK=nnnnnn | Background colour using standard HTML RGB colour representation.
FONT=fontname | Default font – use a fixed font such as Courier.
FILE=path | Output filename.
SHOW | (Windows Only) Causes the file to be passed to default browser.
TEXT=nnnnnn | Text colour using standard HTML RGB colour representation.
TITLE=name | Document title. Default title is the program name.
*HTML* | Keyword, not case sensitive. Special interface, enclosed in quotation marks within OPEN directive. (Include * asterisks in syntax)

## Description

*HTML* is a logical print file that can be used with PxPlus. It allows for printed reports using normal fixed fonts to be formatted for use with an HTML viewer such as a browser. The system will prompt for an output filename to store the resulting HTML document.

## Example

These examples create an HTML file called Sample.htm with the title "Sample". Courier New font is used with a white background and black text. The SHOW option causes the default browser to be invoked to display the file:

> open (1,opt="FILE=Sample.htm;SHOW;FONT=Courier New;TITLE=Sample;BACK=FFFFFF;TEXT=000000")"*HTML*"

> open (1)"*HTML*;FILE=Sample.htm;SHOW;FONT=Courier New;TITLE=Sample;BACK=FFFFFF;TEXT=000000"