Hylafax Mailing List Archives

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

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



I'm glad your fax cover is working, and I'm glad I could be of some
help!

Regards,
Alan

On Tue, 15 May 2001, Curtis Rempel wrote:

> Good news!  The problem is solved.
> 
> You are right about the BreakIntoLines procedure Alan.  My apologies - I
> must have been working too long at this and had too many copies of test
> files etc. that I was looking at the wrong one.  I ran faxcover again and
> discovered that what you pointed out is indeed the case.
> 
> So, what I did was to clip the BreakIntoLines routine generated from
> faxcover along with the "helper" routines and paste that along with the call
> to BreakIntoLines into faxcover.ps and everything works just fine!
> 
> >From the changes page http://www.hylafax.org/4.1beta3.html there is a note
> regarding the fax cover changes:
> 
> To work properly with comments some small changes to to some faxcovers may
> be required. if the faxcover previously used the BreakIntoLines function to
> print comments the protoype has changed from: 
> 
> <comments> <line-width> <line-changing-proc> BreakIntoLines - 
> 
> to 
> 
> <line-width> <line-height> <x> <y> <comments> BreakIntoLines - 
> 
> Cypheus is sending ps code for the old syntax which is incompatible with the
> 4.1 Beta 3 format for BreakIntoLines.  By replacing what Cypheus sends with
> what faxcover generates, the procedure is called correctly.
> 
> Thanks to Alan and Bodo for all your help on this!
> 
> Cheers,
> 
> Curtis
> 
> -----Original Message-----
> From: alan [mailto:alan@pair.com]
> Sent: May 15, 2001 3:14 PM
> To: Curtis Rempel
> Cc: Bodo Noering; hylafax-users@hylafax.org
> Subject: Re: [hylafax-users] faxcover.ps working for sendfax but not
> Cyphe us
> 
> 
> > Alan,
> > 
> > I based my procedure call syntax to BreakIntoLines on the message
> > http://www.hylafax.org/archive/1999-09/msg00148.html
> > 
> > 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



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services