On 10/18/02 12:20 PM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:

I'm probably going to regret getting involved in this thread, but here
goes...

> MacPearl? Seems to be a noble project. But I don't think it supports TCP/IP.
> I'm told the code I posted runs fine on other versions of Pearl.

It will likely run fine under MacPerl. In your prior message you indicated
that the code ran, but never asked for what file it wanted. This is because
LPRng is intended to be used in commandline environments and the file names
to be printed are expected to be given as options on the commandline (as are
the printer name, etc.

Although there are ways to get MacPerl to work with a commandline
environment in MPW, my guess is that you are not familiar enough with MPW in
general for this to be worthwhile for you (it will likely frustrate you more
than it will help).

A more likely solution is to add code to the script you sent in your
previous mail to add Mac GUI prompts to the script. This is not too hard,
but implies that you know enough about MacPerl programming to do this. Given
that you are apparently unfamiliar with Perl in general and MacPerl
specifically this may not be practical.

If you want to explore this path look at the file "MacPerl.pm", which
contains the Ask function and the file "StandardFile.pm" for the
StandardGetFile function.

> Geez....all I'm trying to do is avoid switching to a PC for this
> application....which I could probably get used for free somewhere. Just that
> printing from a Mac on my network is easier to do. Besides, this PrintMate
> print server generates so much traffic on my network it's pathetic. Literally
> every 2 seconds its broadcasting to every AppleTalk device on my network! I
> did try to find out why...but the programer they hired to write the software
> for the PrintMate no longer works there.

> I may also be able to rig up a serial-to-parallel converter and get a 50'
> cable just for this. Kinda defeats what I was trying to do...which I
> literally thought would take only about 20 to 40 lines of code.

Donıt bother. It probably won't work the way you expect.

At the end of the day, what you're trying to do is something that's
basically not very easy on the MacOS. You want to print directly to a
parallel port printer without a print driver.

Macs require a printer driver to print to a printer. Period. Macs never used
dot matrix printers in the "raw text" mode of operation. As far as I know no
one _ever_ wrote a driver to do this. Instead most Mac printers are talked
to using either PostScript or custom printer languages (like PCL for HP
printers).

The Ethernet to parallel adapter you bought lets you put the printer on the
network, but doesn't solve this basic problem that you want to send a raw
stream of bytes, and the Mac printer system isn't designed to do this.
Really that adaptor is intended to put PostScript printers on the network,
and if you were using a postscript printer and Apple's LaserWriter
postscript driver everything would work just fine.

Switching from an Ethernet/parallel adaptor to a serial/parallel adaptor
won't fix this because you're still missing the _driver_ part of the
equation. In fact its likely to make things worse because the programs you
are using presently (Mac LPR, DropPS) are really intended for use with
network printers and don't even have an option to send the data over a
serial line. So switching to serial makes it worse not better.

Really the only thing switching to serial fixes is that you would no longer
need to swtich TCP/IP settings to get from your AOL PPP dialup to the local
TCP network between your Mac and your printer.


Here's what you really need:

Option 1: A printer driver that sends raw text to the printer. I don't think
one exists, and if it does it will be hard to find. Such a driver might use
TCP, AppleTalk or serial connections to the printer, and there is no point
in buying more adaptors until you find out what kind of connection this
hypothetical driver requires. Again, I don't think this exists, so you're
likely out of luck here.

Option 2: You need an application that sends raw data over the network to
the printer. DropPS and Mac LPR both do this, but they are really intended
to talk to network Postscript printers, and its not surprising they both
have trouble with text files with embedded IBM printer codes. LPRng in
MacPerl is another variant of this, as are basically any solution based on
the "LPR" protocol. LPRng probably won't choke on the embedded IBM printer
codes, so it will likely work better than DropPS (which as its name implies
is really for Postscript) but you'll have to modify LPRng to work on MacOS,
which means you'll need to know enough Perl to get it done.

At this point I think you're options are pretty limited. If you're not a C
programmer then CodeWarrior is going to be daunting, and writing a Mac
printer driver is non-trivial. So Option 1 is eliminated.

Writing a version of Option 2 above in C, RealBasic, or Perl are all
possible, and probably not hard from anyone experienced with any of those
languages. My impression from your messages, however, is that you are not
familiar with any of them, and without being familiar with them you're
likely going to be out of your depth.

Your best bet then is going to be to talk to someone about writing you a
custom app that does option 2. Doing LPR over the network is not hard in
Perl, and perhaps someone on this list would take you up on your job offer.
Posting a job offer to a RealBasic list might also get you somewhere.


Finally, if my read on your programming skills is incorrect feel free to
correct me. If your frustration is that you know Perl and just need help
getting a Mac GUI working in place of Getopts in LPRng then perhaps this
list can help.

Alex



-- 
Alex Harper                                         [EMAIL PROTECTED]

³We cross our bridges when we come to them and burn them behind us, with
nothing to show for our progress except a memory of the smell of smoke,
and a presumption that once our eyes watered.²   - Tom Stoppard


Reply via email to