[futurebasic] Re [FB] Printing PCL codes to the printer

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : July 2010 : Group Archive : Group : All Groups

From: Ken Shmidheiser <kshmidheiser@...>
Date: Thu, 22 Jul 2010 13:46:00 -0400
Writing to Bernie, Deepish said:

>That is certainly in the right direction, but only handles one line at a time.

Deep,

You could always download the flip binary, load it into your bundle, 
and call from there with FB's open "Unix".

https://ccrma.stanford.edu/~craig/utility/flip/

This is similar to what Christoph Dalitz has done with the drag and 
drop utility ConvertNewLines:

http://lionel.kr.hs-niederrhein.de/~dalitz/data/software/macosx/ConvertNewlines.zip

Conversely, in FB you could wash your text's line endings through the 
Unix tr command:

tr '
' '
' <macfile.txt > dosfile.txt

And you don't need chomp to do it in Perl. This code translates line 
endings from Mac to DOS:

perl -pe 's/
|
/
/g'

There are also sed and awk versions, but these should give you the idea.

Ken