Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] Printing with Rebol on Windows network

From: al::bri::xtra::co::nz at: 21-Aug-2002 9:19

Printing with Rebol on Windows network I've been exploring how to print over a Windows 2000 network, and have just managed to get it work. Here's an example of printing to a local printer (printer attached directly to computer running Rebol): write/binary %//prn read/binary %Test.txt Note the two "//" for the local printer, and the "magic" value of "prn" ("lpt1" and others are magical). And here's an example of printing to a network printer: write/binary %/Media/Corridor read/binary %Test.txt For the second example, your file name will obviously differ. The best way I've found so far for determining the file name of the network printer is to use the Windows Explorer program, browse into "My Network Places", "Entire Network", "Microsoft Windows Network", then work group, and then computer. There should be one or more printer icons showing. Click on one, and in the description vertical bar is the file name. For our network, that comes up with: \\Media\Corridor For Rebol, that changes to the file! value: %/Media/Corridor CAUTION: It's best to use a test file that consists of two or more pages of text. I discovered that my local printer (Canon BJC-255) would ignore anything less than a page of text and do nothing! Note that Windows printers require CR and LF to be sent for the end of line; newline. If you must print directly from Rebol, you'll need to replace/all of the newline values in your text with these values. Andrew Martin Posting from School/Work.