Hylafax Mailing List Archives

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

Re: [hylafax-users] Unknown document type when sending pdf via email



Bodo Meissner wrote:
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.



Initially i was using the material here on this page to send pdf: http://hylafax.sourceforge.net/howto/misc/faxmail-mimeconverters.php But it didn't work, as it sent blank pdf pages after the first one. And i tried with a 2 page and a 6 six page pdf. Then i found other scripts that supported more formats, http://www.hylafax.org/archive/2002-05/msg00069.php and now i got the error i posted here with those scripts. Why is it so hard to send pdf (and other formats) to faxmail when sendfax supports it ok?...


############## /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.

Ah yes, pdf2fax is there as it is the third tool i tried to generate a fax image. Tried some before, all with the same result.



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.


I don't understand, these scripts worked for others, why they work here?... I don't think hylafax has changed that much since those scripts were created.

Thanks for the help!


Santos



____________________ 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*



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