# Output

`Output ?name? ?dest?`

## Description

Send the document to a given destination: file or string.
The procedure first calls Close if necessary to terminate the document.

## Parameters

`name`
  The name of the file. If not specified, the document will be `doc.pdf`.
`dest`
  Destination where to send the document. It can take one of the following values:
  - `F`: save to a local file with the name given by `name` (may include a path).
  - `S`: return the document as a string. `name` is ignored.

## See also

Close.

Index