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

[REBOL] Re: How to print a document

From: gjones05:mail:orion at: 12-Jun-2001 6:11

From: "Thorsten Moeller" ...
> 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?
Good point! I am trying to think of the *common* ways that printers are networked. 1) In Windows environments, I suspect that NetBios is still the most common. The easiest way that I know to print to a Windows networked printer is to reinstall the printer driver and be sure to select the print from ms-dos based programs. Then you will likely need to do "Capture" the printer port. If you have no parallel devices connected to your box, it is easiest to map the ms-dos output to LPT1. Then in REBOL, you can write: write %//lpt1 "Hello, World (or at least, Hello, networked printer)!" Works on my in-home network (ascii or postscript through a venerable HP LaserJet II). 2) I guess that Netware is still very common in places that have been networked for awhile (Wow, how the fortunes of a company can change). I know nothing about Netware, but I do know that it existed in the world when text-based programs abounded, so it must use some sort of port mapping (like lpt1 through IPX/SPX for the original Netware protocol). Any Netware knowledgeable people out there? 3) For true networked printers (meaning directly connected through ethernet with their own IP), I assume that if the printer accepts standard ascii (side bar alert: including the old control sequences that are becoming a distant memory for me --- anyone else remember writing custom print jobs with the control codes??? Things have sure gotten easy...), the IP:port should be directly writeable, or maybe a user:pass needs to be added, depending. If the printer only accepts preformatted code (seemingly most modern printers), then what I would do is what I have done in Windows networked printers. Install a printer driver locally. When printing, direct the output to a file, then write the file to the networked printer. I've done this successfully with HP 722 inkjet in the past. Am I all wet here? I know it is not transparent printer support, but it works for many circumstances, right? Feel free to set me straight on this matter (<humor> but leave my mother and her army boots out of the argument </humor>). --Scott Jones