Syntax

PDEST 'name' FILE

Arguments

name: text

Meaning

The FILE option indicates that the destination is a file.

From Collections 1.10, for adapl-only output formats (which must be set up as output formats with the Template type set to Custom), you can have these generate output as a plain text file (which can also be a .csv file, because that is plain text too) or as a PDF* file: by "adapl-only" we mean that the output format only needs an adapl with PRINT and OUTPUT statements to generate plain text output and optionally PDEST <file_name.extension> FILE to specify the file name and extension/mime type (so you do not combine the adapl with a Word template or XSLT stylesheet in this case).
If the provided file name extension is .csv, it will return a plain text file with mime type text/csv, while if the extension is .txt the mime type will be text/plain. If you leave out a PDEST command altogether or include it but leave out the FILE, parameter, then the generated output will automatically be converted to a PDF. In the PDEST command you only need to provide the file name with the extension, but it's no problem if the file name is preceded by a path (which might be the case in an existing adapl output format): the path will be ignored anyway.
Collections will stream a generated .pdf file to the user, which opens automatically in the browser, after which he or she can print or save it at will. A text file though, will be saved in your \downloads folder and won't open in the browser.

Note that printing doesn't work in storage adapls or after-field adapls.

* PDF output through adapl-only output formats is limited to left-to-right languages. Languages like Arabic cannot yet be created even with Unicode fonts. Also Chinese, Japanese and Korean languages are not supported.) Instead, try using a Word template or XSLT stylesheet to create the output format: these methods do support the mentioned languages.