Print file to PCL

Brian K. White brian at aljex.com
Mon Apr 19 16:53:56 PDT 2004


Enrique Arredondo wrote:
> Hi,
>
> Is there a way of transforming a filepro ASCII report into a report
> that would print with the following command " lp -c -dlaser -o raw
> file.txt" ?
>
> The only difference within filepro is print code 56 at 1,1 (HP laser
> codes). So How to prepend that code into the ascii file so "-o raw"
> would take it and print it on the laser printer with no problem ?
>
> Regards,
>
> Enrique A.

Please resate the question more clearly.
As it stands I would have to answer 3 or more different possible questions
and probably end up being a waste since what you really wanted would turn
out to be yet something else.

Where does file.txt come from?
What is a "filepro ascii report" ? an export process? a regular report that
prints to file instead of a printer? A process table that uses file io
commands (open, writeline, etc...)?

A file of plain text would already print to a laser printer just fine
without any special codes by just not using "-o raw".
if for some reason you must use -o raw then add dos line-endings to the text
by using xtod to cat the file into lp instead of giving it on the lp command
line directly:  xtod file.txt |lp -c -o raw -d laser
or xtod file.txt |tr -d "\026 |lp ... to strip pff the ctrl-z that xtod adds
to the end
or awk '{print $0 "\r"}' file.txt |lp ... to not add the ctrl-z in the first
place
the klunkiness of above are why the first suggestion was simply not to
use -o raw if the input file is plain text.

Brian K. White  --  brian at aljex.com  --  http://www.aljex.com/bkw/
+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
filePro BBx  Linux SCO  Prosper/FACTS AutoCAD  #callahans Satriani



More information about the Filepro-list mailing list