Faxfilter not extracting fax number
Teresa Ray (tcray@speedchoice.com)
Sat, 15 May 1999 10:21:29 -0700
I'm having difficulty getting the 'faxfilter' file to extract the fax number from a document using MS Office 97 and Win98.
I have the printer driver as an apple laserwriter with all defaults. Faxfilter will extract the fax number from
a file printed from Wordpad, but not Word or Excel.
Is there any setting I should try with the apple laserwriter or a better postscript driver to use in order to
get the correct strings sent to the faxfilter file... or, does anyone know another way to extract the fax number
from the Word or Excel file? Unfortunately, I am just learning Linux and I don't know how to program with awk.
The pertinent part of the faxfilter program I'm using is:
---------------
TELEFON=`awk '{ IGNORECASE=1 } /FAX-Nr ?: ?[0-9-]*/ \
{ gsub(/-/,""); \
anfang=match($0,/ ?: ?/); \
anfang=anfang+match(substr($0,anfang),/[0-9]/)-1; \
ende=match(substr($0,anfang),/[^0-9]/)-1; \
printf ("%s",substr($0,anfang,ende)) \
}' $FAXFILE`
--------------------------
I've also tried using a faxfilter sent to me (thank-you!) from Stephen Davis:
-----------
TELEFON=`awk '$3 == "(F)A"{getline;if($3 != "(A)A")next
getline;if($3 != "(X)A")next
getline;if($3 != "(-)A")next
getline;if($3 != "(N)A")next
getline;if($3 != "(r)A")next
getline;if($3 != "(:)A")next
getline;gsub(/[ -()A]/,"",$3);print $3;exit
}' $FAXFILE`
-------------------------
The pertinent part of the postscript file being filtered by faxfilter is:
------------------
userdict begin /pagesave save def end mysetup concat colspRefresh
: 0 0 0 sco 1 Lc 1 Lj solid 0 0 2391 3229 rc 0 0 0 sco %%IncludeFont: Times-Roman
(F0) cvn
0.905
(Times-Roman) cvn /Type1
T
(Times-Roman) cvn
mF
(F0_42) cvn
F0
42
xF
F0_42
Ji
296 266 M
-0.352 0 (F)A
-0.324 0 (AX)A
0.014 0 (-)A
-0.324 0 (N)A
1.014 0 (r)A
1.176 0 32 -0.676 0 (: )D
(939)S
-0.986 0 (-)A
(4202)S
; : 0 0 2391 3229 rc 0 0 0 sco F0_42
Ji
296 362 M
0.338 0 (T)A
-0.648 0 (e)A
-0.338 0 (s)A
0.324 0 (t)A
;
LH
pagesave restore
-----------------
Please Help!
Teri
tcray@speedchoice.com