HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [hylafax-users] faxcover.ps working for sendfax but not Cypheus



> Alan,
> 
> I based my procedure call syntax to BreakIntoLines on the message
> http://www.hylafax.org/archive/1999-09/msg00148.php
> 
> sendfax seems to like it using this syntax, however, Cypheus does not.  
> 
> Bodo has indicated that the BreakIntoLines procedure sent from Cypheus is
> identical to that from the default cover page.  This would seem to indicate
> that the parameter syntax is correct, although, I can't really say for sure
> as you know more about ps than I do.  ;-)  It would also seem to indicate
> that something that Cypheus is doing/sending is incompatible.

Hmm.

Just to compare, here's the BreakIntoLines that faxcover makes:

/BreakIntoLines {
% <width> <height> <x> <y> <text> BreakIntoLines
    linebreak
    {
         search {
             7 3 roll doLine 6 -2 roll
         }{
             5 1 roll doLine exit
         } ifelse
    } loop
    pop pop pop pop
} def

This is clearly not the same as the BreakLines inserted by Cypheus
(see below).

I think the basic problem here is, both faxcover and Cypheus are
inserting a BreakIntoLines, but they're different procedures which
expect different parameters and may not even do the exact same
thing...  

I don't see any way to rectify this short of changing either faxcover,
or Cypheus, or your faxcover.ps.  You could just grab the
BreakIntoLines that faxcover produces (along with helper functions)
and insert them into your faxcover.ps (you may need to rename
BreakIntoLines to prevent it from being inserted again later).

Alan

> I will do some more playing around with it to see if I can figure out
> anything else.  Perhaps there are some ps gurus on the list that might be
> able to see what is going wrong here.
> 
> Curtis
> 
> 
> 
> -----Original Message-----
> From: alan [mailto:alan@pair.com]
> Sent: May 15, 2001 1:43 PM
> To: Bodo Noering
> Cc: 'Curtis Rempel'; hylafax-users@hylafax.org
> Subject: RE: [hylafax-users] faxcover.ps working for sendfax but not
> Cyphe us
> 
> 
> This message uses a character set that is not supported by the Internet
> Service.  To view the original message content,  open the attached message.
> If the text doesn't display correctly, save the attachment to disk, and then
> open it using a viewer that can display the original character set. 
> 
> Curtis,=20
> 
> I must admit, I don't totally understand how BreakIntoLines is
> working, and I haven't read the instructions.  But I think you might
> be calling it with an incorrect parameter list, at least for the
> version below.
> 
> > %%EndProlog
> > %%Page 1 +1
> > /wordbreak ( ) def
> > /BreakIntoLines
> > { /proc exch def
> >   /linewidth exch def
> >   /textstring exch def
> >   /breakwidth wordbreak stringwidth pop def
> >   /curwidth 0 def
> >   /lastwordbreak 0 def
> >   /startchar 0 def
> >   /restoftext textstring def
> 
> To test, I added the following here:
> restoftext foo
> 
> This causes the code to crash in gv and dump the stack, with
> "restoftext" on the top of the ps stack.  It contains the number 300,
> and not the comments "this is a comment" as I believe it should.  That
> means textstring isn't being defined correctly, because it's not being
> passed the correct parameters.
> 
> As far as I can tell from looking at the code, a correct call to
> BreakIntoLines should look something like:
> 
> comments linewidth [a proc?] BreakIntoLines
> 
> I'm not sure what it's looking for, for "proc."  But it looks to me
> like BreakIntoLines' last 3 parameters are as I showed above.
> 
> This may be of no use whatsoever, and I should probably RTFM before I
> dig any deeper... but that's what I got from looking at the code and
> playing around with it.  Hope it helps...
> 
> Alan
> 
> 
> >   { restoftext wordbreak search=09=09<< the error occurs here!
> > { /nextword exch def pop
> >   /restoftext exch def
> >   /wordwidth nextword stringwidth pop def
> >   curwidth wordwidth add linewidth gt
> >   { textstring startchar
> > lastwordbreak startchar sub
> > getinterval proc
> > /startchar lastwordbreak def
> > /curwidth wordwidth breakwidth add def }
> >   { /curwidth curwidth wordwidth add
> > breakwidth add def
> >  } ifelse
> >   /lastwordbreak lastwordbreak
> >   nextword length add 1 add def
> > }
> > { pop exit }
> > ifelse
> >   } loop
> >   /lastchar textstring length def
> >   textstring startchar lastchar startchar sub
> >   getinterval proc
> > } def
> >=20
> > <<
> >=20
> > I compared "BreakIntoLines" with the default HylaFAX cover page and
> > could not find any error.
> >=20
> >=20
> > Best Regards
> > Bodo
> >=20
> > --
> > ___________________________________________
> > Bodo Noering Consulting
> > Zur Alten Faehre 23 =B7 D-45219 Essen
> > Phone +49-2054-971790 =B7 Fax +49-2054-971791
> > bn@urania.com =B7 http://www.urania.com
> > ___________________________________________
> >=20
> 
> 
> ____________________ HylaFAX(tm) Users Mailing List _______________________
>  To unsub: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null
> 



____________________ HylaFAX(tm) Users Mailing List _______________________
 To unsub: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null




Project hosted by iFAX Solutions