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] Unknown document type when sending pdf via email



On 2006.01.25 18:56, Santos wrote:
I'm using the following scripts that i found on the mailing list, and known to work:

#########/usr/local/faxscripts/filter.pl
[...]

Why do you need this script?
I think it's a bit fragile because it only looks for the string "showpage" without context.
It could catch the word "showpage where it is not a PostScript operator or it could delete the operator "showpage" in a procedure definition leaving a broken procedure.
In PostScript you can define a procedure like this
/SP { showpage } def
and use the procedure name (SP) instead of showpage.


############## /usr/local/faxscripts/application/pdf
#!/bin/bash
/bin/echo " "
/bin/echo "showpage"

/var/spool/hylafax/bin/pdf2fax $1 | /usr/local/faxscripts/filter.pl

I don't understand this command.
pdf2fax should create a fax image document while the filter script seems to process PostScript code.


And here is the resulot of dd if=/var/spool/hylafax/docq/doc105.ps.85 bs=1 count=40 | od -bc :

40+0 records in
40+0 records out
0000000 045 041 120 123 055 101 144 157 142 145 055 063 056 060 012 045
% ! P S - A d o b e - 3 . 0 \n %
0000020 045 103 162 145 141 164 157 162 072 040 110 171 154 141 106 101
% C r e a t o r : H y l a F A
0000040 130 040 124 145 170 164 106 157
X T e x t F o
0000050

I think the empty line followed by the word "showpage" makes Hylafax think it's a text file (and not PostScript) but this is followed by binary Tiff image data. This is converted to PostScript and probably is bad postScript code because the text to PostScript converter does not handle binary data.



Bodo


____________________ HylaFAX(tm) Users Mailing List _______________________
 To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi
On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null
 *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*




Project hosted by iFAX Solutions