REBOL [
Title: "Printer"
Date: 3-Jul-2002
Name: Printer
Version: 1.0.0
File: %Printer.r
Author: "Andrew Martin"
Purpose: "Sends text to printer on //prn."
Email: Al.Bri@xtra.co.nz
Web: http://valley.150m.com
Category: [util 3]
Caution: "Only works on Windows PCs that aren't networked!"
Example: [
Printer "This goes to the printer!"
Printer/Page "This prints this line and feeds a page!"
]
]
Printer: func [
"Sends text to printer on //prn."
[catch]
Text [string!] "The text to be printed."
/Page "Append Carriage Return (CR) and Page Feed."
][
throw-on-error [
secure [
%//prn [allow write]
]
write %//prn Text
if Page [write/binary %//prn "^(0D)^(page)"]
Text
]
]