Printer Local question - TOP POST
Scott Walker
ScottWalker at RAMSystemsCorp.com
Sat Feb 23 12:28:54 PST 2008
Brian,
I really appreciate you taking the time to give me such a complete
description of the way you are accomplishing "transcient, processing
controlled, passthru printing" (GREAT DESCRIPTION!).
I guess my only question, is why did you guys do it that way when
"printer local" should have handled it? Did you try "printer local" and
it did not work correctly or has it been so long that you've been doing
it your way that you don't really rememeber?
Thanks again,
Scott
Brian said:
We do that (transient, processing controlled, passthru printing) by
printer type "hplaser"
tf = "/tmp/print"{@fi{@rn{@id{rand(){".pcl"
system "umask 0;>"{tf
printer file tf
formm fooa
formm foob
...
form foox
printer reset
system "passthru"<tf
x = remove(tf)
...
end
@once :
x = rand("-1")
end
or system "tput mc5 ;cat"<fn<";tput mc4"
Where passthru is either the binary by Jim Asman available on
ftp.anzio.com, or a script like this:
#!/bin/bash
# hard coded, assumes bash and assumes ansi-like terminal
# but, fast & light and works (on ansi-ish terminals) when terminfo is
incomplete
echo -en "\033[5i"
cat "$@"
echo -en "\033[4i"
or
#!/bin/ksh
print "\033[5i\c"
cat "$@"
print "\033[4i\c"
or
#!/bin/sh
tput mc5
cat "$@"
tput mc4
tput or the passthru binary are the more correct way since they don't
care what kind of shell you are in and they consult the terminfo
database to find the printer escape codes (mc4,mc5) for your terminal,
similar to the way filepro consults termcap to find PN & PS, instead of
just assuming all terminals are ansi terminals.
But annoyingly, the most commonly used terminals (linux, scoansi) do not
have these fields defined by default. This is because, technically the
the real scoansi or linux terminal is the system console, and that
doesn't support passthru printing, so it's correct that it's definition
in termcap and terminfo doesn't include features the terminal doesn't
provide.
It's only terminal _emulators_ that provide the feature.
But, it's easy to add the tags to the terminfo definitions.
Log in as root, using the desired end user terminal type.
IF it is an ansi-like terminal (xterm, linux, ansi, scoansi, vt*,
cons25,...)
# infocmp >${TERM}.ti
# echo 'mc4=\E[4i, mc5=\E[5i,' >>${TERM}.ti
# tic ${TERM}.ti
Note, single-forward-quotes on the echo command.
It's ok on any os any (bourne-like) shell in this case.
On linux you may need to find some package to install to get infocmp
and/or tic commands.
On suse it's "ncurses-devel" and not installed by default.
Freebsd/sco/sun/everyone-else? just has it.
bkw
Scott Walker wrote:
> Scott says:
>
>
> "printer local" is listed as a valid command in both the on line fp
> manual and in Laura's Help Files version 2.0.00
>
> >From the fp manual:
>
>
> PRINTER LOCAL
>
>
> Sends output to terminal printer. (UNIX/XENIX only)
>
>
>
>
>
> John said:
>
>
> Funny, but you've hit a weird one. "PRINTER local" is a holdover from
a
> Zenix work-around for the O?S. I don't believe it was carried through
> to
> Unixware. I'm pretty sure filePro did not make it a special
> undocumented
> option for PRINTER. There are only the few that you know, PRINTER
FILE,
> PRINTER NAME... and PRINTER RESET of course.
>
> I'd have to think about how to do this from processing... which I
> will...
> nothing coming to me just now. Is ther any chance you could put the
O/S
> environment variable ahead of the line which does the printing. Do
this
> in
> your script on the menu? As in:
>
> Printer=local; export printer
> Dreport filename blah blah...
>
> But actually, I don't even remember if it was a variable like this or
if
> it
> was a command... but you know this obviously. And your PN and PS must
> obviously be set properly if it works the way you describe.
>
>
>
> Scott asked:
>
>
>> >From my pc connected to the unix server, I set passthrough printing
>>
> on
>
>> with PFPT=on and set the printer type with PFPRTC=rschp3
>>
>> I print a quote and it comes down the line to my pc fine.
>>
>> I turn off PFPT and PFPRTC and now I try to get passthrough printing
>>
> of
>
>> a quote from within processing...
>>
>> I use the "printer local" command in processing and when I try to
>>
> print
>
>> the quote, I get:
>>
>> Warning. Can't find printer 'local'
>> Reverting to defaults
>>
>> I add:
>>
>> printer type "rschp3" in processing and get the same warning
message.
>>
>>
>> Why is it looking for a printer named "local". Is not "printer
local"
>> just a processing command to turn on Pass Through printing?
>>
>> I guess I just don't understand how this is supposed to work. Any
>>
> help
>
>> appreciated.
>>
>>
>> Regards,
>>
>>
>> Scott
>>
>> Scott Walker
>> RAM Systems Corp.
>> ScottWalker at RAMSystemsCorp.com
>> Ph: (704) 896-6549
>> Fx: (704) 896-7458
>>
>>
>>
>>
>> _______________________________________________
>> Filepro-list mailing list
>> Filepro-list at lists.celestial.com
>> http://mailman.celestial.com/mailman/listinfo/filepro-list
>>
>
>
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
>
>
_______________________________________________
Filepro-list mailing list
Filepro-list at lists.celestial.com
http://mailman.celestial.com/mailman/listinfo/filepro-list
More information about the Filepro-list
mailing list