Would it be easier just to write a text file that's formatted for the
printer rather than for the web? At the moment, you've got:
write %form.html reduce [
<html><HEAD><STYLE>H1= {page-break-before:always}</STYLE></HEAD>
<body><CENTER><H1>"K.B.I. Application"</H1></CENTER><H5>
SNIP!
</body></html>
]
web-page: read %form.html
Wouldn't this be better as:
web-page: reduce [
<html><HEAD><STYLE>H1= {page-break-before:always}</STYLE></HEAD>
<body><CENTER><H1>"K.B.I. Application"</H1></CENTER><H5>
SNIP!
</body></html>
]
for the web page and then:
write %printer.txt rejoin [
"Name:" cgi/name newline
"SSN:" cgi/ssn newline
"Address: " cgi/address newline
"City: " cgi/city newline
]
and to print directly to the printer on Windows machines, use a function
like:
Printer: func [Text [string!] /Page] [
secure [
%//prn [allow write]
]
write %//prn Text
; Append Carriage Return (CR) and Page Feed.
if Page [write/binary %//prn "^(0D)^(page)"]
Text
]
then you can do:
Printer rejoin [
"Name:" cgi/name newline
; blah blah blah
]
Would that help?
Andrew Martin
ICQ: 26227169
http://members.xoom.com/AndrewMartin/
-><-