HylaFAX The world's most advanced open source fax server

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

RE: WHFC 1.0.6 and the /page-count variable



Never mind... The problem seemed to be related to a poorly formed PS file
used for testing. I switched to a good PS file and the /page-count variable
is correct.
Sorry for any confusion.
ken
-----Original Message-----
From: Abrahamsen, Ken 
Sent: Friday, March 31, 2000 4:09 PM
To: 'Ulrich.Eckhardt@transcom.de'; 'flexfax@sgi.com'
Subject: RE: WHFC 1.0.6 and the /page-count variable


Oh, I thought I should include a copy of the WHFC faxcover doc file in case
it would be helpful...
Thanks!
ken

[root@twgrh1 docq]# cat doc137.cover
%!PS-Adobe-2.0 EPSF-2.0
%%Creator: WHFC
%%Title: WHFC Cover Sheet for HylaFAX
%%Creation Date: Fri Mar 31 15:56:01 2000
%%Origin: 0 0
%%BoundingBox: 0 0 609 791
%%Pages: 1 ,1
%%EndComments
%%Begin Prolog
100 dict begin
/to () def
/to-company () def
/to-location () def
/to-voice-number () def
/to-fax-number (7868) def
/pageWidth 0 def
/pageWidth 0 def
/from (Kenneth Abrahamsen) def
/from-fax-number (425-486-7868) def
/from-voice-number (425-806-3369) def
/from-company (The Wright Group) def
/from-location (Bothell, WA 98011  USA) def
/page-count (0) def
/todays-date (Fri Mar 31 15:56:01 2000 ) def
/regarding () def
/comments() def
/comments () def
/comments1()def
/comments2()def
/comments3()def
/comments4()def
/comments5()def
/comments6()def
/comments7()def
/comments8()def
/comments9()def
/comments10()def
/comments11()def
/comments12()def
/comments13()def
/comments14()def
/comments15()def
/comments16()def
/comments17()def
/comments18()def
/comments19()def
%%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
  { restoftext wordbreak search
    { /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
%!PS-Adobe-2.0 EPSF-2.0
%%BoundingBox: 21 3 588 788
%%Title:
%%CreationDate: 11:05 AM January  4, 1993
%%Pages: 1 +1
%%EndComments
%       $Id: faxcover.ps,v 1.2 1999/01/07 07:01:03 robert Exp $
%
% HylaFAX Facsimile Software
%
% Copyright (c) 1990-1996 Sam Leffler
% Copyright (c) 1991-1996 Silicon Graphics, Inc.
% HylaFAX is a trademark of Silicon Graphics
%
% Permission to use, copy, modify, distribute, and sell this software and
% its documentation for any purpose is hereby granted without fee, provided
% that (i) the above copyright notices and this permission notice appear in
% all copies of the software and related documentation, and (ii) the names
of
% Sam Leffler and Silicon Graphics may not be used in any advertising or
% publicity relating to the software without the specific, prior written
% permission of Sam Leffler and Silicon Graphics.
%
% THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
% EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
% WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
%
% IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
% ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
% OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
% WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
% LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
% OF THIS SOFTWARE.
%
1 setlinejoin
/nullstring () def
/IS {
    dup where {
        pop
        load dup nullstring ne {S} {pop} ifelse
    } {pop} ifelse
} bind def
/M  { moveto } bind def /S { show  } bind def
/R { rmoveto } bind def /L { lineto } bind def
/B { newpath 0 0 M 0 1 L 1 1 L 1 0 L closepath } bind def
/CS { closepath stroke } bind def

% Add TWG-specific variables
% These variables are designed to use TWG default values if
% the corresponding normal cover page variables are null
/from-addr () def
/cvr-to {(FAX Recipient) to dup () ne {exch pop} {pop} ifelse} def
/cvr-to-company {(FAX Recipient Company) to-company dup () ne {exch pop}
{pop} ifelse} def
/cvr-to-location {(FAX Recipient Location) to-location dup () ne {exch pop}
{pop} ifelse} def
/cvr-to-voice-number {(FAX Recipient Voice Number) to-voice-number dup () ne
{exch pop} {pop} ifelse} def
/cvr-fax-number {(Unknown FAX Number) fax-number dup () ne {exch pop} {pop}
ifelse} def
/cvr-from {(FAX Sender) from dup () ne {exch pop} {pop} ifelse} def
/cvr-from-fax-number {(425-486-7868) from-fax-number dup () ne {exch pop}
{pop} ifelse} def
/cvr-from-voice-number {(425-486-8011) from-voice-number dup () ne {exch
pop} {pop} ifelse} def
/cvr-from-company {(The Wright Group) from-company dup () ne {exch pop}
{pop} ifelse} def
%
% If cvr-from-company is The Wright Group, Then Use Address Literal
% Otherwise Use null for Address Line
/cvr-from-addr {(19201 120th Avenue NE) from-addr cvr-from-company (The
Wright Group) ne {exch pop} {pop} ifelse} def
%
/cvr-from-location {(Bothell, WA 98011  USA) from-location dup () ne {exch
pop} {pop} ifelse} def
/cvr-todays-date {(Todays Date) todays-date dup () ne {exch pop} {pop}
ifelse} def
/cvr-regarding {(See Comments / Following Pages) regarding dup () ne {exch
pop} {pop} ifelse} def
/cvr-comments {(None) comments dup () ne {exch pop} {pop} ifelse} def

%%%% INSERT HERE - NEW
/linebreak (\n) def
/doLine {
% <line> <width> <height> <x> <y> doLine <width> <height> <x> <y>
    2 copy moveto 5 -1 roll
    wordbreak
    {
        search {
            dup stringwidth pop currentpoint pop add 7 index 6 index add gt
{
                6 3 roll 2 index sub 2 copy moveto 6 3 roll
            } if
            show wordbreak show
        }{
            dup stringwidth pop currentpoint pop add 5 index 4 index add gt
{
                3 1 roll 3 index sub 2 copy moveto 3 -1 roll
            } if
            show exit
        } ifelse
    } loop
    2 index sub 2 copy moveto
} def
/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
% End of TWG-specific modifications

/showcaseisoencoding [
/.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef
/.notdef /.notdef /.notdef /.notdef
/space /exclam /quotedbl /numbersign
/dollar /percent /ampersand /quoteright
/parenleft /parenright /asterisk /plus
/comma /minus /period /slash
/zero /one /two /three /four /five /six /seven
/eight /nine /colon /semicolon
/less /equal /greater /question
/at /A /B /C /D /E /F /G
/H /I /J /K /L /M /N /O
/P /Q /R /S /T /U /V /W
/X /Y /Z /bracketleft
/backslash /bracketright /asciicircum /underscore
/quoteleft /a /b /c /d /e /f /g
/h /i /j /k /l /m /n /o
/p /q /r /s /t /u /v /w
/x /y /z /braceleft
/bar /braceright /asciitilde /guilsinglright
/fraction /florin /quotesingle /quotedblleft
/guilsinglleft /fi /fl /endash
/dagger /daggerdbl /bullet /quotesinglbase
/quotedblbase /quotedblright /ellipsis /trademark
/dotlessi /grave /acute /circumflex
/tilde /macron /breve /dotaccent
/dieresis /perthousand /ring /cedilla
/Ydieresis /hungarumlaut /ogonek /caron
/emdash /exclamdown /cent /sterling
/currency /yen /brokenbar /section
/dieresis /copyright /ordfeminine /guillemotleft
/logicalnot /hyphen /registered /macron
/degree /plusminus /twosuperior /threesuperior
/acute /mu /paragraph /periodcentered
/cedilla /onesuperior /ordmasculine /guillemotright
/onequarter /onehalf /threequarters /questiondown
/Agrave /Aacute /Acircumflex /Atilde
/Adieresis /Aring /AE /Ccedilla
/Egrave /Eacute /Ecircumflex /Edieresis
/Igrave /Iacute /Icircumflex /Idieresis
/Eth /Ntilde /Ograve /Oacute
/Ocircumflex /Otilde /Odieresis /multiply
/Oslash /Ugrave /Uacute /Ucircumflex
/Udieresis /Yacute /Thorn /germandbls
/agrave /aacute /acircumflex /atilde
/adieresis /aring /ae /ccedilla
/egrave /eacute /ecircumflex /edieresis
/igrave /iacute /icircumflex /idieresis
/eth /ntilde /ograve /oacute
/ocircumflex /otilde /odieresis /divide
/oslash /ugrave /uacute /ucircumflex
/udieresis /yacute /thorn /ydieresis ] def
/Helvetica-Bold findfont
dup length dict begin
  {1 index /FID ne {def} {pop pop} ifelse} forall
  /Encoding showcaseisoencoding def
  currentdict
end
/Helvetica-Bold-SHOWISO exch definefont pop
/Helvetica findfont
dup length dict begin
  {1 index /FID ne {def} {pop pop} ifelse} forall
  /Encoding showcaseisoencoding def
  currentdict
end
/Helvetica-SHOWISO exch definefont pop
/Courier findfont
dup length dict begin
  {1 index /FID ne {def} {pop pop} ifelse} forall
  /Encoding showcaseisoencoding def
  currentdict
end
/Courier-SHOWISO exch definefont pop
/Times-Bold findfont
dup length dict begin
  {1 index /FID ne {def} {pop pop} ifelse} forall
  /Encoding showcaseisoencoding def
  currentdict
end
/Times-Bold-SHOWISO exch definefont pop
%%EndProlog
%%Page: label 1
newpath clippath pathbbox
/URy exch def
/URx exch def
/LLy exch def
/LLx exch def
/Width  URx LLx sub 0.005 sub def
/Height URy LLy sub 0.005 sub def
LLx LLy translate
Width 612 div Height 792 div gt
    { /Y_size Height def
      /X_size 612 792 div Y_size mul def
      /Scale Height 792 div def }
    { /X_size Width def
      /Y_size 792 612 div X_size mul def
      /Scale Width 612 div def } ifelse
Width  X_size sub 2 div
Height Y_size sub 2 div translate
Scale Scale scale
gsave
0 0 0 setrgbcolor
gsave
newpath
11.9999 3.00039 M -8.00007 787 L 618 787 L 618 3.00039 L
closepath clip newpath
/Helvetica-SHOWISO findfont 14 scalefont setfont

% tom-baby's logo stuff:

/inch {72 mul} def
/width {.375 inch} def
/r {.3 inch} def
/d {r 30 cos mul neg} def
/R {2 inch} def
%1 setlinejoin

%/pnta { r 30 cos mul r 30 sin mul } def
%/pntb { R 90 cos mul d 90 sin mul sub R 90 sin mul d 90 cos mul add } def
%/pntc { R 30 cos mul d 30 sin mul add R 30 sin mul d 30 cos mul sub } def
%/pntd { r 90 cos mul r 90 sin mul } def
%/pnte { R 150 cos mul d 150 sin mul sub R 150 sin mul d 150 cos mul add }
def
%/pntf { R 90 cos mul d 90 sin mul add R 90 sin mul d 90 cos mul sub } def
%/pntg { r 150 cos mul r 150 sin mul } def
%/pnth { R 210 cos mul d 210 sin mul sub R 210 sin mul d 210 cos mul add }
def
%/pnti { R 150 cos mul d 150 sin mul add R 150 sin mul d 150 cos mul sub }
def
%/pntj { r 210 cos mul r 210 sin mul } def
%/pntk { R 270 cos mul d 270 sin mul sub R 270 sin mul d 270 cos mul add }
def
%/pntl { R 210 cos mul d 210 sin mul add R 210 sin mul d 210 cos mul sub }
def
%/pntm { r 270 cos mul r 270 sin mul } def
%/pntn { R 330 cos mul d 330 sin mul sub R 330 sin mul d 330 cos mul add }
def
%/pnto { R 270 cos mul d 270 sin mul add R 270 sin mul d 270 cos mul sub }
def
%/pntp { r 330 cos mul r 330 sin mul } def
%/pntq { R 30 cos mul d 30 sin mul sub R 30 sin mul d 30 cos mul add } def
%/pntr { R 330 cos mul d 330 sin mul add R 330 sin mul d 330 cos mul sub }
def
%
%/logo { newpath
%     pnta moveto pntb lineto pntc lineto pntd lineto pnte lineto
%     pntf lineto pntg lineto pnth lineto pnti lineto pntj lineto
%     pntk lineto pntl lineto pntm lineto pntn lineto pnto lineto
%     pntp lineto pntq lineto pntr lineto
%     closepath
%} def
%
%/drawlogo {
%gsave
% .8 inch 10.2 inch translate
% .2 .2 scale
% width setlinewidth
%
% logo stroke
%
% width 1.13 mul setlinewidth
% 1 setgray
% newpath
% pntc moveto pntd lineto pnte lineto stroke
% newpath
% pnti moveto pntj lineto pntk lineto stroke
% newpath
% pnto moveto pntp lineto pntq lineto stroke
%
% width setlinewidth
% 0 setgray
% newpath
% pntb moveto pntc lineto pntd lineto pnte lineto pntf lineto stroke
% newpath
% pnth moveto pnti lineto pntj lineto pntk lineto pntl lineto stroke
% newpath
% pntn moveto pnto lineto pntp lineto pntq lineto pntr lineto stroke
%
%grestore
%} def

/drawtext {
gsave
 % Heading Line 1
 1.4 inch 10.2 inch moveto
 /Helvetica-BoldOblique findfont 23 scalefont setfont
 (The Wright Group) S
 %cvr-from-company IS

 % Heading Line 2
 1.42 inch 9.95 inch moveto
 /Helvetica-Bold findfont 14 scalefont setfont
 (19201 120th Avenue NE) S
 %/cvr-from-addr IS

 % Heading Line 3
 1.42 inch 9.70 inch moveto
 (Bothell, WA 98011  USA) S
 %/cvr-from-location IS

 % Heading Line 4
 1.42 inch 9.45 inch moveto
 (Voice: 425-486-8011 ; FAX 425-486-7868) S
 %(Voice: ) S /cvr-from-voice-number IS
 %( ; FAX: ) S /cvr-from-fax-number IS

grestore
} def

%drawlogo
drawtext

0 0 0 setrgbcolor
/Helvetica-Bold-SHOWISO findfont 24 scalefont setfont
%164.063 644 M 168.356 644 M (Applications Consulting) S
%gsave 164.063 642 M 442 642 L stroke grestore
210.875 586 M (Fax Cover Sheet) S
176.222 499 M (To:) S
226.744 499 M (________________________) S 226.744 499 M /to IS
%226.744 499 M (________________________) S 226.744 499 M /cvr-to IS
58.3641 457 M (Fax Number:) S
%108.837 457 M (Number:) S
225.744 457 M (________________________) S 225.744 457 M /to-fax-number IS
%225.744 457 M (________________________) S 225.744 457 M /cvr-to-fax-number
IS
/Times-Bold-SHOWISO findfont 10 scalefont setfont
/Helvetica-Bold-SHOWISO findfont 24 scalefont setfont
95.5068 415 M (Company:) S
225.744 415 M (________________________) S 225.744 415 M /to-company IS
%225.744 415 M (________________________) S 225.744 415 M /cvr-to-company IS
146.199 373 M (From:) S
227.744 373 M (________________________) S 227.744 373 M /from IS
%227.744 373 M (________________________) S 227.744 373 M /cvr-from IS
176.823 331 M (Re:) S
228.744 331 M (________________________) S 228.744 331 M /regarding IS
%228.744 331 M (________________________) S 228.744 331 M /cvr-regarding IS
59.3601 289 M (Today's Date:) S
231.744 289 M (________________________) S 231.744 289 M /todays-date IS
%231.744 289 M (________________________) S 231.744 289 M /cvr-todays-date
IS
31 247 M (# of pages to follow this sheet:) S
403.216 247 M (___________) S 403.216 247 M /page-count IS
/Helvetica-Bold-SHOWISO findfont 14 scalefont setfont
31 189 M (Comments:) S
/Helvetica-Bold-SHOWISO findfont 24 scalefont setfont
/rule (_______________________________) def
/y 189 def /x 141.336 def
y -29 73 { x exch M rule S } for
rule stringwidth pop 29 x y comments BreakIntoLines
%rule stringwidth pop 29 x y cvr-comments BreakIntoLines
grestore
grestore
showpage

% TWG Modification to set page-count
%pages: 1
%end
[root@twgrh1 docq]#

-----Original Message-----
From: Abrahamsen, Ken 
Sent: Friday, March 31, 2000 3:52 PM
To: 'Ulrich.Eckhardt@transcom.de'; 'flexfax@sgi.com'
Subject: WHFC 1.0.6 and the /page-count variable


My Config:
RH 6.1 (no Updates Applied)
220 twgrh1 server (HylaFAX (tm) Version 4.1beta1) ready.
WHFC Client 1.0.6
WHFC printer driver is Apple Laser Writer 16/1600 PS

When I use sendfax, the /page-count variable for the cover page
(faxcover.ps) is calculated correctly as '1' when there's a cover page and
one subsequent page being faxed.

When I use WHFC 1.0.6, the /page-count variable for the cover page
(faxcover.ps) is one too few (ie; the correct /page-count should be '1' when
there's a cover page and one subsequent page being faxed, when in reality
the /page-count variable gets defined as '0').

Does anyone know what or when the /page-count variable gets defined with
WHFC processing and how the value is determined for this variable? Sendfax
works fine with this same faxcover.ps.

TIA.
ken 




Project hosted by iFAX Solutions