Transmit text to print file

20% Command group 20% Flag affected 20% Reversible 20% Execute on client 20% Platform(s)
Reports and Printing YES NO NO All

Syntax

Transmit text to print file ([Add newline]) {text}

Options

10% 90%
Add newline If specified, the command sends a newline character sequence after sending the text

Description

This command sends text to a print file, for example, you can send printer control characters. To transmit control characters, you can use the chr() function inside square brackets. For example, [chr(27,14)]sends escape 14.

The Add newline option causes Omnis to add end of line characters after each line of text.

An error occurs if no print file has been selected.

Example

# Create a file containing the text 'This is my report' together with the report rMyReport
Set print or export file name {[con(sys(115),'output.txt')]}
Transmit text to print file (Add newline) {This is my report}
Set report name rMyReport
Send to file
Print report
Close print or export file