[REBOL] Re: How to print a document
From: moeller_thorsten:gmx at: 13-Jun-2001 10:09
Hi Brian,
thanks for your detailed description. Things work fine on my win98 machine,
but on my W2K-Box the Installation-Assistant works differently. You don't
have the choice for MS-Dos association.
For local attached Printers i have the same problems as Terry reports in
this thread.
To have a more flexible approach of printing out things, i think i have to
play around with the browser-printing stuff.
But thanks again for your assistance.
Thorsten
-----Ursprungliche Nachricht-----
Von: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]Im Auftrag
von Brian Hawley
Gesendet: Mittwoch, 13. Juni 2001 00:04
An: [rebol-list--rebol--com]
Betreff: [REBOL] Re: How to print a document
Hi all!
Thorsten Moeller wrote:
>i ran into the same problem as Francois a while ago. OK, Rebol is a
>messaging language per definition, but that should not exclude printing in
>all environments. I was *NOT* able to get the %//prn stuff to work for me
as
>i don't have an local attached printer. I only have network-printer at my
>service, but they didn't care about any printing command from my W2K box at
>all. So what can i do?
When you setup the network printer mapping on your Win* box,
it will ask you if you want to print from MS-DOS programs.
Say yes. It will then map the printer to a MS-DOS special
port file, like LPT2 or some such, rather than one of the
unnamed ports that it will attach to if you say no. Then
look in the properties for that printer, on the Ports page,
and check which port the printer is attached to.
You can write to that port as a file after that. If there
is a printer port on your computer then that port will not
likely be LPT1 (the one with the PRN alias). Example code:
write %lpt2 "Hello World!"
Keep in mind that if you want to do more than text output
you will have to write in the printer language, usually
some HP variant or Postscript. You might find it easier to
write Postscript even if your printer doesn't support it -
in that case you should use Ghostscript and have it create
a virtual printer port to listen to and handle. Tricky, but
perhaps easier than generating HP printer codes.
Good luck!
Brian Hawley
P.S.:
>write %//prn "Hello, World!"
The // is not necessary. If your printer is attached to
LPT1 (the port with the PRN alias), %prn will do.