# Utilities

*TOOLS/HTMLIMAGE | Generate an Image of a Web Page

## Invocation

CALL "*tools/htmlimage", ERR=stmtref,url$,imgFile$[,imgWidth,imgHeight]

Where:

url$ | URL to the Web page or HTML file whose image is to be generated. The following can apply: • Can be a URL (starts with http:// or https://) • Can be a file reference (starts with file:///) • If missing http://, https:// or file:///, default will prefix with file:///
imgFile$ | Path of the image file to be generated. It must include the image file suffix (i.e. .jpg, .png, .bmp).
imgWidth imgHeight | Optional dimensions (in pixels) of the Web page image. If not specified, dimensions will default to 800 pixels wide by 600 pixels high.
stmtref | Error transfer. Most errors result in an Error #201 with specific error messages.

## Description

The "*tools/htmlimage" utility allows you to generate an image file (.png, .jpg, .bmp) based on a URL, whether it is a website reference (starts with http:// or https://) or a reference to an HTML file (starts with file:///).

#### Important Note:
To generate an image based on a URL, certain third-party applications are required:
• On Windows servers, the Chrome browser is recommended for generating images; however, the Firefox browser (v57 and later) can also be used to generate images.
• On Linux servers, the Firefox browser (v57 and later) will generate .png images. To generate .jpg and .bmp images, the ImageMagick command line tool must also be installed.