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

[REBOL] Re: Printing with Rebol on Windows network

From: gschwarz:netconnect:au at: 22-Aug-2002 17:12

A thought for the list. (I know you can not do this in Rebol.) To print html pages to a printer eg. invoices, group letters.... Rebol saves a html file to a folder called "printing". A program (written in java, VB..) running in the background looks in this folder for html files to print then deletes the file. This program got look every few seconds to print any html files then goes to sleep until the next read. In this folder would also be a settings file (settings.txt) to store the margins and printer to use. printer = hp4000 magin-top = 0.5" magin-bottom = 0.5" margin-right = 0.5" margin-left = 0.5" Below is a link to a java software which can do it, I think. Would there be a use in for something like this? Regards, Greg ----- Original Message ----- From: <[al--bri--xtra--co--nz]> To: <[rebol-list--rebol--com]> Sent: Wednesday, August 21, 2002 7:19 AM Subject: [REBOL] Printing with Rebol on Windows network
> 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.