Thanks for confirming my suspicion that \f in the Perl shipped with mac os x
10.2 might not be working properly (or at all).  Is anyone out there getting
a form feed to work?

On 2/17/03 13:37, "Bruce Van Allen" <[EMAIL PROTECTED]> wrote:

> I was hoping someone could offer some useful advice here. I've just
> begun fiddling with lpr recently, and am still very ignorant, so after
> the OP's first query, I immediately tried to print something with a
> form feed on my laser printer Speedy (OS X 10.2.4, Perl 5.6.1):
> 
> #!/usr/bin/perl -w
> open LPR, "|lpr -P Speedy >/dev/null 2>&1"
> or die "Can't open printer: $!";
> print LPR $_ . "\n" for qw/AAA BBB CCC DDD/;
> print LPR "\f";
> print LPR "EEE", "\n";
> close LPR
> __END__
> 
> Speedy prints everything on one page:
> AAA
> BBB
> CCC
> DDD
>       <-- what happened to form feed?
> EEE
> 
> I also tried the -p and -l (ell, not one) switches, and watched the
> process using Print Center. With -p (pretty print header) I saw a
> message flash by saying "nstextopdf pretty print not supported", and
> then the above printed (on one page). With -l, a message flashed by
> saying "Sending print file, 21 bytes", but *nothing* printed.
> 
> If printed to STDOUT, the rectangle junk character printed for the \f
> is correctly identified by BBEdit as a form feed.
> 
> So this question is not about whether I (or the OP) can get something
> to print -- it's specifically about lpr printing a form feed, known as
> \f in Perl. As the above shows, \n prints newlines. I also tested \t,
> and get tabs just fine.
> 
> Secondarily, at least for me, is there more to know about darwin's lpr
> here?
> 
> Thanks.
> 
> On Monday, February 17, 2003, at 07:59  AM, drieux wrote:
>> On Sunday, Feb 16, 2003, at 14:52 US/Pacific, Tom McDonough wrote:
>>> On 2/15/03 21:56, "drieux" <[EMAIL PROTECTED]> wrote:
>>>> On Saturday, Feb 15, 2003, at 14:40 US/Pacific, Tom McDonough wrote:
>>>>> I'm trying to force a form feed using perl 5.6 and os x.2  without
>>>>> using the
>>>>> format command.
>>> LPR is the line printer and it is OPEN.  My program is printing
>>> continuous
>>> lines and I want to control the page break.
>> I presume that you are using a printer with a tractor feed?
>> As opposed to the laser-printer style? yes? and that it is
>> locally attached?
>> 
>> Have you pulled out the manual for it, as to what it uses
>> for 'control sequences'.
>> 
>> you may want to read
>> 
>> man printcap
>> 
>> Since what you want to ship to the printer, if it is
>> defined in the 'ff' argument, is what you will need to
>> ship to the printer to make it follow instructions.
>> 
>> I think what the '\f' is talking about is the 8-bit pattern
>> 007 or the sixteen bit pattern 017...
> 
>  - Bruce
> 
> __bruce__van_allen__santa_cruz__ca__
> 

Reply via email to