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

[REBOL] Printing on (network) printer: output of formatted documents

From: coussement:c:itc:mil:be at: 21-Dec-2000 11:40

Hi Rebolians: After getting the answer of Mr Ric Shepard [[ric_shepard--fishgame--state--ak--us]] concerning my question about printing on a network printer, I got to work and wanted to find any way for printing good formatted documents like MS Word or HTML pages. Well, here is description of the result. It's just another hack, but it might help peoples out of troubles, as printing remains important in today's professional life. Sorry for the users of other OS, but I only test it with the MS-World. first connect our network printer (proposed by Ric) - using Rebol/Command or DOS Prompt:
>> call "NET USE LPTx \\SERVER\PRINTER"
open a port in Rebol:
>> ptr: open/lines %LPTx
Your printer is ready to serve. Now we have to provide it with printer formatted data... Those are easy to get, following this procedure (valid for most MS applications): Create your document, let's say a *.doc one, format it as you like. Choose in the menu > File > Print and thick the option 'print to file'. Save your *.prn creation. this one is formatted into your choosen printer language (like postcript, PS-Adobe or other...) Back to REBOL, just send it to the printer:
>> insert tail ptr %the-file.prn >> close ptr
The document is printed. Just kill the net connection:
>> call "NET USE LPTx /DELETE"
Again, it's just a hack, waiting for better from RT. Hope it helps ... Regards, Christophe